d3d11: fix ASSERT() crash in d3d11::BindGroupTracker::unApplyNindGroup()
Bug: dawn:1705 Change-Id: I87d464c5321375a96aa4926a0968e6acab7194e4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/133760 Reviewed-by: Austin Eng <enga@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Peng Huang <penghuang@chromium.org>
This commit is contained in:
parent
3d3584793b
commit
956a2fc780
|
@ -101,10 +101,11 @@ MaybeError BindGroupTracker::Apply() {
|
|||
// conflict, we need to unbind groups which are not used by the new pipeline. and unbind groups
|
||||
// which are not inherited by the new pipeline.
|
||||
if (mLastAppliedPipelineLayout) {
|
||||
BindGroupLayoutMask unusedGroups = mLastAppliedPipelineLayout->GetBindGroupLayoutsMask() &
|
||||
~mPipelineLayout->GetBindGroupLayoutsMask();
|
||||
BindGroupLayoutMask lastGroups = mLastAppliedPipelineLayout->GetBindGroupLayoutsMask();
|
||||
BindGroupLayoutMask currentGroups = mPipelineLayout->GetBindGroupLayoutsMask();
|
||||
BindGroupLayoutMask unApplyGroups = (mDirtyBindGroups | ~currentGroups) & lastGroups;
|
||||
// Unset bind groups which are not used by the new pipeline and are not inherited.
|
||||
for (BindGroupIndex index : IterateBitSet(mDirtyBindGroups | unusedGroups)) {
|
||||
for (BindGroupIndex index : IterateBitSet(unApplyGroups)) {
|
||||
UnApplyBindGroup(index);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue