mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 10:45:36 +00:00
This CL adds const-eval for the `atan` operator. Bug: tint:1581 Change-Id: I3d9b417e86af010dc2f18c4e0424ddf971d55984 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/106844 Reviewed-by: Antonio Maiorano <amaiorano@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
31 lines
503 B
HLSL
31 lines
503 B
HLSL
void atan_ad96e4() {
|
|
float2 res = (0.785398185f).xx;
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
atan_ad96e4();
|
|
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() {
|
|
atan_ad96e4();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
atan_ad96e4();
|
|
return;
|
|
}
|