mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Check bindgroup validity first in SetBindGroup
bindgroup->GetLayout() was called before checking the bindgroup is an error, causing an assert to fire in Debug. Adds a regression unittest. BUG=dawn:196 Change-Id: I58e95879a7f2a7cf5c47c7b228f7e3b5bb72d8ea Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/9560 Commit-Queue: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
34f8bd8c48
commit
7b57c5bb77
@@ -729,3 +729,15 @@ TEST_F(SetBindGroupValidationTest, BindingSizeOutOfBoundDynamicStorageBuffer) {
|
||||
|
||||
TestComputePassBindGroup(bindGroup, offsets.data(), 2, false);
|
||||
}
|
||||
|
||||
// Test that an error is produced (and no ASSERTs fired) when using an error bindgroup in
|
||||
// SetBindGroup
|
||||
TEST_F(SetBindGroupValidationTest, ErrorBindGroup) {
|
||||
// Bindgroup creation fails because not all bindings are specified.
|
||||
dawn::BindGroup bindGroup;
|
||||
ASSERT_DEVICE_ERROR(bindGroup = utils::MakeBindGroup(device, mBindGroupLayout, {}));
|
||||
|
||||
TestRenderPassBindGroup(bindGroup, nullptr, 0, false);
|
||||
|
||||
TestComputePassBindGroup(bindGroup, nullptr, 0, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user