dawn-cmake/test/tint/builtins/frexp/vector/const.wgsl.expected.dxc.hlsl
Ben Clayton 69c2c34326 tint: Implement const-eval of frexp()
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>
2022-11-23 18:21:38 +00:00

12 lines
239 B
HLSL

struct frexp_result_vec2 {
float2 fract;
int2 exp;
};
[numthreads(1, 1, 1)]
void main() {
const frexp_result_vec2 res = {float2(0.625f, 0.9375f), int2(1, 2)};
const float2 fract = res.fract;
const int2 exp = res.exp;
return;
}