From 02fc26507b2deb37ad1aaca08c889da9896acfac Mon Sep 17 00:00:00 2001 From: Francisco Casas Date: Tue, 10 Dec 2024 03:30:39 -0300 Subject: [PATCH] tests/hlsl: Test tex2Dproj(). --- tests/hlsl/sampler.shader_test | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/hlsl/sampler.shader_test b/tests/hlsl/sampler.shader_test index 949944f4..59bd0c4e 100644 --- a/tests/hlsl/sampler.shader_test +++ b/tests/hlsl/sampler.shader_test @@ -69,6 +69,34 @@ float4 main() : sv_target return tex1D(s, 0.0); } +[srv 0] +size (2d, 3, 3) +0.0 0.0 0.0 1.0 1.0 0.0 0.0 1.0 2.0 0.0 0.0 1.0 +0.0 1.0 0.0 1.0 1.0 1.0 0.0 1.0 2.0 1.0 0.0 1.0 +0.0 2.0 0.0 1.0 1.0 2.0 0.0 1.0 2.0 2.0 0.0 1.0 + +[pixel shader fail(sm>=6)] +sampler s; +float4 f; + +float4 main() : sv_target +{ + return tex2Dproj(s, f); +} + +[test] +uniform 0 float4 50.0 50.0 42.0 100 +todo(sm<4 | msl) draw quad +probe (0, 0) rgba(1.0, 1.0, 0, 1.0) +uniform 0 float4 0.075 0.025 -42.0 0.1 +todo(sm<4 | msl) draw quad +probe (0, 0) rgba(1.75, 0.25, 0, 1.0) +uniform 0 float4 0.5 1.5 0.0 2.0 +todo(sm<4 | msl) draw quad +probe (0, 0) rgba(0.25, 1.75, 0, 1.0) +uniform 0 float4 1.0 1.0 0.0 0.0 +todo(sm<4 | msl) draw quad +probe (0, 0) rgba(2.0, 2.0, 0, 1.0) [sampler 0] filter linear linear linear