From 00b79cd7813511c5f6b9924d78b4980e002fbe87 Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Wed, 8 Jan 2025 18:39:47 -0300 Subject: [PATCH] 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. --- tests/hlsl/sample-grad.shader_test | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/hlsl/sample-grad.shader_test b/tests/hlsl/sample-grad.shader_test index 62026fa7..0e873326 100644 --- a/tests/hlsl/sample-grad.shader_test +++ b/tests/hlsl/sample-grad.shader_test @@ -56,9 +56,9 @@ todo(msl) draw quad probe (0,0) rgba (0.0, 0.0, 1.0, 0.0) [require] -shader model >= 4.0 +shader model >= 3.0 -[pixel shader] +[pixel shader todo(sm<4)] sampler s; Texture2D t; uniform float4 grad; @@ -70,11 +70,11 @@ float4 main() : sv_target [test] 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) 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) 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)