glsl-out: Fix array constants constructor

This commit is contained in:
João Capucho
2022-01-03 22:07:11 +00:00
parent 8003e3e30a
commit 79233ba5e5

View File

@@ -1343,6 +1343,9 @@ impl<'a, W: Write> Writer<'a, W> {
// `type(components)` where `components` is a comma separated list of constants
crate::ConstantInner::Composite { ty, ref components } => {
self.write_type(ty)?;
if let TypeInner::Array { size, .. } = self.module.types[ty].inner {
self.write_array_size(size)?;
}
write!(self.out, "(")?;
// Write the comma separated constants