From 2903831f79c3bf5568c0042f36f3a768d32c934f Mon Sep 17 00:00:00 2001 From: Giovanni Mascellani Date: Wed, 12 Nov 2025 13:21:41 +0100 Subject: [PATCH] tests/hlsl: Test using an SRV in combination with a CBV larger than the declared uniforms. This appears to be valid on native (no validation message is raised) but is not properly handled by vkd3d. --- tests/hlsl/descriptors.shader_test | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/hlsl/descriptors.shader_test b/tests/hlsl/descriptors.shader_test index ca79f2300..033125523 100644 --- a/tests/hlsl/descriptors.shader_test +++ b/tests/hlsl/descriptors.shader_test @@ -1,3 +1,30 @@ +[require] +shader model >= 4.0 + +[srv 0] +format r32-float +size (2d, 1, 1) + +1.0 + +% Test a shader that uses an SRV in combination with a CBV longer than the +% declared uniforms. +[pixel shader] +Texture2D t : register(t0); + +uniform float4 x; +uniform float4 y; + +float4 main() : SV_Target +{ + return t.Load(uint3(0, 0, 0)) + x; +} + +[test] +uniform 0 float4 1.0 2.0 3.0 4.0 +todo(d3d12 & !windows & !mvk) draw quad +probe (0, 0) f32(2.0, 3.0, 4.0, 5.0) + [require] shader model >= 5.0 descriptors