dawn-cmake/test/samples/triangle.wgsl.expected.hlsl
Ben Clayton d1232670ae test: Generate expected output for all tests
The expected output is far from perfect, and the generated HLSL and MSL
isn't even validated yet, so may be incorrect.

However, by committing the generated output, we get clear examples of
the currently generated output of each backend. As we land fixes and
improvements to each backend, the presubmits will require us to update
the expected test output, and so code reviews will include diffs of
each backend's generated output.

Change-Id: I5c2a9e5b796d0ab75b3ec4c7f8ad00a0a2ab166f
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51224
Commit-Queue: Ben Clayton <bclayton@chromium.org>
Reviewed-by: David Neto <dneto@google.com>
2021-05-18 09:24:18 +00:00

23 lines
600 B
HLSL

struct tint_symbol_1 {
int 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 int 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;
}