Skip to content

Commit 7ca54d7

Browse files
committed
Compat: fix createBindGroup validation test for compat
In compat certain textureBindingViewDimemsion must match the view dimension so skip tests when they don't Note: That these cases are correctly rejected is tested in the webgpu:compat,* tests.
1 parent 8406040 commit 7ca54d7

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/webgpu/api/validation/createBindGroup.spec.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,6 +313,19 @@ g.test('texture_must_have_correct_dimension')
313313
});
314314

315315
t.skipIfTextureViewDimensionNotSupported(viewDimension, dimension);
316+
if (t.isCompatibility && texture.dimension === '2d') {
317+
if (depthOrArrayLayers === 1) {
318+
t.skipIf(
319+
viewDimension !== '2d',
320+
'1 layer 2d textures default to textureBindingViewDimension: "2d" in compat mode'
321+
);
322+
} else {
323+
t.skipIf(
324+
viewDimension !== '2d-array',
325+
'> 1 layer 2d textures default to textureBindingViewDimension "2d-array" in compat mode'
326+
);
327+
}
328+
}
316329

317330
const shouldError = viewDimension !== dimension;
318331
const textureView = texture.createView({ dimension });

0 commit comments

Comments
 (0)