dawn-cmake/test/bug/tint/221.wgsl.expected.msl
Ben Clayton a70c14dbce main: Replace --dawn-validation with --validate
Performs output validation with spirv-val for SPIR-V (as before), HLSL
validation with DXC, and MSL validation with the Metal Shader Compiler.

Disable HLSL tests that fail to validate

Bug: tint:812
Change-Id: If78c351b4e23c7fb50d333eacf9ee7cc81d18564
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/51280
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-06-02 21:02:34 +00:00

36 lines
622 B
Plaintext

SKIP: crbug.com/tint/833 loop emission is broken
#include <metal_stdlib>
using namespace metal;
struct Buf {
/* 0x0000 */ uint count;
/* 0x0004 */ uint data[50];
};
kernel void tint_symbol(device Buf& b [[buffer(0)]]) {
uint i = 0u;
{
bool tint_msl_is_first_1 = true;
device uint* const p;
for(;;) {
if (!tint_msl_is_first_1) {
*(p) = (*(p) * 2u);
i = (i + 1u);
}
tint_msl_is_first_1 = false;
if ((i >= b.count)) {
break;
}
p = &(b.data[i]);
if (((i % 2u) == 0u)) {
continue;
}
*(p) = 0u;
}
}
return;
}