[glsl-out] emit reflection info for non-struct uniforms (#2189)

This commit is contained in:
Rainb0w :3 2023-01-04 12:26:52 -07:00 committed by GitHub
parent 224ff3897d
commit e98bd9264c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3634,13 +3634,6 @@ impl<'a, W: Write> Writer<'a, W> {
continue; continue;
} }
match self.module.types[var.ty].inner { match self.module.types[var.ty].inner {
crate::TypeInner::Struct { .. } => match var.space {
crate::AddressSpace::Uniform | crate::AddressSpace::Storage { .. } => {
let name = self.reflection_names_globals[&handle].clone();
uniforms.insert(handle, name);
}
_ => (),
},
crate::TypeInner::Image { .. } => { crate::TypeInner::Image { .. } => {
let tex_name = self.reflection_names_globals[&handle].clone(); let tex_name = self.reflection_names_globals[&handle].clone();
match texture_mapping.entry(tex_name) { match texture_mapping.entry(tex_name) {
@ -3655,7 +3648,13 @@ impl<'a, W: Write> Writer<'a, W> {
} }
} }
} }
_ => {} _ => match var.space {
crate::AddressSpace::Uniform | crate::AddressSpace::Storage { .. } => {
let name = self.reflection_names_globals[&handle].clone();
uniforms.insert(handle, name);
}
_ => (),
},
} }
} }