Skip to content

Commit

Permalink
fix review
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao committed Jan 28, 2025
1 parent 5afe658 commit 672c5d6
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/webgpu/api/validation/createTexture.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import {
viewCompatible,
textureDimensionAndFormatCompatible,
isTextureFormatUsableAsStorageFormat,
isMultisampledTextureFormat,
} from '../../format_info.js';
import { maxMipLevelCount } from '../../util/texture/base.js';

Expand Down Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 672c5d6

Please sign in to comment.