Skip to content

Commit

Permalink
[glsl-out] emit reflection info for non-struct uniforms (gfx-rs#2189)
Browse files Browse the repository at this point in the history
  • Loading branch information
Rainb0wCodes authored Jan 4, 2023
1 parent 224ff38 commit e98bd92
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/back/glsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3634,13 +3634,6 @@ impl<'a, W: Write> Writer<'a, W> {
continue;
}
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 { .. } => {
let tex_name = self.reflection_names_globals[&handle].clone();
match texture_mapping.entry(tex_name) {
Expand All @@ -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);
}
_ => (),
},
}
}

Expand Down

0 comments on commit e98bd92

Please sign in to comment.