Skip to content

Commit 7229430

Browse files
authored
[compat] Fix or skip context dependent res cases (#3858)
These tests should pass in Tint following the implementation of context dependent resolution of the interpolate attribute, but there are a couple cases that need fixing or skipping in compat mode.
1 parent bd5676f commit 7229430

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/webgpu/shader/validation/decl/context_dependent_resolution.spec.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,20 @@ g.test('interpolation_type_names')
314314
.beginSubcases()
315315
.combine('decl', ['override', 'const', 'var<private>'] as const)
316316
)
317+
.beforeAllSubcases(t => {
318+
t.skipIf(
319+
t.isCompatibility && t.params.case === 'linear',
320+
'compatibility mode does not support linear interpolation type'
321+
);
322+
})
317323
.fn(t => {
324+
const attr =
325+
t.isCompatibility && t.params.case === 'flat'
326+
? `@interpolate(flat, either)`
327+
: `@interpolate(${t.params.case})`;
318328
const code = `
319329
${t.params.decl} ${t.params.case} : u32 = 0;
320-
@fragment fn main(@location(0) @interpolate(${t.params.case}) x : f32) { }
330+
@fragment fn main(@location(0) ${attr} x : f32) { }
321331
fn use_var() -> u32 {
322332
return ${t.params.case};
323333
}

0 commit comments

Comments
 (0)