dawn-cmake/test/tint/builtins/gen/literal/sqrt/20c74e.wgsl.expected.dxc.hlsl
dan sinclair 2d90dedea4 Add const-eval for sqrt
This CL adds const-eval for `sqrt`.

Bug: tint:1581
Change-Id: I0d109e6439feaf07edb7db4d6a50274c1c4efcae
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/110174
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
2022-11-16 21:15:49 +00:00

31 lines
489 B
HLSL

void sqrt_20c74e() {
float res = 1.0f;
}
struct tint_symbol {
float4 value : SV_Position;
};
float4 vertex_main_inner() {
sqrt_20c74e();
return (0.0f).xxxx;
}
tint_symbol vertex_main() {
const float4 inner_result = vertex_main_inner();
tint_symbol wrapper_result = (tint_symbol)0;
wrapper_result.value = inner_result;
return wrapper_result;
}
void fragment_main() {
sqrt_20c74e();
return;
}
[numthreads(1, 1, 1)]
void compute_main() {
sqrt_20c74e();
return;
}