dawn-cmake/test/shader_io/shared_struct_helper_function.wgsl.expected.msl
James Price a865b375aa test: Add missing stage attributes to IO test
Change-Id: I7f69de9c3b6fe226e0688f56a8d076dc6ec4a81f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/55281
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2021-06-19 01:12:45 +00:00

34 lines
791 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct VertexOutput {
float4 pos;
int loc0;
};
struct tint_symbol {
int loc0 [[user(locn0)]];
float4 pos [[position]];
};
struct tint_symbol_2 {
int loc0 [[user(locn0)]];
float4 pos [[position]];
};
VertexOutput foo(float x) {
VertexOutput const tint_symbol_4 = {.pos=float4(x, x, x, 1.0f), .loc0=42};
return tint_symbol_4;
}
vertex tint_symbol vert_main1() {
VertexOutput const tint_symbol_1 = foo(0.5f);
tint_symbol const tint_symbol_5 = {.loc0=tint_symbol_1.loc0, .pos=tint_symbol_1.pos};
return tint_symbol_5;
}
vertex tint_symbol_2 vert_main2() {
VertexOutput const tint_symbol_3 = foo(0.25f);
tint_symbol_2 const tint_symbol_6 = {.loc0=tint_symbol_3.loc0, .pos=tint_symbol_3.pos};
return tint_symbol_6;
}