diff --git a/src/webgpu/api/validation/encoding/cmds/index_access.spec.ts b/src/webgpu/api/validation/encoding/cmds/index_access.spec.ts index 6c6ff908e01b..cb1aaecb60b7 100644 --- a/src/webgpu/api/validation/encoding/cmds/index_access.spec.ts +++ b/src/webgpu/api/validation/encoding/cmds/index_access.spec.ts @@ -129,17 +129,22 @@ class F extends ValidationTest { export const g = makeTestGroup(F); g.test('out_of_bounds') - .params( - params() - .combine(pbool('indirect')) // indirect drawIndexed - .combine([ - { indexCount: 6, firstIndex: 1 }, // indexCount + firstIndex out of bound - { indexCount: 6, firstIndex: 6 }, // only firstIndex out of bound - { indexCount: 6, firstIndex: 10000 }, // firstIndex much larger than the bound - { indexCount: 7, firstIndex: 0 }, // only indexCount out of bound - { indexCount: 10000, firstIndex: 0 }, // indexCount much larger than the bound - ] as const) - .combine(poptions('instanceCount', [1, 10000])) // normal and large instanceCount + .cases(pbool('indirect')) + .subcases( + () => + params() + .combine([ + { indexCount: 6, firstIndex: 1 }, // indexCount + firstIndex out of bound + { indexCount: 0, firstIndex: 6 }, // indexCount is 0 but firstIndex out of bound + { indexCount: 6, firstIndex: 6 }, // only firstIndex out of bound + { indexCount: 6, firstIndex: 10000 }, // firstIndex much larger than the bound + { indexCount: 7, firstIndex: 0 }, // only indexCount out of bound + { indexCount: 10000, firstIndex: 0 }, // indexCount much larger than the bound + { indexCount: 0xffffffff, firstIndex: 0xffffffff }, // max uint32 value + { indexCount: 0xffffffff, firstIndex: 2 }, // max uint32 indexCount and small firstIndex + { indexCount: 2, firstIndex: 0xffffffff }, // small indexCount and max uint32 firstIndex + ] as const) + .combine(poptions('instanceCount', [1, 10000])) // normal and large instanceCount ) .fn(t => { const { indirect, indexCount, firstIndex, instanceCount } = t.params;