blob: 2bbc7285b10f50297265157ffbec09b2e88d9bb9 [file] [log] [blame]
James Pricebb0496e2021-06-03 09:38:34 +00001struct FragmentInputs0 {
Ben Clayton01e4b6f2022-01-19 22:46:57 +00002 @builtin(position) position : vec4<f32>;
3 @location(0) @interpolate(flat) loc0 : i32;
James Pricebb0496e2021-06-03 09:38:34 +00004};
5struct FragmentInputs1 {
Ben Clayton01e4b6f2022-01-19 22:46:57 +00006 @location(3) loc3 : vec4<f32>;
7 @builtin(sample_mask) sample_mask : u32;
James Pricebb0496e2021-06-03 09:38:34 +00008};
9
Ben Clayton01e4b6f2022-01-19 22:46:57 +000010@stage(fragment)
James Pricebb0496e2021-06-03 09:38:34 +000011fn main(
12 inputs0 : FragmentInputs0,
Ben Clayton01e4b6f2022-01-19 22:46:57 +000013 @builtin(front_facing) front_facing : bool,
14 @location(1) @interpolate(flat) loc1 : u32,
15 @builtin(sample_index) sample_index : u32,
James Pricebb0496e2021-06-03 09:38:34 +000016 inputs1 : FragmentInputs1,
Ben Clayton01e4b6f2022-01-19 22:46:57 +000017 @location(2) loc2 : f32,
James Pricebb0496e2021-06-03 09:38:34 +000018) {
19 if (front_facing) {
20 let foo : vec4<f32> = inputs0.position;
21 let bar : u32 = sample_index + inputs1.sample_mask;
22 let i : i32 = inputs0.loc0;
23 let u : u32 = loc1;
24 let f : f32 = loc2;
25 let v : vec4<f32> = inputs1.loc3;
26 }
27}