mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-16 08:27:05 +00:00
Use whole size of buffer if binding buffer size is UINT64_MAX
Following WebGPU spec change at https://github.com/gpuweb/gpuweb/issues/331, bind groups in Dawn now use the whole size of the buffer if binding buffer size is UINT64_MAX. Bug: dawn:22 Change-Id: If28d905e634432755dad5c67c69eadedcee53dfe Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/8863 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Commit-Queue: François Beaufort <beaufort.francois@gmail.com>
This commit is contained in:
committed by
Commit Bot service account
parent
56a21a6151
commit
0326b8012b
@@ -370,6 +370,7 @@ TEST_F(BindGroupValidationTest, BufferBindingOOB) {
|
||||
|
||||
// Success case, touching the full buffer works
|
||||
utils::MakeBindGroup(device, layout, {{0, buffer, 0, 1024}});
|
||||
utils::MakeBindGroup(device, layout, {{0, buffer, 0, dawn::kWholeSize}});
|
||||
|
||||
// Error case, offset is OOB
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 256*5, 0}}));
|
||||
@@ -379,6 +380,7 @@ TEST_F(BindGroupValidationTest, BufferBindingOOB) {
|
||||
|
||||
// Error case, offset+size is OOB
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 1024, 1}}));
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 1, dawn::kWholeSize}}));
|
||||
|
||||
// Error case, offset+size overflows to be 0
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 256, uint32_t(0) - uint32_t(256)}}));
|
||||
|
||||
Reference in New Issue
Block a user