Skip to content

Commit

Permalink
reflection_names_structs -> reflection_names_uniforms
Browse files Browse the repository at this point in the history
  • Loading branch information
jakobhellermann committed Jul 28, 2021
1 parent 231a59d commit b7364b0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/back/glsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ pub struct Writer<'a, W> {
/// (generated by a [`Namer`](crate::proc::Namer))
names: crate::FastHashMap<NameKey, String>,
/// A map with all the names needed for reflections
reflection_names_structs: crate::FastHashMap<Handle<crate::Type>, String>,
reflection_names_uniforms: crate::FastHashMap<Handle<crate::Type>, String>,
/// A map with the names of global variables needed for reflections
reflection_names_globals: crate::FastHashMap<Handle<crate::GlobalVariable>, String>,
/// The selected entry point
Expand Down Expand Up @@ -368,7 +368,7 @@ impl<'a, W: Write> Writer<'a, W> {
namer,
features: FeaturesManager::new(),
names,
reflection_names_structs: crate::FastHashMap::default(),
reflection_names_uniforms: crate::FastHashMap::default(),
reflection_names_globals: crate::FastHashMap::default(),
entry_point: &module.entry_points[ep_idx],
entry_point_idx: ep_idx as u16,
Expand Down Expand Up @@ -1239,7 +1239,7 @@ impl<'a, W: Write> Writer<'a, W> {
);
writeln!(self.out, "{} {{", block_name)?;

self.reflection_names_structs.insert(handle, block_name);
self.reflection_names_uniforms.insert(handle, block_name);
} else {
writeln!(self.out, "struct {} {{", name)?;
}
Expand Down Expand Up @@ -2472,9 +2472,9 @@ impl<'a, W: Write> Writer<'a, W> {
}
match self.module.types[var.ty].inner {
crate::TypeInner::Struct { .. } => match var.class {
crate::StorageClass::Uniform | crate::StorageClass::Storage { .. }=> {
let name = self.reflection_names_structs[&var.ty].clone();
uniforms.insert(handle, name);
crate::StorageClass::Uniform | crate::StorageClass::Storage { .. } => {
let name = self.reflection_names_uniforms[&var.ty].clone();
niforms.insert(handle, name);
}
_ => (),
},
Expand Down

0 comments on commit b7364b0

Please sign in to comment.