@@ -185,12 +185,12 @@ impl SpirvType<'_> {
185
185
let result = cx
186
186
. emit_global ( )
187
187
. type_array_id ( id, element, count. def_cx ( cx) ) ;
188
- self . decorate_array_stride ( result, element, cx) ;
188
+ Self :: decorate_array_stride ( result, element, cx) ;
189
189
result
190
190
}
191
191
Self :: RuntimeArray { element } => {
192
192
let result = cx. emit_global ( ) . type_runtime_array_id ( id, element) ;
193
- self . decorate_array_stride ( result, element, cx) ;
193
+ Self :: decorate_array_stride ( result, element, cx) ;
194
194
result
195
195
}
196
196
Self :: Pointer { pointee } => {
@@ -258,7 +258,7 @@ impl SpirvType<'_> {
258
258
result
259
259
}
260
260
261
- fn decorate_array_stride ( self , result : u32 , element : u32 , cx : & CodegenCx < ' _ > ) {
261
+ fn decorate_array_stride ( result : u32 , element : u32 , cx : & CodegenCx < ' _ > ) {
262
262
let mut emit = cx. emit_global ( ) ;
263
263
let ty = cx. lookup_type ( element) ;
264
264
if let Some ( element_size) = ty. physical_size ( cx) {
@@ -380,12 +380,12 @@ impl SpirvType<'_> {
380
380
}
381
381
382
382
/// Get the physical size of the type needed for explicit layout decorations.
383
+ #[ allow( clippy:: match_same_arms) ]
383
384
pub fn physical_size ( & self , cx : & CodegenCx < ' _ > ) -> Option < Size > {
384
385
match * self {
385
386
// TODO(jwollen) Handle physical pointers (PhysicalStorageBuffer)
386
387
Self :: Pointer { .. } => None ,
387
388
388
- // TODO(jwollen) Handle unsized elements
389
389
Self :: Adt { size, .. } => size,
390
390
391
391
Self :: Array { element, count } => Some (
0 commit comments