mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
[spv] fix depth sampler type
This commit is contained in:
committed by
Timo de Kort
parent
4a13ce022b
commit
0c5db60d69
@@ -217,19 +217,15 @@ pub(super) fn instruction_type_image(
|
||||
instruction.add_operand(sampled_type_id);
|
||||
instruction.add_operand(dim as u32);
|
||||
|
||||
instruction.add_operand(match image_class {
|
||||
crate::ImageClass::Depth => 1,
|
||||
_ => 0,
|
||||
});
|
||||
let (depth, multi, sampled) = match image_class {
|
||||
crate::ImageClass::Sampled { kind: _, multi } => (false, multi, true),
|
||||
crate::ImageClass::Depth => (true, false, true),
|
||||
crate::ImageClass::Storage(_) => (false, false, false),
|
||||
};
|
||||
instruction.add_operand(depth as u32);
|
||||
instruction.add_operand(arrayed as u32);
|
||||
instruction.add_operand(match image_class {
|
||||
crate::ImageClass::Sampled { multi: true, .. } => 1,
|
||||
_ => 0,
|
||||
});
|
||||
instruction.add_operand(match image_class {
|
||||
crate::ImageClass::Sampled { .. } => 1,
|
||||
_ => 0,
|
||||
});
|
||||
instruction.add_operand(multi as u32);
|
||||
instruction.add_operand(sampled as u32);
|
||||
|
||||
let format = match image_class {
|
||||
crate::ImageClass::Storage(format) => match format {
|
||||
|
||||
Reference in New Issue
Block a user