dawn-cmake/test/shader_io/fragment_input_builtins_str...

20 lines
623 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct FragmentInputs {
float4 position;
bool front_facing;
uint sample_index;
uint sample_mask;
};
fragment void tint_symbol(float4 tint_symbol_2 [[position]], bool tint_symbol_3 [[front_facing]], uint tint_symbol_4 [[sample_id]], uint tint_symbol_5 [[sample_mask]]) {
FragmentInputs const inputs = {.position=tint_symbol_2, .front_facing=tint_symbol_3, .sample_index=tint_symbol_4, .sample_mask=tint_symbol_5};
if (inputs.front_facing) {
float4 const foo = inputs.position;
uint const bar = (inputs.sample_index + inputs.sample_mask);
}
return;
}