mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 05:01:27 +00:00
Bug: tint:1883 Change-Id: If6c160da0684353a873428a08063aa91ee7a01c4 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/125420 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com>
16 lines
323 B
HLSL
16 lines
323 B
HLSL
float tint_trunc(float param_0) {
|
|
return param_0 < 0 ? ceil(param_0) : floor(param_0);
|
|
}
|
|
|
|
float tint_float_mod(float lhs, float rhs) {
|
|
return (lhs - (tint_trunc((lhs / rhs)) * rhs));
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void f() {
|
|
const float a = 1.0f;
|
|
const float b = 2.0f;
|
|
const float r = tint_float_mod(a, b);
|
|
return;
|
|
}
|