mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-04 13:41:42 +00:00
Change-Id: Iaf31627798a83625a075e529aa3886cf84b164b1 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/52040 Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: James Price <jrprice@google.com> Auto-Submit: James Price <jrprice@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
26 lines
592 B
Plaintext
26 lines
592 B
Plaintext
SKIP: crbug.com/tint/817
|
|
|
|
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct tint_symbol_1 {
|
|
int VertexIndex [[vertex_id]];
|
|
};
|
|
struct tint_symbol_2 {
|
|
float4 value [[position]];
|
|
};
|
|
struct tint_symbol_3 {
|
|
float4 value [[color(0)]];
|
|
};
|
|
|
|
constant float2 pos[3] = {float2(0.0f, 0.5f), float2(-0.5f, -0.5f), float2(0.5f, -0.5f)};
|
|
vertex tint_symbol_2 vtx_main(tint_symbol_1 tint_symbol [[stage_in]]) {
|
|
int const VertexIndex = tint_symbol.VertexIndex;
|
|
return {float4(pos[VertexIndex], 0.0f, 1.0f)};
|
|
}
|
|
|
|
fragment tint_symbol_3 frag_main() {
|
|
return {float4(1.0f, 0.0f, 0.0f, 1.0f)};
|
|
}
|
|
|