mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-10 23:26:06 +00:00
Bug: tint:1876 Change-Id: Ic56b37918fd1a2a42442b517985a49f10d85159d Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/124501 Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
20 lines
476 B
HLSL
20 lines
476 B
HLSL
struct frexp_result_vec2_f32 {
|
|
float2 fract;
|
|
int2 exp;
|
|
};
|
|
frexp_result_vec2_f32 tint_frexp(float2 param_0) {
|
|
float2 exp;
|
|
float2 fract = sign(param_0) * frexp(param_0, exp);
|
|
frexp_result_vec2_f32 result = {fract, int2(exp)};
|
|
return result;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void main() {
|
|
const float2 tint_symbol = float2(1.25f, 3.75f);
|
|
const frexp_result_vec2_f32 res = tint_frexp(tint_symbol);
|
|
const float2 fract = res.fract;
|
|
const int2 exp = res.exp;
|
|
return;
|
|
}
|