mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-05-13 10:51:35 +00:00
Use the ExpandCompoundAssignment transform to convert compound assignments to regular assignments. Bug: tint:1325 Change-Id: Ic843964ec24d8a2f00f801823f8f8bbf1c6fab5c Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85284 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
19 lines
358 B
HLSL
19 lines
358 B
HLSL
[numthreads(1, 1, 1)]
|
|
void unused_entry_point() {
|
|
return;
|
|
}
|
|
|
|
static int a = 0;
|
|
static float b = 0.0f;
|
|
|
|
void foo(int maybe_zero) {
|
|
a = (a / 1);
|
|
a = (a % 1);
|
|
a = (a / (maybe_zero == 0 ? 1 : maybe_zero));
|
|
a = (a % (maybe_zero == 0 ? 1 : maybe_zero));
|
|
b = (b / 0.0f);
|
|
b = (b % 0.0f);
|
|
b = (b / float(maybe_zero));
|
|
b = (b % float(maybe_zero));
|
|
}
|