vkd3d-shader/hlsl: Correctly fold casts from float.

I.e., without invoking undefined behavior in the compiler. The rules
are desumed from the the MSDN documentation for ftoi and ftou.
This commit is contained in:
Giovanni Mascellani
2023-09-10 22:50:01 +02:00
committed by Alexandre Julliard
parent d9c984c11a
commit 49bbd98a04
Notes: Alexandre Julliard 2023-09-22 22:46:53 +02:00
Approved-by: Zebediah Figura (@zfigura)
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Approved-by: Alexandre Julliard (@julliard)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/338
2 changed files with 28 additions and 3 deletions

View File

@@ -41,4 +41,4 @@ float4 main() : sv_target
[test]
draw quad
todo probe all rgba (0.5, 0.5, 0.5, 0.5)
probe all rgba (0.5, 0.5, 0.5, 0.5)