tests/hlsl: Evaluate asin() with larger error tolerance on SM6.

It currently fails with WARP.
This commit is contained in:
Giovanni Mascellani
2025-10-17 10:33:05 +02:00
committed by Henri Verbeet
parent 85a1fb6e47
commit f72307fc9f
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,28 +52,37 @@ shader model < 6.0
[test] [test]
uniform 0 float4 -0.5 0.0 0.0 0.0 uniform 0 float4 -0.5 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (-10473.0, 0.0, 0.0, 0.0) probe (0, 0) f32(-10473.0, 0.0, 0.0, 0.0)
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (1.0, 0.0, 0.0, 0.0) probe (0, 0) f32(1.0, 0.0, 0.0, 0.0)
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
todo(msl & sm>=6) draw quad draw quad
probe (0, 0) rgba (10473.0, 0.0, 0.0, 0.0) probe (0, 0) f32(10473.0, 0.0, 0.0, 0.0)
[require] [require]
shader model >= 6.0 shader model >= 6.0
% We implement SM 6.0 inverse trig instructions using the native equivalents % We implement SM 6.0 inverse trig instructions using the native equivalents
% available in the backend. The values below are from the AMD Windows drivers, % available in the backend. We have to quantize even more to account for
% which are very close to those from Ubuntu's calculator app. Results from % different implementations.
% RADV are a bit lower than these, hence the large max ulp difference.
[pixel shader]
uniform float4 a;
float4 main() : sv_target
{
float4 result = float4(asin(a.x), 0.0, 0.0, 0.0);
return round(result * 2000.0);
}
[test] [test]
uniform 0 float4 -0.5 0.0 0.0 0.0 uniform 0 float4 -0.5 0.0 0.0 0.0
draw quad draw quad
probe (0, 0) f32(-10472.0, 0.0, 0.0, 0.0) 4096 probe (0, 0) f32(-1047.0, 0.0, 0.0, 0.0)
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
draw quad draw quad
@@ -81,15 +90,15 @@ probe (0, 0) f32(0.0, 0.0, 0.0, 0.0)
uniform 0 float4 0.5 0.0 0.0 0.0 uniform 0 float4 0.5 0.0 0.0 0.0
draw quad draw quad
probe (0, 0) f32(10472.0, 0.0, 0.0, 0.0) 4096 probe (0, 0) f32(1047.0, 0.0, 0.0, 0.0)
[require]
% reset requirements
[test] [test]
uniform 0 float4 1.0 0.0 0.0 0.0 uniform 0 float4 1.0 0.0 0.0 0.0
draw quad draw quad
probe (0, 0) f32(31416.0, 0.0, 0.0, 0.0) probe (0, 0) f32(3142.0, 0.0, 0.0, 0.0)
[require]
% reset requirements
[pixel shader] [pixel shader]
uniform float4 a; uniform float4 a;