From 303790875bed3f94a9faf56ed971031b8469b937 Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Fri, 17 Oct 2025 09:49:42 +0200 Subject: [PATCH] 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. --- tests/hlsl/cast-to-half.shader_test | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tests/hlsl/cast-to-half.shader_test b/tests/hlsl/cast-to-half.shader_test index a6846c084..f0f343341 100644 --- a/tests/hlsl/cast-to-half.shader_test +++ b/tests/hlsl/cast-to-half.shader_test @@ -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