diff --git a/tests/hlsl/inverse-trig.shader_test b/tests/hlsl/inverse-trig.shader_test index 1314fa05f..425e84ed8 100644 --- a/tests/hlsl/inverse-trig.shader_test +++ b/tests/hlsl/inverse-trig.shader_test @@ -52,28 +52,37 @@ shader model < 6.0 [test] uniform 0 float4 -0.5 0.0 0.0 0.0 -todo(msl & sm>=6) draw quad -probe (0, 0) rgba (-10473.0, 0.0, 0.0, 0.0) +draw quad +probe (0, 0) f32(-10473.0, 0.0, 0.0, 0.0) uniform 0 float4 0.0 0.0 0.0 0.0 -todo(msl & sm>=6) draw quad -probe (0, 0) rgba (1.0, 0.0, 0.0, 0.0) +draw quad +probe (0, 0) f32(1.0, 0.0, 0.0, 0.0) uniform 0 float4 0.5 0.0 0.0 0.0 -todo(msl & sm>=6) draw quad -probe (0, 0) rgba (10473.0, 0.0, 0.0, 0.0) +draw quad +probe (0, 0) f32(10473.0, 0.0, 0.0, 0.0) [require] shader model >= 6.0 % 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, -% which are very close to those from Ubuntu's calculator app. Results from -% RADV are a bit lower than these, hence the large max ulp difference. +% available in the backend. We have to quantize even more to account for +% different implementations. + +[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] uniform 0 float4 -0.5 0.0 0.0 0.0 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 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 draw quad -probe (0, 0) f32(10472.0, 0.0, 0.0, 0.0) 4096 - -[require] -% reset requirements +probe (0, 0) f32(1047.0, 0.0, 0.0, 0.0) [test] uniform 0 float4 1.0 0.0 0.0 0.0 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] uniform float4 a;