mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 16:37:08 +00:00
Fix null pointer dereference in CommandBufferStateTracker
The CommandBufferStateTracker dereferences a null pointer if there is no bind group set for an index of the layout Change-Id: Id247f9876340d189088e8bbe8cb4d68a4d517c6e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/6100 Commit-Queue: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
0bc168ed58
commit
27a294c2e8
@@ -91,7 +91,8 @@ namespace dawn_native {
|
||||
bool matches = true;
|
||||
|
||||
for (uint32_t i : IterateBitSet(mLastPipelineLayout->GetBindGroupLayoutsMask())) {
|
||||
if (mLastPipelineLayout->GetBindGroupLayout(i) != mBindgroups[i]->GetLayout()) {
|
||||
if (mBindgroups[i] == nullptr ||
|
||||
mLastPipelineLayout->GetBindGroupLayout(i) != mBindgroups[i]->GetLayout()) {
|
||||
matches = false;
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user