mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-14 03:11:29 +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>
18 lines
239 B
HLSL
18 lines
239 B
HLSL
int func(int value, inout int pointer) {
|
|
const int x_9 = pointer;
|
|
return (value + x_9);
|
|
}
|
|
|
|
void main_1() {
|
|
int i = 0;
|
|
i = 123;
|
|
const int x_18 = func(i, i);
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
main_1();
|
|
return;
|
|
}
|