mirror of
https://github.com/bevyengine/bevy
synced 2024-11-22 20:53:53 +00:00
properly update bind group ids when setting dynamic bindings. (#560)
This commit is contained in:
parent
028a22b129
commit
a768bae33b
1 changed files with 6 additions and 0 deletions
|
@ -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 a new issue