diff --git a/src/front/spv/mod.rs b/src/front/spv/mod.rs index e450ea5e90..55a5cc57c1 100644 --- a/src/front/spv/mod.rs +++ b/src/front/spv/mod.rs @@ -4708,7 +4708,7 @@ impl> Frontend { let id = self.next()?; let sample_type_id = self.next()?; let dim = self.next()?; - let _is_depth = self.next()?; + let is_depth = self.next()?; let is_array = self.next()? != 0; let is_msaa = self.next()? != 0; let _is_sampled = self.next()?; @@ -4740,7 +4740,9 @@ impl> Frontend { .ok_or(Error::InvalidImageBaseType(base_handle))?; let inner = crate::TypeInner::Image { - class: if format != 0 { + class: if is_depth == 1 { + crate::ImageClass::Depth { multi: is_msaa } + } else if format != 0 { crate::ImageClass::Storage { format: map_image_format(format)?, access: crate::StorageAccess::default(), diff --git a/tests/out/analysis/shadow.info.ron b/tests/out/analysis/shadow.info.ron index 54731d00ec..bff3013e0d 100644 --- a/tests/out/analysis/shadow.info.ron +++ b/tests/out/analysis/shadow.info.ron @@ -90,9 +90,6 @@ ( bits: 64, ), - ( - bits: 64, - ), ], functions: [ ( @@ -190,7 +187,7 @@ ), ref_count: 1, assignable_global: Some(1), - ty: Handle(30), + ty: Handle(7), ), ( uniformity: ( @@ -201,7 +198,7 @@ ), ref_count: 1, assignable_global: Some(2), - ty: Handle(31), + ty: Handle(30), ), ( uniformity: ( @@ -1256,7 +1253,7 @@ ), ref_count: 0, assignable_global: Some(1), - ty: Handle(30), + ty: Handle(7), ), ( uniformity: ( @@ -1267,7 +1264,7 @@ ), ref_count: 0, assignable_global: Some(2), - ty: Handle(31), + ty: Handle(30), ), ( uniformity: ( diff --git a/tests/out/ir/shadow.ron b/tests/out/ir/shadow.ron index 9311f9e188..76f4f05275 100644 --- a/tests/out/ir/shadow.ron +++ b/tests/out/ir/shadow.ron @@ -50,8 +50,7 @@ inner: Image( dim: D2, arrayed: true, - class: Sampled( - kind: Float, + class: Depth( multi: false, ), ), @@ -269,16 +268,6 @@ space: Private, ), ), - ( - name: None, - inner: Image( - dim: D2, - arrayed: true, - class: Depth( - multi: false, - ), - ), - ), ( name: None, inner: Sampler( @@ -616,7 +605,7 @@ group: 0, binding: 2, )), - ty: 30, + ty: 7, init: None, ), ( @@ -626,7 +615,7 @@ group: 0, binding: 3, )), - ty: 31, + ty: 30, init: None, ), (