dawn-cmake/test/shader_io/shared_struct_helper_function.wgsl.expected.wgsl
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

21 lines
338 B
WebGPU Shading Language

struct VertexOutput {
[[builtin(position)]]
pos : vec4<f32>;
[[location(0)]]
loc0 : i32;
};
fn foo(x : f32) -> VertexOutput {
return VertexOutput(vec4<f32>(x, x, x, 1.0), 42);
}
[[stage(vertex)]]
fn vert_main1() -> VertexOutput {
return foo(0.5);
}
[[stage(vertex)]]
fn vert_main2() -> VertexOutput {
return foo(0.25);
}