mirror of
https://github.com/gfx-rs/wgpu.git
synced 2024-11-29 10:13:34 +00:00
[glsl-out] emit reflection info for non-struct uniforms (#2189)
This commit is contained in:
parent
224ff3897d
commit
e98bd9264c
@ -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);
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user