From 8d946f3c204a4fd505f54ccad942550dd7d8b68e Mon Sep 17 00:00:00 2001 From: Elizabeth Figura Date: Tue, 18 Jun 2024 13:01:31 -0500 Subject: [PATCH] tests: Add another combined sampler test. Shader provided by Francisco Casas. --- tests/hlsl/combined-samplers.shader_test | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/tests/hlsl/combined-samplers.shader_test b/tests/hlsl/combined-samplers.shader_test index 28e9f1a7..1eb181ca 100644 --- a/tests/hlsl/combined-samplers.shader_test +++ b/tests/hlsl/combined-samplers.shader_test @@ -16,8 +16,9 @@ filter linear linear linear address clamp clamp clamp [srv 0] -size (2d, 1, 1) -0.0 0.0 0.0 1.0 +size (2d, 2, 2) +0.0 0.0 0.0 1.0 0.0 1.0 0.0 1.0 +0.0 0.0 1.0 1.0 1.0 0.0 0.0 1.0 [srv 1] size (2d, 1, 1) @@ -48,6 +49,22 @@ todo(glsl) draw quad probe (0, 0) rgba (0, 0, 0, 1) +[pixel shader] +sampler sam; + +float v; + +float4 main() : sv_target +{ + return tex2D(sam, float2(0, 0)) + v; +} + +[test] +uniform 0 float4 0.5 0.0 0.0 0.0 +todo(glsl) draw quad +probe (0, 0) rgba (0.5, 0.5, 0.5, 1.5) + + % On sm4, textures for new separated samplers are allocated before regular textures. % On sm1, textures for new combined samplers are allocated before regular samplers. [pixel shader]