mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 18:55:39 +00:00
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>
36 lines
622 B
Plaintext
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;
|
|
}
|
|
|