From 672c5d605ce4b271907beca12a78058ca5c2ff23 Mon Sep 17 00:00:00 2001 From: Shrek Shao Date: Tue, 28 Jan 2025 11:45:29 -0800 Subject: [PATCH] fix review --- src/webgpu/api/validation/createTexture.spec.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/webgpu/api/validation/createTexture.spec.ts b/src/webgpu/api/validation/createTexture.spec.ts index 037a8fe23c9..52cbda19f38 100644 --- a/src/webgpu/api/validation/createTexture.spec.ts +++ b/src/webgpu/api/validation/createTexture.spec.ts @@ -16,6 +16,7 @@ import { viewCompatible, textureDimensionAndFormatCompatible, isTextureFormatUsableAsStorageFormat, + isMultisampledTextureFormat, } from '../../format_info.js'; import { maxMipLevelCount } from '../../util/texture/base.js'; @@ -288,10 +289,6 @@ g.test('sampleCount,various_sampleCount_with_all_formats') const { dimension, sampleCount, format } = t.params; const info = kTextureFormatInfo[format]; - if (sampleCount > 1) { - t.skipIfMultisampleNotSupportedForFormat(format); - } - const usage = sampleCount > 1 ? GPUTextureUsage.TEXTURE_BINDING | GPUTextureUsage.RENDER_ATTACHMENT @@ -304,7 +301,9 @@ g.test('sampleCount,various_sampleCount_with_all_formats') usage, }; - const success = sampleCount === 1 || (sampleCount === 4 && info.multisample); + const success = + sampleCount === 1 || + (sampleCount === 4 && isMultisampledTextureFormat(format, t.isCompatibility)); t.expectValidationError(() => { t.createTextureTracked(descriptor);