mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-04 03:05:42 +00:00
There's a reason the overload of `ctx.Replace()` that takes a pointer to the replacement is deprecated - it doesn't play well when used as part of another replacement. Switch to using the callback overload of Replace() to fix bad transform output. Bug: tint:1386647 Change-Id: I94292eeb65d24d7b2446b16b8b4ad13bdd27965a Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111000 Auto-Submit: Ben Clayton <bclayton@google.com> Commit-Queue: James Price <jrprice@google.com> Reviewed-by: James Price <jrprice@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
20 lines
406 B
HLSL
20 lines
406 B
HLSL
uint tint_mod(uint lhs, uint rhs) {
|
|
return (lhs % ((rhs == 0u) ? 1u : rhs));
|
|
}
|
|
|
|
struct tint_symbol_1 {
|
|
uint3 v : SV_DispatchThreadID;
|
|
};
|
|
|
|
void f_inner(uint3 v) {
|
|
const uint tint_symbol_2 = v.x;
|
|
const uint tint_symbol_3 = tint_mod(v.y, 1u);
|
|
const uint l = (tint_symbol_2 << (tint_symbol_3 & 31u));
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void f(tint_symbol_1 tint_symbol) {
|
|
f_inner(tint_symbol.v);
|
|
return;
|
|
}
|