mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 19:31:25 +00:00
Add a config parameter for the CanonicalizeEntryPoint transform that selects between emitting builtins as parameters (for MSL) or struct members (for HLSL). This fixes all of the shader IO issues in Tint's E2E tests for MSL. Fixed: tint:817 Change-Id: Ieb31cdbd2e4d96ac41f8d8515fd07ead8241d770 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/53282 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com>
19 lines
520 B
Plaintext
19 lines
520 B
Plaintext
#include <metal_stdlib>
|
|
|
|
using namespace metal;
|
|
struct VertexInputs {
|
|
uint vertex_index;
|
|
uint instance_index;
|
|
};
|
|
struct tint_symbol_4 {
|
|
float4 value [[position]];
|
|
};
|
|
|
|
vertex tint_symbol_4 tint_symbol(uint tint_symbol_2 [[vertex_id]], uint tint_symbol_3 [[instance_id]]) {
|
|
VertexInputs const inputs = {.vertex_index=tint_symbol_2, .instance_index=tint_symbol_3};
|
|
uint const foo = (inputs.vertex_index + inputs.instance_index);
|
|
tint_symbol_4 const tint_symbol_5 = {.value=float4()};
|
|
return tint_symbol_5;
|
|
}
|
|
|