mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-06 06:33:30 +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>
23 lines
602 B
HLSL
23 lines
602 B
HLSL
struct tint_symbol_1 {
|
|
uint VertexIndex : SV_VertexID;
|
|
};
|
|
struct tint_symbol_2 {
|
|
float4 value : SV_Position;
|
|
};
|
|
struct tint_symbol_3 {
|
|
float4 value : SV_Target0;
|
|
};
|
|
|
|
static const float2 pos[3] = {float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)};
|
|
tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol) {
|
|
const uint VertexIndex = tint_symbol.VertexIndex;
|
|
const tint_symbol_2 tint_symbol_4 = {float4(pos[VertexIndex], 0.0f, 1.0f)};
|
|
return tint_symbol_4;
|
|
}
|
|
|
|
tint_symbol_3 frag_main() {
|
|
const tint_symbol_3 tint_symbol_5 = {float4(1.0f, 0.0f, 0.0f, 1.0f)};
|
|
return tint_symbol_5;
|
|
}
|
|
|