From 2d848cf001368885d3ed1af6119a66f835d4b578 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Mon, 14 Oct 2024 18:36:19 +0200 Subject: [PATCH] tests: Add a basic shader model 6 interface packing test as well. --- tests/hlsl/interface-packing.shader_test | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/tests/hlsl/interface-packing.shader_test b/tests/hlsl/interface-packing.shader_test index 0bba4ec6..ccb02b51 100644 --- a/tests/hlsl/interface-packing.shader_test +++ b/tests/hlsl/interface-packing.shader_test @@ -1,9 +1,30 @@ +[vertex shader] +void main(float4 pos : POSITION, out float2 color_xy : COLOR0, + out float2 color_zw : COLOR1, out float4 position : SV_POSITION) +{ + position = pos; + color_xy = float2(0.25, 0.5); + color_zw = float2(0.75, 1.0); +} + +[pixel shader] +float4 main(float2 color_xy : COLOR0, float2 color_zw : COLOR1) : SV_TARGET +{ + return float4(color_xy, color_zw); +} + +[test] +draw quad +todo(sm>=6) probe(320, 240) rgba(0.25, 0.5, 0.75, 1.0) + % Test handling of arrays in interface blocks [require] shader model >= 4.0 shader model < 6.0 +[input layout] + [vertex shader] // Rules: // 1. Arrays always start on .x