Skip to content

Commit 87aec18

Browse files
authored
Expose SetAutoCombinedImageSampler flag (#114)
1 parent 5784243 commit 87aec18

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

shaderc-rs/src/lib.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -921,6 +921,14 @@ impl<'a> CompileOptions<'a> {
921921
}
922922
}
923923

924+
/// Sets whether the compiler should automatically remove sampler variables
925+
/// and convert image variables to combined image-sampler variables.
926+
pub fn set_auto_combined_image_sampler(&mut self, auto_combine: bool) {
927+
unsafe {
928+
scs::shaderc_compile_options_set_auto_combined_image_sampler(self.raw, auto_combine);
929+
}
930+
}
931+
924932
/// Sets whether the compiler should use HLSL IO mapping rules for bindings.
925933
///
926934
/// Defaults to false.

shaderc-sys/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ extern "C" {
166166
options: *mut ShadercCompileOptions,
167167
auto_bind: bool,
168168
);
169+
pub fn shaderc_compile_options_set_auto_combined_image_sampler(
170+
options: *mut ShadercCompileOptions,
171+
auto_combine: bool,
172+
);
169173
pub fn shaderc_compile_options_set_hlsl_io_mapping(
170174
options: *mut ShadercCompileOptions,
171175
hlsl_iomap: bool,

0 commit comments

Comments
 (0)