small notes

This commit is contained in:
Carter Anderson 2020-04-14 11:04:25 -07:00
parent a99b5600bc
commit 537d75bbce
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,6 @@ pub struct RenderResourceAssignments {
HashMap<BindGroupDescriptorId, (RenderResourceSetId, Option<Vec<u32>>)>, HashMap<BindGroupDescriptorId, (RenderResourceSetId, Option<Vec<u32>>)>,
dirty_bind_groups: HashSet<BindGroupDescriptorId>, dirty_bind_groups: HashSet<BindGroupDescriptorId>,
pub(crate) shader_defs: HashSet<String>, pub(crate) shader_defs: HashSet<String>,
// TODO: move offsets here to reduce hashing costs?
} }
impl RenderResourceAssignments { impl RenderResourceAssignments {

View File

@ -189,7 +189,7 @@ where
let uniforms = assets let uniforms = assets
.get(&handle) .get(&handle)
.expect("Handle points to a non-existent resource"); .expect("Handle points to a non-existent resource");
// TODO: only increment count if we haven't seen this uniform handle before
self.increment_uniform_counts(&uniforms); self.increment_uniform_counts(&uniforms);
} }
} }
@ -493,6 +493,7 @@ where
let uniforms = assets let uniforms = assets
.get(&handle) .get(&handle)
.expect("Handle points to a non-existent resource"); .expect("Handle points to a non-existent resource");
// TODO: only setup buffer if we haven't seen this handle before
self.setup_uniform_buffer_resources( self.setup_uniform_buffer_resources(
&uniforms, &uniforms,
render_resources, render_resources,