mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-08-03 18:55:39 +00:00
This CL adds const-eval for the `abs` builtin. Bug: tint:1581 Change-Id: I6ee25c07620990f72a6962441aec62ae7665653e Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/108340 Commit-Queue: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
31 lines
488 B
HLSL
31 lines
488 B
HLSL
void abs_9c80a6() {
|
|
int4 res = (1).xxxx;
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
abs_9c80a6();
|
|
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() {
|
|
abs_9c80a6();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
abs_9c80a6();
|
|
return;
|
|
}
|