tests: Test SampleGrad() on ps_3_0.

fxc compiles this method even without the backcompat option.

Furthermore, it even does it on ps_2_0 despite the fact that it maps to
a texldd instruction, which is not available on plain ps_2_0, nor ps_2_b,
only on ps_2_a and ps_3_0 according to documentation.

It is worth mentioning that the additional offset parameter is not
supported when lowering.
This commit is contained in:
Francisco Casas 2025-01-08 18:39:47 -03:00 committed by Henri Verbeet
parent c7e173a1ff
commit 00b79cd781
Notes: Henri Verbeet 2025-01-14 18:03:19 +01:00
Approved-by: Elizabeth Figura (@zfigura)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1335

View File

@ -56,9 +56,9 @@ todo(msl) draw quad
probe (0,0) rgba (0.0, 0.0, 1.0, 0.0) probe (0,0) rgba (0.0, 0.0, 1.0, 0.0)
[require] [require]
shader model >= 4.0 shader model >= 3.0
[pixel shader] [pixel shader todo(sm<4)]
sampler s; sampler s;
Texture2D t; Texture2D t;
uniform float4 grad; uniform float4 grad;
@ -70,11 +70,11 @@ float4 main() : sv_target
[test] [test]
uniform 0 float4 0.0 0.0 0.0 0.0 uniform 0 float4 0.0 0.0 0.0 0.0
todo(msl) draw quad todo(msl | sm<4) draw quad
probe (0, 0) rgba (1.0, 0.0, 1.0, 0.0) probe (0, 0) rgba (1.0, 0.0, 1.0, 0.0)
uniform 0 float4 1.0 1.0 1.0 1.0 uniform 0 float4 1.0 1.0 1.0 1.0
todo(msl) draw quad todo(msl | sm<4) draw quad
probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0) probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)
uniform 0 float4 2.0 2.0 2.0 2.0 uniform 0 float4 2.0 2.0 2.0 2.0
todo(msl) draw quad todo(msl | sm<4) draw quad
probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0) probe (0, 0) rgba (0.0, 0.0, 1.0, 0.0)