mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-14 15:46:28 +00:00
Adding multiple of 4 validation on indirect draws and dispatches
Bug: dawn:538 Change-Id: I6f4d8fb73a9fff910bdcd105f66299dc6afb61cd Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/29761 Commit-Queue: Enrico Galli <enrico.galli@intel.com> Reviewed-by: Austin Eng <enga@chromium.org>
This commit is contained in:
committed by
Commit Bot service account
parent
793a07e366
commit
1c25198384
@@ -74,6 +74,10 @@ TEST_F(ComputeIndirectValidationTest, IndirectOffsetBounds) {
|
||||
// In bounds, bigger buffer, positive offset
|
||||
TestIndirectOffset(utils::Expectation::Success, {1, 2, 3, 4, 5, 6}, 3 * sizeof(uint32_t));
|
||||
|
||||
// In bounds, non-multiple of 4 offsets
|
||||
TestIndirectOffset(utils::Expectation::Failure, {1, 2, 3, 4}, 1);
|
||||
TestIndirectOffset(utils::Expectation::Failure, {1, 2, 3, 4}, 2);
|
||||
|
||||
// Out of bounds, buffer too small
|
||||
TestIndirectOffset(utils::Expectation::Failure, {1, 2}, 0);
|
||||
// Out of bounds, index too big
|
||||
|
||||
@@ -107,6 +107,10 @@ TEST_F(DrawIndirectValidationTest, DrawIndirectOffsetBounds) {
|
||||
TestIndirectOffsetDraw(utils::Expectation::Success, {1, 2, 3, 4, 5, 6, 7, 8},
|
||||
4 * sizeof(uint32_t));
|
||||
|
||||
// In bounds, non-multiple of 4 offsets
|
||||
TestIndirectOffsetDraw(utils::Expectation::Failure, {1, 2, 3, 4, 5}, 1);
|
||||
TestIndirectOffsetDraw(utils::Expectation::Failure, {1, 2, 3, 4, 5}, 2);
|
||||
|
||||
// Out of bounds, buffer too small
|
||||
TestIndirectOffsetDraw(utils::Expectation::Failure, {1, 2, 3}, 0);
|
||||
// Out of bounds, index too big
|
||||
@@ -128,6 +132,10 @@ TEST_F(DrawIndirectValidationTest, DrawIndexedIndirectOffsetBounds) {
|
||||
TestIndirectOffsetDrawIndexed(utils::Expectation::Success, {1, 2, 3, 4, 5, 6, 7, 8, 9, 10},
|
||||
5 * sizeof(uint32_t));
|
||||
|
||||
// In bounds, non-multiple of 4 offsets
|
||||
TestIndirectOffsetDrawIndexed(utils::Expectation::Failure, {1, 2, 3, 4, 5, 6}, 1);
|
||||
TestIndirectOffsetDrawIndexed(utils::Expectation::Failure, {1, 2, 3, 4, 5, 6}, 2);
|
||||
|
||||
// Out of bounds, buffer too small
|
||||
TestIndirectOffsetDrawIndexed(utils::Expectation::Failure, {1, 2, 3, 4}, 0);
|
||||
// Out of bounds, index too big
|
||||
|
||||
Reference in New Issue
Block a user