Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove checks for skipIfColorRenderableNotSupportedForFormat #4179

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/webgpu/api/operation/render_pass/storeOp.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ g.test('render_pass_store_op,color_attachment_only')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.colorFormat);
t.skipIfColorRenderableNotSupportedForFormat(t.params.colorFormat);
})
.fn(t => {
const colorAttachment = t.createTextureTracked({
Expand Down
3 changes: 0 additions & 3 deletions src/webgpu/api/operation/render_pipeline/overrides.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,6 @@ g.test('precision')
},
])
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat(kPrecisionTestFormat);
})
.fn(async t => {
const format = kPrecisionTestFormat;
await t.ExpectShaderOutputWithConstants(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ g.test('color,attachments')
.beforeAllSubcases(t => {
const info = kTextureFormatInfo[t.params.format];
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
t.selectDeviceOrSkipTestCase(info.feature);
})
.fn(t => {
Expand Down Expand Up @@ -161,7 +160,6 @@ g.test('color,component_count')
.beforeAllSubcases(t => {
const info = kTextureFormatInfo[t.params.format];
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
t.selectDeviceOrSkipTestCase(info.feature);
})
.fn(t => {
Expand Down
5 changes: 0 additions & 5 deletions src/webgpu/api/operation/rendering/color_target_state.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ g.test('blending,GPUBlendComponent')
) {
t.selectDeviceOrSkipTestCase('dual-source-blending');
}
t.skipIfColorRenderableNotSupportedForFormat(kBlendingGPUBlendComponentFormat);
})
.fn(t => {
const textureFormat: GPUTextureFormat = kBlendingGPUBlendComponentFormat;
Expand Down Expand Up @@ -395,7 +394,6 @@ g.test('blending,formats')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { format } = t.params;
Expand Down Expand Up @@ -800,9 +798,6 @@ g.test('blending,clamping')
.combine('srcValue', [0.4, 0.6, 0.8, 1.0])
.combine('dstValue', [0.2, 0.4])
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { format, srcValue, dstValue } = t.params;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ g.test('uninitialized_texture_is_zero')
.params(kTestParams)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
t.selectDeviceOrSkipTestCase(kTextureFormatInfo[t.params.format].feature);
})
.fn(t => {
Expand Down
5 changes: 0 additions & 5 deletions src/webgpu/api/operation/sampling/filter_mode.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@ g.test('magFilter,nearest')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
if (kTextureFormatInfo[t.params.format].color.type === 'unfilterable-float') {
t.selectDeviceOrSkipTestCase('float32-filterable');
}
Expand Down Expand Up @@ -605,7 +604,6 @@ g.test('magFilter,linear')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
if (kTextureFormatInfo[t.params.format].color.type === 'unfilterable-float') {
t.selectDeviceOrSkipTestCase('float32-filterable');
}
Expand Down Expand Up @@ -741,7 +739,6 @@ g.test('minFilter,nearest')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
if (kTextureFormatInfo[t.params.format].color.type === 'unfilterable-float') {
t.selectDeviceOrSkipTestCase('float32-filterable');
}
Expand Down Expand Up @@ -875,7 +872,6 @@ g.test('minFilter,linear')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
if (kTextureFormatInfo[t.params.format].color.type === 'unfilterable-float') {
t.selectDeviceOrSkipTestCase('float32-filterable');
}
Expand Down Expand Up @@ -972,7 +968,6 @@ g.test('mipmapFilter')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
if (kTextureFormatInfo[t.params.format].color.type === 'unfilterable-float') {
t.selectDeviceOrSkipTestCase('float32-filterable');
}
Expand Down
3 changes: 0 additions & 3 deletions src/webgpu/api/validation/createBindGroup.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,6 @@ g.test('texture_binding_must_have_correct_usage')
return usage === GPUConst.TextureUsage.STORAGE_BINDING && info.resource === 'sampledTexMS';
})
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat(kTestFormat);
})
.fn(t => {
const { entry, usage } = t.params;
const info = texBindingTypeInfo(entry);
Expand Down
3 changes: 0 additions & 3 deletions src/webgpu/api/validation/createTexture.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,6 @@ g.test('sampleCount,various_sampleCount_with_all_formats')
const { format } = t.params;
const info = kTextureFormatInfo[format];
t.skipIfTextureFormatNotSupported(format);
t.skipIfColorRenderableNotSupportedForFormat(format);
t.selectDeviceOrSkipTestCase(info.feature);
})
.fn(t => {
Expand Down Expand Up @@ -359,7 +358,6 @@ g.test('sampleCount,valid_sampleCount_with_other_parameter_varies')
const info = kTextureFormatInfo[format];
t.skipIfTextureFormatNotSupported(format);
t.selectDeviceOrSkipTestCase(info.feature);
t.skipIfColorRenderableNotSupportedForFormat(format);
})
.fn(t => {
const { dimension, sampleCount, format, mipLevelCount, arrayLayerCount, usage } = t.params;
Expand Down Expand Up @@ -1053,7 +1051,6 @@ g.test('texture_usage')
const info = kTextureFormatInfo[format];
t.skipIfTextureFormatNotSupported(format);
t.selectDeviceOrSkipTestCase(info.feature);
t.skipIfColorRenderableNotSupportedForFormat(format);
})
.fn(t => {
const { dimension, format, usage0, usage1 } = t.params;
Expand Down
3 changes: 0 additions & 3 deletions src/webgpu/api/validation/createView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,6 @@ g.test('texture_view_usage')
if (textureUsage & GPUTextureUsage.STORAGE_BINDING) {
t.skipIfTextureFormatNotUsableAsStorageTexture(format);
}
if (textureUsage & GPUTextureUsage.RENDER_ATTACHMENT) {
t.skipIfColorRenderableNotSupportedForFormat(format);
}
})
.fn(t => {
const { format, textureUsage0, textureUsage1, textureViewUsage0, textureViewUsage1 } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ import {
kTextureFormatInfo,
kRenderableColorTextureFormats,
} from '../../../format_info.js';
import { MaxLimitsTestMixin } from '../../../gpu_test.js';
import { ValidationTest } from '../validation_test.js';

// MAINTENANCE_TODO: This should be changed to kMaxColorAttachmentsToTest
// when this is made a MaxLimitTest (see above).
const kMaxColorAttachments = getDefaultLimits('core').maxColorAttachments.default;

export const g = makeTestGroup(ValidationTest);
export const g = makeTestGroup(MaxLimitsTestMixin(ValidationTest));

g.test('attachment_state,limits,maxColorAttachments')
.desc(`Tests that attachment state must have <= device.limits.maxColorAttachments.`)
Expand Down Expand Up @@ -63,7 +64,6 @@ g.test('attachment_state,limits,maxColorAttachmentBytesPerSample,aligned')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { format, colorFormatCount } = t.params;
Expand Down Expand Up @@ -119,9 +119,6 @@ g.test('attachment_state,limits,maxColorAttachmentBytesPerSample,unaligned')
},
])
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat('r32float');
})
.fn(t => {
const { formats } = t.params;

Expand Down Expand Up @@ -172,7 +169,6 @@ g.test('valid_texture_formats')
.beforeAllSubcases(t => {
const { format } = t.params;
t.selectDeviceForTextureFormatOrSkipTestCase(format);
t.skipIfColorRenderableNotSupportedForFormat(format);
})
.fn(t => {
const { format, attachment } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,6 @@ g.test('destination_texture,format')
const { format } = t.params;
t.skipIfTextureFormatNotSupported(format);
t.selectDeviceOrSkipTestCase(kTextureFormatInfo[format].feature);
t.skipIfColorRenderableNotSupportedForFormat(format);
})
.fn(async t => {
const { format, copySize } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ g.test('render_pass_and_bundle,color_format')
const { passFormat, bundleFormat } = t.params;

t.skipIfTextureFormatNotSupported(passFormat, bundleFormat);
t.skipIfColorRenderableNotSupportedForFormat(passFormat, bundleFormat);

const bundleEncoder = t.device.createRenderBundleEncoder({
colorFormats: [bundleFormat],
Expand Down Expand Up @@ -391,7 +390,6 @@ Test that color attachment formats in render passes or bundles match the pipelin
const { encoderType, encoderFormat, pipelineFormat } = t.params;

t.skipIfTextureFormatNotSupported(encoderFormat, pipelineFormat);
t.skipIfColorRenderableNotSupportedForFormat(encoderFormat, pipelineFormat);

const pipeline = t.createRenderPipeline([{ format: pipelineFormat, writeMask: 0 }]);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ g.test('color_attachments,limits,maxColorAttachmentBytesPerSample,aligned')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { format, attachmentCount } = t.params;
Expand Down Expand Up @@ -268,9 +267,6 @@ g.test('color_attachments,limits,maxColorAttachmentBytesPerSample,unaligned')
},
])
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat('r32float');
})
.fn(t => {
const { formats } = t.params;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ pipeline that uses blending with any float32-format attachment.
if (t.params.enabled) {
t.selectDeviceOrSkipTestCase('float32-blendable');
}
t.skipIfColorRenderableNotSupportedForFormat('r32float');
})
.fn(t => {
const { isAsync, enabled, hasBlend, format } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ g.test('limits,maxColorAttachmentBytesPerSample,aligned')
)
.beforeAllSubcases(t => {
t.skipIfTextureFormatNotSupported(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { format, attachmentCount, isAsync } = t.params;
Expand Down Expand Up @@ -229,9 +228,6 @@ g.test('limits,maxColorAttachmentBytesPerSample,unaligned')
.beginSubcases()
.combine('isAsync', [false, true])
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat('r32float');
})
.fn(t => {
const { formats, isAsync } = t.params;

Expand Down Expand Up @@ -269,7 +265,6 @@ g.test('targets_format_filterable')
const { format } = t.params;
const info = kTextureFormatInfo[format];
t.skipIfTextureFormatNotSupported(format);
t.skipIfColorRenderableNotSupportedForFormat(format);
t.selectDeviceOrSkipTestCase(info.feature);
})
.fn(t => {
Expand Down Expand Up @@ -399,7 +394,6 @@ g.test('pipeline_output_targets')
)
.beforeAllSubcases(t => {
t.selectDeviceForTextureFormatOrSkipTestCase(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { isAsync, format, writeMask, shaderOutput } = t.params;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,6 @@ g.test('subresources,color_attachments')
.combine('inSamePass', [true, false])
.unless(t => t.inSamePass && t.level0 !== t.level1)
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat('r32float');
})
.fn(t => {
const { layer0, level0, layer1, level1, inSamePass } = t.params;

Expand Down Expand Up @@ -197,7 +194,6 @@ g.test('subresources,color_attachment_and_bind_group')
t.params.bgLayerCount !== kTextureLayers,
'view array layers must equal texture array layers in compatibility mode'
);
t.skipIfColorRenderableNotSupportedForFormat('r32float');
}
})
.fn(t => {
Expand Down Expand Up @@ -476,7 +472,6 @@ g.test('subresources,multiple_bind_groups')
t.params.bg0Layers.count !== kTextureLayers || t.params.bg1Layers.count !== kTextureLayers,
'view array layers must equal texture array layers in compatibility mode'
);
t.skipIfColorRenderableNotSupportedForFormat('r32float');
}
})
.fn(t => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -520,9 +520,6 @@ g.test('subresources,texture_usages_in_copy_and_render_pass')
usage1 === 'copy-dst'
)
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat('r32float');
})
.fn(t => {
const { usage0, usage1 } = t.params;

Expand Down Expand Up @@ -618,11 +615,6 @@ g.test('subresources,texture_view_usages')
.combine('bindingType', ['color-attachment', ...kTextureBindingTypes] as const)
.combine('viewUsage', [0, ...kTextureUsages])
)
.beforeAllSubcases(t => {
if (t.params.bindingType === 'color-attachment') {
t.skipIfColorRenderableNotSupportedForFormat('r32float');
}
})
.fn(t => {
const { bindingType, viewUsage } = t.params;

Expand Down
24 changes: 2 additions & 22 deletions src/webgpu/gpu_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export class GPUTestSubcaseBatchState extends SubcaseBatchState {
if (this.isCompatibility) {
for (const format of formats) {
if (format === 'bgra8unorm-srgb') {
this.skip(`texture format '${format} is not supported`);
this.skip(`texture format '${format} is not supported in compatibility mode`);
}
}
}
Expand All @@ -274,24 +274,13 @@ export class GPUTestSubcaseBatchState extends SubcaseBatchState {
this.skip(`texture format '${format}' is not supported to be multisampled`);
}
}

this.skipIfColorRenderableNotSupportedForFormat(...formats);
}

skipIfColorRenderableNotSupportedForFormat(...formats: (GPUTextureFormat | undefined)[]) {
for (const format of formats) {
if (format === undefined) continue;
if (!kTextureFormatInfo[format].color) {
this.skip(`texture format '${format} is not color renderable`);
}
}
}

skipIfCopyTextureToTextureNotSupportedForFormat(...formats: (GPUTextureFormat | undefined)[]) {
if (this.isCompatibility) {
for (const format of formats) {
if (format && isCompressedTextureFormat(format)) {
this.skip(`copyTextureToTexture with ${format} is not supported`);
this.skip(`copyTextureToTexture with ${format} is not supported in compatibility mode`);
}
}
}
Expand Down Expand Up @@ -527,15 +516,6 @@ export class GPUTestBase extends Fixture<GPUTestSubcaseBatchState> {
}
}

skipIfColorRenderableNotSupportedForFormat(...formats: (GPUTextureFormat | undefined)[]) {
for (const format of formats) {
if (format === undefined) continue;
if (!kTextureFormatInfo[format].color) {
this.skip(`texture format '${format} is not color renderable`);
}
}
}

skipIfTextureViewDimensionNotSupported(...dimensions: (GPUTextureViewDimension | undefined)[]) {
if (this.isCompatibility) {
for (const dimension of dimensions) {
Expand Down
2 changes: 0 additions & 2 deletions src/webgpu/web_platform/canvas/configure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,6 @@ g.test('format')
)
.beforeAllSubcases(t => {
t.selectDeviceForTextureFormatOrSkipTestCase(t.params.format);
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
})
.fn(t => {
const { canvasType, format } = t.params;
Expand Down Expand Up @@ -447,7 +446,6 @@ g.test('viewFormats')
)
)
.beforeAllSubcases(t => {
t.skipIfColorRenderableNotSupportedForFormat(t.params.format);
t.selectDeviceOrSkipTestCase([t.params.viewFormatFeature]);
})
.fn(t => {
Expand Down
Loading