Skip to content

Commit

Permalink
Compat: Fixes for format reinterpretation
Browse files Browse the repository at this point in the history
format reinterpretation is not supported in compat mode.
The format_reinterpretation tests already filter out every
case where format == viewFormat so all that's left is cases
that don't work in compat.

The createView tests test multiple combinations, some of which
are valid and some are not.
  • Loading branch information
greggman committed Dec 4, 2023
1 parent 33675ca commit eb48ff8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ g.test('texture_binding')
.beforeAllSubcases(t => {
const { format, viewFormat } = t.params;
t.skipIfTextureFormatNotSupported(format, viewFormat);
// Compatibility mode does not support format reinterpretation.
t.skipIf(t.isCompatibility);
})
.fn(t => {
const { format, viewFormat } = t.params;
Expand Down Expand Up @@ -207,6 +209,8 @@ in view format and match in base format.`
.beforeAllSubcases(t => {
const { format, viewFormat } = t.params;
t.skipIfTextureFormatNotSupported(format, viewFormat);
// Compatibility mode does not support format reinterpretation.
t.skipIf(t.isCompatibility);
})
.fn(t => {
const { format, viewFormat, sampleCount } = t.params;
Expand Down
2 changes: 2 additions & 0 deletions src/webgpu/api/validation/createView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ g.test('format')
const { blockWidth, blockHeight } = kTextureFormatInfo[textureFormat];

t.skipIfTextureFormatNotSupported(textureFormat, viewFormat);
// Compatibility mode does not support format reinterpretation.
t.skipIf(t.isCompatibility && viewFormat !== undefined && viewFormat !== textureFormat);

const compatible = viewFormat === undefined || viewCompatible(textureFormat, viewFormat);

Expand Down

0 comments on commit eb48ff8

Please sign in to comment.