mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-04 03:05:42 +00:00
Use the new transforms to try and simplify loops into for-loops. Emit loops when the initialiser, condition and continuing are simple enough to do so. Bug: tint:952 Change-Id: I5b3c225b245ffa72996abf6a70f52a9cd25b748e Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/56772 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: David Neto <dneto@google.com>
14 lines
348 B
HLSL
14 lines
348 B
HLSL
Texture2D<uint4> Src : register(t0, space0);
|
|
RWTexture2D<uint4> Dst : register(u1, space0);
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
uint4 srcValue = uint4(0u, 0u, 0u, 0u);
|
|
const uint4 x_22 = Src.Load(int3(0, 0, 0));
|
|
srcValue = x_22;
|
|
const uint x_24 = srcValue.x;
|
|
const uint x_25 = (x_24 + 1u);
|
|
Dst[int2(0, 0)] = srcValue.xxxx;
|
|
return;
|
|
}
|