From 3e44bd4e5be10ce27d8800783cac717c63a57f92 Mon Sep 17 00:00:00 2001 From: Shaun Ren Date: Tue, 18 Mar 2025 16:59:04 -0400 Subject: [PATCH] tests/hlsl: Add a test for copy-propagation of uniform texture object writes. --- tests/hlsl/hard-copy-prop.shader_test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/hlsl/hard-copy-prop.shader_test b/tests/hlsl/hard-copy-prop.shader_test index 06375892..8832ea1c 100644 --- a/tests/hlsl/hard-copy-prop.shader_test +++ b/tests/hlsl/hard-copy-prop.shader_test @@ -223,3 +223,19 @@ float4 main() : sv_target uniform 0 float 11.0 todo(sm<4) draw quad probe (0, 0) rgba(1, 2, 3, 5) + +[require] +shader model < 5.1 +options: backcompat + +[pixel shader] +sampler s; +Texture2D t1, t2; + +float4 main() : sv_target +{ + Texture2D t = t1; + t1 = t2; + t2 = t; + return t1.Sample(s, float2(0, 0)) + t2.Sample(s, float2(0, 0)); +}