dawn-cmake/test/tint/bug/tint/1557.wgsl.expected.msl
Antonio Maiorano 2323977745 tint: add e2e test for crbug.com/tint/1557
Bug: tint:1557
Change-Id: I48e09af3b265443a330248afe5377b76754aea33
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/104020
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
2022-09-27 17:30:57 +00:00

40 lines
573 B
Plaintext

#include <metal_stdlib>
using namespace metal;
int f() {
return 0;
}
void g() {
int j = 0;
while (true) {
if ((j >= 1)) {
break;
}
j = as_type<int>((as_type<uint>(j) + as_type<uint>(1)));
int k = f();
}
}
kernel void tint_symbol(const constant int* tint_symbol_1 [[buffer(0)]]) {
switch(*(tint_symbol_1)) {
case 0: {
switch(*(tint_symbol_1)) {
case 0: {
break;
}
default: {
g();
break;
}
}
break;
}
default: {
break;
}
}
return;
}