From a72996c5de6f686b21989f5a575bcf1b40f6a766 Mon Sep 17 00:00:00 2001 From: Corentin Wallez Date: Wed, 28 Aug 2024 20:58:42 +0200 Subject: [PATCH] Skip tests failing when VideoFrame is not supported. (#3917) --- .../execution/expression/call/builtin/textureLoad.spec.ts | 4 ++++ .../call/builtin/textureSampleBaseClampToEdge.spec.ts | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/src/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.ts index 534bf17c5c6e..2f42fffeb768 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/textureLoad.spec.ts @@ -471,6 +471,9 @@ Parameters: .combine('C', ['i32', 'u32'] as const) .combine('L', ['i32', 'u32'] as const) ) + .beforeAllSubcases(t => + t.skipIf(typeof VideoFrame === 'undefined', 'VideoFrames are not supported') + ) .fn(async t => { const { samplePoints, C, L } = t.params; @@ -483,6 +486,7 @@ Parameters: size, usage: GPUTextureUsage.COPY_DST, }; + const { texels, videoFrame } = createVideoFrameWithRandomDataAndGetTexels(descriptor.size); const texture = t.device.importExternalTexture({ source: videoFrame }); diff --git a/src/webgpu/shader/execution/expression/call/builtin/textureSampleBaseClampToEdge.spec.ts b/src/webgpu/shader/execution/expression/call/builtin/textureSampleBaseClampToEdge.spec.ts index 452c3b4df710..b670c44035f9 100644 --- a/src/webgpu/shader/execution/expression/call/builtin/textureSampleBaseClampToEdge.spec.ts +++ b/src/webgpu/shader/execution/expression/call/builtin/textureSampleBaseClampToEdge.spec.ts @@ -61,6 +61,12 @@ Parameters: .combine('addressModeV', ['clamp-to-edge', 'repeat', 'mirror-repeat'] as const) .combine('minFilter', ['nearest', 'linear'] as const) ) + .beforeAllSubcases(t => + t.skipIf( + t.params.textureType === 'texture_external' && typeof VideoFrame === 'undefined', + 'VideoFrames are not supported' + ) + ) .fn(async t => { const { textureType, samplePoints, addressModeU, addressModeV, minFilter } = t.params;