Skip to content

Commit

Permalink
[compat] Fix or skip context dependent res cases (#3858)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
sudonatalie authored Jul 12, 2024
1 parent bd5676f commit 7229430
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,20 @@ g.test('interpolation_type_names')
.beginSubcases()
.combine('decl', ['override', 'const', 'var<private>'] as const)
)
.beforeAllSubcases(t => {
t.skipIf(
t.isCompatibility && t.params.case === 'linear',
'compatibility mode does not support linear interpolation type'
);
})
.fn(t => {
const attr =
t.isCompatibility && t.params.case === 'flat'
? `@interpolate(flat, either)`
: `@interpolate(${t.params.case})`;
const code = `
${t.params.decl} ${t.params.case} : u32 = 0;
@fragment fn main(@location(0) @interpolate(${t.params.case}) x : f32) { }
@fragment fn main(@location(0) ${attr} x : f32) { }
fn use_var() -> u32 {
return ${t.params.case};
}
Expand Down

0 comments on commit 7229430

Please sign in to comment.