dawn-cmake/test/shader_io/fragment_input_builtins.wgsl.expected.msl
James Price 7697c31e84 writer/msl: Emit builtins as parameters
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>
2021-06-04 14:40:28 +00:00

12 lines
332 B
Plaintext

#include <metal_stdlib>
using namespace metal;
fragment void tint_symbol(float4 position [[position]], bool front_facing [[front_facing]], uint sample_index [[sample_id]], uint sample_mask [[sample_mask]]) {
if (front_facing) {
float4 const foo = position;
uint const bar = (sample_index + sample_mask);
}
return;
}