Skip to content

Commit

Permalink
rename skipIfMultisampleNotSupportedForFormat
Browse files Browse the repository at this point in the history
  • Loading branch information
shrekshao committed Jan 29, 2025
1 parent 709df9b commit 33947d8
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/webgpu/api/operation/texture_view/write.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -350,13 +350,13 @@ TODO: Test rgb10a2uint when TexelRepresentation.numericRange is made per-compone
// Still need to filter again for compat mode.
t.skipIfTextureFormatNotUsableAsStorageTexture(format);
if (sampleCount > 1) {
t.skipIfMultisampleNotSupportedForFormatOrSelectDevice(format);
t.skipIfMultisampleNotSupportedForFormat(format);
}
break;
case 'render-pass-resolve':
case 'render-pass-store':
// Requires multisample in `writeTextureAndGetExpectedTexelView`
t.skipIfMultisampleNotSupportedForFormatOrSelectDevice(format);
t.skipIfMultisampleNotSupportedForFormat(format);
break;
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1170,7 +1170,7 @@ g.test('resolveTarget,format_supports_resolve')
.beforeAllSubcases(t => {
const { format } = t.params;
t.skipIfTextureFormatNotSupported(format);
t.skipIfMultisampleNotSupportedForFormatOrSelectDevice(format);
t.skipIfMultisampleNotSupportedForFormat(format);
})
.fn(t => {
const { format } = t.params;
Expand Down
4 changes: 1 addition & 3 deletions src/webgpu/gpu_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,7 @@ export class GPUTestSubcaseBatchState extends SubcaseBatchState {
}
}

skipIfMultisampleNotSupportedForFormatOrSelectDevice(
...formats: (GPUTextureFormat | undefined)[]
) {
skipIfMultisampleNotSupportedForFormat(...formats: (GPUTextureFormat | undefined)[]) {
for (const format of formats) {
if (format === undefined) continue;
if (!isMultisampledTextureFormat(format, this.isCompatibility)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ Parameters:
t.skipIfTextureFormatNotSupported(t.params.format);
if (t.params.samples > 1) {
// multisampled texture requires GPUTextureUsage.RENDER_ATTACHMENT usage
t.skipIfMultisampleNotSupportedForFormatOrSelectDevice(t.params.format);
t.skipIfMultisampleNotSupportedForFormat(t.params.format);
}
t.selectDeviceOrSkipTestCase(info.feature);
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ Parameters:
const { format, texture_type } = t.params;
t.skipIfTextureFormatNotSupported(format);
t.skipIfTextureLoadNotSupportedForTextureType(texture_type);
t.skipIfMultisampleNotSupportedForFormatOrSelectDevice(format);
t.skipIfMultisampleNotSupportedForFormat(format);
})
.fn(async t => {
const { texture_type, format, stage, samplePoints, C, S } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ g.test('readTextureToTexelViews')
.beforeAllSubcases(t => {
t.skipIfTextureViewDimensionNotSupported(t.params.viewDimension);
// recheck if multisampled is supported with compat mode flag
t.skipIfMultisampleNotSupportedForFormatOrSelectDevice(t.params.srcFormat);
t.skipIfMultisampleNotSupportedForFormat(t.params.srcFormat);
})
.fn(async t => {
const { srcFormat, texelViewFormat, viewDimension, sampleCount } = t.params;
Expand Down

0 comments on commit 33947d8

Please sign in to comment.