From 5a937b0e39eb56bab300ab9e2aecfefb27a342d2 Mon Sep 17 00:00:00 2001 From: ShrekShao <5031596+shrekshao@users.noreply.github.com> Date: Fri, 24 Jan 2025 17:33:35 -0800 Subject: [PATCH] Compat: fix more float16(32)-renderable tests (#4159) --- .../render_pipeline/pipeline_output_targets.spec.ts | 1 + src/webgpu/api/operation/texture_view/write.spec.ts | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/webgpu/api/operation/render_pipeline/pipeline_output_targets.spec.ts b/src/webgpu/api/operation/render_pipeline/pipeline_output_targets.spec.ts index 9fc0f1640e6..9f7db3d5416 100644 --- a/src/webgpu/api/operation/render_pipeline/pipeline_output_targets.spec.ts +++ b/src/webgpu/api/operation/render_pipeline/pipeline_output_targets.spec.ts @@ -161,6 +161,7 @@ g.test('color,component_count') .beforeAllSubcases(t => { const info = kTextureFormatInfo[t.params.format]; t.skipIfTextureFormatNotSupported(t.params.format); + t.selectDeviceForRenderableColorFormatOrSkipTestCase(t.params.format); t.selectDeviceOrSkipTestCase(info.feature); }) .fn(t => { diff --git a/src/webgpu/api/operation/texture_view/write.spec.ts b/src/webgpu/api/operation/texture_view/write.spec.ts index def11747053..465216e036c 100644 --- a/src/webgpu/api/operation/texture_view/write.spec.ts +++ b/src/webgpu/api/operation/texture_view/write.spec.ts @@ -341,7 +341,7 @@ TODO: Test rgb10a2uint when TexelRepresentation.numericRange is made per-compone .combine('viewUsageMethod', kTextureViewUsageMethods) ) .beforeAllSubcases(t => { - const { format, method } = t.params; + const { format, method, sampleCount } = t.params; t.skipIfTextureFormatNotSupported(format); switch (method) { @@ -349,6 +349,15 @@ TODO: Test rgb10a2uint when TexelRepresentation.numericRange is made per-compone case 'storage-write-fragment': // Still need to filter again for compat mode. t.skipIfTextureFormatNotUsableAsStorageTexture(format); + if (sampleCount > 1) { + t.skipIfMultisampleNotSupportedForFormat(format); + } + break; + case 'render-pass-resolve': + case 'render-pass-store': + // Requires multisample in `writeTextureAndGetExpectedTexelView` + t.skipIfMultisampleNotSupportedForFormat(format); + t.selectDeviceForRenderableColorFormatOrSkipTestCase(format); break; } })