tests/hlsl: Tweak hyperbolic functions tests on WARP.

WARP seems to be completely off for large argument values. The
difference quickly becomes of order of magnitudes, not ULPs. So
we ensure we test hyperbolic functions mostly for small arguments,
and skip WARP for large arguments.
This commit is contained in:
Giovanni Mascellani
2025-10-17 11:28:34 +02:00
committed by Henri Verbeet
parent ca81ffe088
commit dedb14e55e
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

@@ -86,12 +86,16 @@ float4 main() : sv_target
}
[test]
uniform 0 float4 -6.28318531 -0.88137359 0.88137359 6.28318531
uniform 0 float4 -1.0 -0.88137359 0.88137359 1.0
draw quad
probe (0, 0) f32(-267.744894, -1.0, 1.0, 267.744894) 2
uniform 0 float4 -0.0 0.0 -90.0 90.0
probe (0, 0) f32(-1.1752, -1.0, 1.0, 1.1752) 16
uniform 0 float4 -0.0 0.0 -0.1 0.1
draw quad
probe (0, 0) f32(0.0, 0.0, -inf, inf) 1
probe (0, 0) f32(0.0, 0.0, -0.1001667, 0.1001667) 16
% WARP completely misses even the order of magnitude for large arguments
uniform 0 float4 -90.0 90.0 -100.0 100.0
draw quad
if(!warp) probe (0, 0) f32(-inf, inf, -inf, inf)
[pixel shader]
uniform float4 a;
@@ -104,10 +108,14 @@ float4 main() : sv_target
[test]
uniform 0 float4 -1.76274717 -1.3169579 1.3169579 1.76274717
draw quad
probe (0, 0) f32(3.0, 2.0, 2.0, 3.0) 2
uniform 0 float4 -0.0 0.0 -90.0 90.0
probe (0, 0) f32(3.0, 2.0, 2.0, 3.0) 16
uniform 0 float4 -0.0 0.0 -0.1 0.1
draw quad
probe (0, 0) f32(1.0, 1.0, inf, inf) 1
probe (0, 0) f32(1.0, 1.0, 1.005004, 1.005004) 16
% WARP completely misses even the order of magnitude for large arguments
uniform 0 float4 -90.0 90.0 -100.0 100.0
draw quad
if(!warp) probe (0, 0) f32(inf, inf, inf, inf)
[pixel shader]
uniform float4 a;
@@ -123,7 +131,7 @@ draw quad
probe (0, 0) f32(-0.91715234, -0.5, 0.5, 0.91715234) 64
uniform 0 float4 -10.0 -0.0 0.0 10.0
draw quad
probe (0, 0) f32(-1.0, 0.0, 0.0, 1.0) 1
if(!warp) probe (0, 0) f32(-1.0, 0.0, 0.0, 1.0) 1
[pixel shader]
uniform float4 a;