Track pipeline layout lifetime

This commit is contained in:
Dzmitry Malyshau committed 2020-04-15 18:54:50 -04:00
1 parent 2a535d24c3
commit fe92b3fec9
6 files changed
+88 -35

No files matched your search

+3 -3
View File
@@ -176,9 +176,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}
// Rebind resources
if binder.pipeline_layout_id != Some(pipeline.layout_id) {
let pipeline_layout = &pipeline_layout_guard[pipeline.layout_id];
binder.pipeline_layout_id = Some(pipeline.layout_id);
if binder.pipeline_layout_id != Some(pipeline.layout_id.value) {
let pipeline_layout = &pipeline_layout_guard[pipeline.layout_id.value];
binder.pipeline_layout_id = Some(pipeline.layout_id.value);
binder.reset_expectations(pipeline_layout.bind_group_layout_ids.len());
let mut is_compatible = true;
+3 -3
View File
@@ -895,9 +895,9 @@ impl<G: GlobalIdentityHandlerFactory> Global<G> {
}
// Rebind resource
if state.binder.pipeline_layout_id != Some(pipeline.layout_id) {
let pipeline_layout = &pipeline_layout_guard[pipeline.layout_id];
state.binder.pipeline_layout_id = Some(pipeline.layout_id);
if state.binder.pipeline_layout_id != Some(pipeline.layout_id.value) {
let pipeline_layout = &pipeline_layout_guard[pipeline.layout_id.value];
state.binder.pipeline_layout_id = Some(pipeline.layout_id.value);
state
.binder
.reset_expectations(pipeline_layout.bind_group_layout_ids.len());