mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
This should be a u32, but we are missing validation rules for builtin types (opened crbug.com/tint/861 for this). This meant that we were generating invalid HLSL for this test. Change-Id: Ib2189d98e5e515e41374372c0f8963df04eb1b01 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53001 Auto-Submit: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
12 lines
391 B
WebGPU Shading Language
12 lines
391 B
WebGPU Shading Language
let pos : array<vec2<f32>, 3> = array<vec2<f32>, 3>(vec2<f32>(0.0, 0.5), vec2<f32>(-0.5, -0.5), vec2<f32>(0.5, -0.5));
|
|
|
|
[[stage(vertex)]]
|
|
fn vtx_main([[builtin(vertex_index)]] VertexIndex : u32) -> [[builtin(position)]] vec4<f32> {
|
|
return vec4<f32>(pos[VertexIndex], 0.0, 1.0);
|
|
}
|
|
|
|
[[stage(fragment)]]
|
|
fn frag_main() -> [[location(0)]] vec4<f32> {
|
|
return vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
|
}
|