From 25773c052d06d1eeacce9695ea55bac6e79a2cf3 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Thu, 25 Jan 2024 13:40:03 -0800 Subject: [PATCH] Compat: Fix readonly depth-stencil sampling --- .../memory_sync/texture/readonly_depth_stencil.spec.ts | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/webgpu/api/operation/memory_sync/texture/readonly_depth_stencil.spec.ts b/src/webgpu/api/operation/memory_sync/texture/readonly_depth_stencil.spec.ts index 6a307c88e311..3c381f1c1fc4 100644 --- a/src/webgpu/api/operation/memory_sync/texture/readonly_depth_stencil.spec.ts +++ b/src/webgpu/api/operation/memory_sync/texture/readonly_depth_stencil.spec.ts @@ -31,7 +31,16 @@ testing while the other one is used for sampling. }) ) .beforeAllSubcases(t => { + const { format } = t.params; + const formatInfo = kTextureFormatInfo[format]; + const hasDepth = formatInfo.depth !== undefined; + const hasStencil = formatInfo.stencil !== undefined; + t.selectDeviceForTextureFormatOrSkipTestCase(t.params.format); + t.skipIf( + t.isCompatibility && hasDepth && hasStencil, + 'compatibility mode does not support different TEXTURE_BINDING views of the same texture in a single draw calls' + ); }) .fn(t => { const { format, depthReadOnly, stencilReadOnly } = t.params;