dawn-cmake/test/statements/for/complex.wgsl.expected.hlsl
Antonio Maiorano e2528e9297 Reland "HLSL: force FXC to never unroll loops"
Now that I've landed this change to Dawn to disable FXC optimizations:
https://dawn-review.googlesource.com/c/dawn/+/70700,, we can reland this
change. The Tint-into-Dawn roll was failing because FXC would miscompile
certain loops into infinite loops when not unrolled.

Also reland
test/bug/fxc/gradient_in_varying_loop/1112.wgsl.expected.hlsl

Bug: tint:1112
Bug: dawn:1203
Change-Id: I641d68864b833e0fbe3b117d397b89ae96482536
Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/71000
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Ben Clayton <bclayton@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
2021-11-25 18:44:50 +00:00

25 lines
360 B
HLSL

[numthreads(1, 1, 1)]
void unused_entry_point() {
return;
}
void some_loop_body() {
}
void f() {
int j = 0;
{
int i = 0;
[loop] while (true) {
bool tint_tmp = (i < 5);
if (tint_tmp) {
tint_tmp = (j < 10);
}
if (!((tint_tmp))) { break; }
some_loop_body();
j = (i * 30);
i = (i + 1);
}
}
}