dawn-cmake/test/samples/triangle.wgsl.expected.msl

25 lines
637 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_symbol_1 {
float4 value [[position]];
};
struct tint_symbol_2 {
float4 value [[color(0)]];
};
struct tint_array_wrapper_0 {
float2 array[3];
};
constant tint_array_wrapper_0 pos = {float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)};
vertex tint_symbol_1 vtx_main(uint VertexIndex [[vertex_id]]) {
tint_symbol_1 const tint_symbol_3 = {.value=float4(pos.array[VertexIndex], 0.0f, 1.0f)};
return tint_symbol_3;
}
fragment tint_symbol_2 frag_main() {
tint_symbol_2 const tint_symbol_4 = {.value=float4(1.0f, 0.0f, 0.0f, 1.0f)};
return tint_symbol_4;
}