tests/hlsl: Use explicit infinities in cast-to-half.shader_test.

We used to need workarounds when we used scanf() to parse float
numbers, but now we use strtof() which supports "inf" properly.
On the other hand, on some platforms it is the workaround that
now fails with a range error.
This commit is contained in:
Giovanni Mascellani
2025-10-17 09:49:42 +02:00
committed by Henri Verbeet
parent 6654b88407
commit 303790875b
Notes: Henri Verbeet 2025-10-27 19:10:33 +01:00
Approved-by: Francisco Casas (@fcasas)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1799

View File

@@ -52,12 +52,10 @@ float4 main() : sv_target
[test]
uniform 0 float4 65536.0 32768.0 65536.0 32768.0
draw quad
% The shader runner doesn't support floating-point special literals like "inf",
% but numbers beyond FLOAT_MAX consistently result in inf.
probe (0, 0) rgba(1.0e39, 1.0e39, 1.0e39, 16384.0)
probe (0, 0) f32(inf, inf, inf, 16384.0)
uniform 0 float4 -65536.0 -32768.0 -65536.0 -32768.0
draw quad
probe (0, 0) rgba(-1.0e39, -1.0e39, -1.0e39, -16384.0)
probe (0, 0) f32(-inf, -inf, -inf, -16384.0)
uniform 0 float4 0.000062 5.0e-8 0.000062 5.0e-8
draw quad
probe (0, 0) rgba(0.00012397766, 1.1920929e-7, 0.000030994415, 0.0) 1