From e4724b4635bcb742bb4375c96e9e8e9d2b6b5551 Mon Sep 17 00:00:00 2001 From: Conor McCarthy Date: Wed, 1 May 2024 14:55:03 +1000 Subject: [PATCH] tests/hlsl: Add a test for SV_Coverage out. --- tests/hlsl/coverage.shader_test | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/tests/hlsl/coverage.shader_test b/tests/hlsl/coverage.shader_test index 3a188da5..faa933fe 100644 --- a/tests/hlsl/coverage.shader_test +++ b/tests/hlsl/coverage.shader_test @@ -1,10 +1,29 @@ [require] -shader model >= 5.0 +shader model >= 4.1 [rtv 0] format r32g32b32a32 float size (2dms, 4, 640, 480) +[pixel shader todo] +float4 main(out uint sample_mask : SV_Coverage) : SV_Target +{ + sample_mask = 0x5; + return float4(1.0, 1.0, 1.0, 1.0); +} + +[test] +todo draw quad +probe all rgba (0.5, 0.5, 0.5, 0.5) +sample mask 0x0b +clear rtv 0 0.0 0.0 0.0 0.0 +todo draw quad +probe all rgba (0.25, 0.25, 0.25, 0.25) + + +[require] +shader model >= 5.0 + [uav 1] format r32 uint size (2d, 4, 4) @@ -24,6 +43,7 @@ float4 main(float4 position : SV_Position, uint coverage : SV_Coverage) : SV_Tar [test] sample mask 0x01 +clear rtv 0 0.0 0.0 0.0 0.0 todo(sm<6) draw quad probe all rgba (0.0, 0.25, 0.0, 0.25) probe uav 1 all rui (0x01)