Skip to content

Commit

Permalink
Expose SetAutoCombinedImageSampler flag (google#114)
Browse files Browse the repository at this point in the history
  • Loading branch information
michidk authored Nov 2, 2021
1 parent 5784243 commit 87aec18
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions shaderc-rs/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -921,6 +921,14 @@ impl<'a> CompileOptions<'a> {
}
}

/// Sets whether the compiler should automatically remove sampler variables
/// and convert image variables to combined image-sampler variables.
pub fn set_auto_combined_image_sampler(&mut self, auto_combine: bool) {
unsafe {
scs::shaderc_compile_options_set_auto_combined_image_sampler(self.raw, auto_combine);
}
}

/// Sets whether the compiler should use HLSL IO mapping rules for bindings.
///
/// Defaults to false.
Expand Down
4 changes: 4 additions & 0 deletions shaderc-sys/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,10 @@ extern "C" {
options: *mut ShadercCompileOptions,
auto_bind: bool,
);
pub fn shaderc_compile_options_set_auto_combined_image_sampler(
options: *mut ShadercCompileOptions,
auto_combine: bool,
);
pub fn shaderc_compile_options_set_hlsl_io_mapping(
options: *mut ShadercCompileOptions,
hlsl_iomap: bool,
Expand Down

0 comments on commit 87aec18

Please sign in to comment.