Skip to content

Commit f793370

Browse files
Restrict transient textures to 2d (#4531)
1 parent 3597f03 commit f793370

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,9 @@ g.test('texture_usage')
10571057
if (isColorTextureFormat(format) && !isTextureFormatColorRenderable(t.device, format))
10581058
success = false;
10591059
}
1060+
if (usage & GPUTextureUsage.TRANSIENT_ATTACHMENT) {
1061+
if (appliedDimension !== '2d') success = false;
1062+
}
10601063

10611064
t.expectValidationError(() => {
10621065
t.createTextureTracked(descriptor);

0 commit comments

Comments
 (0)