properly update bind group ids when setting dynamic bindings. (#560)
This commit is contained in:
parent
028a22b129
commit
a768bae33b
@ -152,6 +152,7 @@ impl PipelineDescriptor {
|
||||
if !dynamic_bindings.is_empty() {
|
||||
// set binding uniforms to dynamic if render resource bindings use dynamic
|
||||
for bind_group in layout.bind_groups.iter_mut() {
|
||||
let mut binding_changed = false;
|
||||
for binding in bind_group.bindings.iter_mut() {
|
||||
let current = DynamicBinding {
|
||||
bind_group: bind_group.index,
|
||||
@ -164,9 +165,14 @@ impl PipelineDescriptor {
|
||||
} = binding.bind_type
|
||||
{
|
||||
*dynamic = true;
|
||||
binding_changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if binding_changed {
|
||||
bind_group.update_id();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user