From bf2fbafc4d814d45259ec6b02e48280b3d04dbb0 Mon Sep 17 00:00:00 2001 From: Shrek Shao Date: Tue, 24 Sep 2024 13:01:54 -0700 Subject: [PATCH] Fix textureNumLayers view_type subcase --- .../call/builtin/textureNumLayers.spec.ts | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/webgpu/shader/execution/expression/call/builtin/textureNumLayers.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/textureNumLayers.spec.ts index ca7ae3d0655c..500376321444 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/textureNumLayers.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/textureNumLayers.spec.ts @@ -51,13 +51,13 @@ Parameters .params(u => u .combine('texture_type', ['texture_2d_array', 'texture_cube_array'] as const) + .combine('view_type', ['full', 'partial'] as const) .beginSubcases() .combine('sampled_type', ['f32', 'i32', 'u32'] as const) - .combine('view_type', ['full', 'partial'] as const) ) .beforeAllSubcases(t => { t.skipIf( - t.isCompatibility && t.params.view === 'partial', + t.isCompatibility && t.params.view_type === 'partial', 'compatibility mode does not support partial layer views' ); t.skipIf( @@ -110,12 +110,11 @@ Parameters .params(u => u .combine('texture_type', ['texture_depth_2d_array', 'texture_depth_cube_array'] as const) - .beginSubcases() .combine('view_type', ['full', 'partial'] as const) ) .beforeAllSubcases(t => { t.skipIf( - t.isCompatibility && t.params.view === 'partial', + t.isCompatibility && t.params.view_type === 'partial', 'compatibility mode does not support partial layer views' ); t.skipIf( @@ -184,14 +183,20 @@ Parameters .params(u => u .combineWithParams(TexelFormats) + .combine('view_type', ['full', 'partial'] as const) .beginSubcases() .combine('access_mode', ['read', 'write', 'read_write'] as const) .filter( t => t.access_mode !== 'read_write' || kTextureFormatInfo[t.format].color?.readWriteStorage ) - .combine('view_type', ['full', 'partial'] as const) ) - .beforeAllSubcases(t => t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format)) + .beforeAllSubcases(t => { + t.skipIf( + t.isCompatibility && t.params.view_type === 'partial', + 'compatibility mode does not support partial layer views' + ); + t.skipIfTextureFormatNotUsableAsStorageTexture(t.params.format); + }) .fn(t => { const { format, access_mode, view_type } = t.params;