mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-17 08:57:26 +00:00
Fix wgpu::WholeSize to count until the end of the buffer.
Bug: dawn:377 Change-Id: Ia829ec05e5dd6a218b7f1c1bb7bdaf39088bdf70 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/18960 Commit-Queue: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Austin Eng <enga@chromium.org> Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
36cd17488a
commit
ff77ffee1a
@@ -429,6 +429,9 @@ TEST_F(BindGroupValidationTest, BufferBindingOOB) {
|
||||
utils::MakeBindGroup(device, layout, {{0, buffer, 0, 1024}});
|
||||
utils::MakeBindGroup(device, layout, {{0, buffer, 0, wgpu::kWholeSize}});
|
||||
|
||||
// Success case, whole size causes the rest of the buffer to be used but not beyond.
|
||||
utils::MakeBindGroup(device, layout, {{0, buffer, 256, wgpu::kWholeSize}});
|
||||
|
||||
// Error case, offset is OOB
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 256*5, 0}}));
|
||||
|
||||
@@ -437,7 +440,6 @@ TEST_F(BindGroupValidationTest, BufferBindingOOB) {
|
||||
|
||||
// Error case, offset+size is OOB
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 1024, 256}}));
|
||||
ASSERT_DEVICE_ERROR(utils::MakeBindGroup(device, layout, {{0, buffer, 256, wgpu::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