mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 03:11:29 +00:00
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>
22 lines
445 B
HLSL
22 lines
445 B
HLSL
groupshared int v[3];
|
|
|
|
struct tint_symbol_1 {
|
|
uint local_invocation_index : SV_GroupIndex;
|
|
};
|
|
|
|
void main_inner(uint local_invocation_index) {
|
|
{
|
|
[loop] for(uint idx = local_invocation_index; (idx < 3u); idx = (idx + 1u)) {
|
|
const uint i = idx;
|
|
v[i] = 0;
|
|
}
|
|
}
|
|
GroupMemoryBarrierWithGroupSync();
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main(tint_symbol_1 tint_symbol) {
|
|
main_inner(tint_symbol.local_invocation_index);
|
|
return;
|
|
}
|