dawn-cmake/test/samples/simple.wgsl.expected.msl
James Price 6c582778cf writer/msl: Simplify type constructor generation
The special-case for zero-valued constructors is unnecessary, as an
empty initializer list already correctly zero-initializes for all
types. This was causing an additional {} to be emitted for empty
structures, which the MSL compiler rejects.

Fixed: tint:821
Change-Id: Ib48c73eadef15b517e14b248229ecfbbfeb13f81
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51822
Commit-Queue: James Price <jrprice@google.com>
Commit-Queue: Ben Clayton <bclayton@google.com>
Auto-Submit: James Price <jrprice@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
2021-05-20 16:45:47 +00:00

17 lines
261 B
Plaintext

#include <metal_stdlib>
using namespace metal;
struct tint_symbol_1 {
float4 value [[color(0)]];
};
void bar() {
}
fragment tint_symbol_1 tint_symbol() {
float2 a = float2();
bar();
return {float4(0.400000006f, 0.400000006f, 0.800000012f, 1.0f)};
}