mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-06 12:15:43 +00:00
Also add abstract overloads. Bug: tint:1581 Fixed: tint:1768 Change-Id: Icda465e0cfe960b77823c2135f0cfe8f82ed394f Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111441 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Commit-Queue: Ben Clayton <bclayton@google.com>
20 lines
400 B
HLSL
20 lines
400 B
HLSL
struct frexp_result {
|
|
float fract;
|
|
int exp;
|
|
};
|
|
frexp_result tint_frexp(float param_0) {
|
|
float exp;
|
|
float fract = frexp(param_0, exp);
|
|
frexp_result result = {fract, int(exp)};
|
|
return result;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
const float tint_symbol = 1.25f;
|
|
const frexp_result res = tint_frexp(tint_symbol);
|
|
const float fract = res.fract;
|
|
const int exp = res.exp;
|
|
return;
|
|
}
|