Skip to content

Commit c01026f

Browse files
authored
New buffer,create:size mappedAtCreation behavior (#4370)
Matches spec updates made in gpuweb/gpuweb#5113 Now expects the browser to throw an error when a mappedAtCreation buffer does not use a size that is a multiple of 4.
1 parent ffad382 commit c01026f

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

src/webgpu/api/validation/buffer/create.spec.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,9 @@ g.test('size')
3636
const { mappedAtCreation, size } = t.params;
3737
const isValid = !mappedAtCreation || size % kBufferSizeAlignment === 0;
3838
const usage = BufferUsage.COPY_SRC;
39-
t.expectGPUError(
40-
'validation',
41-
() => t.createBufferTracked({ size, usage, mappedAtCreation }),
42-
!isValid
39+
40+
t.shouldThrow(isValid ? false : 'RangeError', () =>
41+
t.createBufferTracked({ size, usage, mappedAtCreation })
4342
);
4443
});
4544

0 commit comments

Comments
 (0)