mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-13 16:45:56 +00:00
These two functions in HLSL only accept and return uint. Thus, if the result of these calls is passed to a function that wants int, it will fail, or call the uint overload if one exists. Fixed by casting the result to int if the arg is int. Bug: tint:1550 Change-Id: Id4c0970a29ac4c83ee5b78be8d2762e05e4a3f03 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/91001 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: Antonio Maiorano <amaiorano@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
31 lines
575 B
HLSL
31 lines
575 B
HLSL
void reverseBits_4dbd6f() {
|
|
int4 res = asint(reversebits(asuint(int4(0, 0, 0, 0))));
|
|
}
|
|
|
|
struct tint_symbol {
|
|
float4 value : SV_Position;
|
|
};
|
|
|
|
float4 vertex_main_inner() {
|
|
reverseBits_4dbd6f();
|
|
return float4(0.0f, 0.0f, 0.0f, 0.0f);
|
|
}
|
|
|
|
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() {
|
|
reverseBits_4dbd6f();
|
|
return;
|
|
}
|
|
|
|
[numthreads(1, 1, 1)]
|
|
void compute_main() {
|
|
reverseBits_4dbd6f();
|
|
return;
|
|
}
|