mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
spv-in: align array stride for undecorated arrays
This commit is contained in:
committed by
Dzmitry Malyshau
parent
1f14f7ea2a
commit
d40522329b
@@ -4076,12 +4076,15 @@ impl<I: Iterator<Item = u32>> Parser<I> {
|
||||
|
||||
let decor = self.future_decor.remove(&id).unwrap_or_default();
|
||||
let base = self.lookup_type.lookup(type_id)?.handle;
|
||||
self.layouter
|
||||
.update(&module.types, &module.constants)
|
||||
.unwrap();
|
||||
let inner = crate::TypeInner::Array {
|
||||
base,
|
||||
size: crate::ArraySize::Constant(length_const.handle),
|
||||
stride: match decor.array_stride {
|
||||
Some(stride) => stride.get(),
|
||||
None => module.types[base].inner.size(&module.constants),
|
||||
None => self.layouter[base].to_stride(),
|
||||
},
|
||||
};
|
||||
self.lookup_type.insert(
|
||||
@@ -4113,12 +4116,15 @@ impl<I: Iterator<Item = u32>> Parser<I> {
|
||||
|
||||
let decor = self.future_decor.remove(&id).unwrap_or_default();
|
||||
let base = self.lookup_type.lookup(type_id)?.handle;
|
||||
self.layouter
|
||||
.update(&module.types, &module.constants)
|
||||
.unwrap();
|
||||
let inner = crate::TypeInner::Array {
|
||||
base: self.lookup_type.lookup(type_id)?.handle,
|
||||
size: crate::ArraySize::Dynamic,
|
||||
stride: match decor.array_stride {
|
||||
Some(stride) => stride.get(),
|
||||
None => module.types[base].inner.size(&module.constants),
|
||||
None => self.layouter[base].to_stride(),
|
||||
},
|
||||
};
|
||||
self.lookup_type.insert(
|
||||
|
||||
Reference in New Issue
Block a user