diff --git a/tests/hlsl/srv-structuredbuffer.shader_test b/tests/hlsl/srv-structuredbuffer.shader_test index bf815123f..2225a0ee4 100644 --- a/tests/hlsl/srv-structuredbuffer.shader_test +++ b/tests/hlsl/srv-structuredbuffer.shader_test @@ -21,6 +21,38 @@ float4 main() : sv_target todo(sm<6) draw quad probe (0, 0) rgba(0.0, 1.0, 2.0, 3.0) +[pixel shader todo] +struct banana +{ + float2 x; + float2 y; +}; + +uniform uint idx; +StructuredBuffer buffer; + +float4 main() : sv_target +{ + return float4(buffer[idx].x, buffer[idx].y); +} + +[test] +uniform 0 uint 0 +todo(sm<6) draw quad +probe (0, 0) rgba(0.0, 1.0, 2.0, 3.0) +uniform 0 uint 1 +todo(sm<6) draw quad +probe (0, 0) rgba(4.0, 5.0, 6.0, 7.0) + +[srv 0] +stride 12 +size (buffer, 5) +0.0 1.0 2.0 +3.0 4.0 5.0 +6.0 7.0 8.0 +9.0 10.0 11.0 +12.0 13.0 14.0 + % Structured buffers are tightly packed. [pixel shader todo] uniform uint idx; @@ -67,29 +99,6 @@ uniform 0 uint 4 todo(sm<6) draw quad probe (0, 0) rgba(12.0, 13.0, 14.0, 4.0) -[pixel shader todo] -struct banana -{ - float2 x; - float2 y; -}; - -uniform uint idx; -StructuredBuffer buffer; - -float4 main() : sv_target -{ - return float4(buffer[idx].x, buffer[idx].y); -} - -[test] -uniform 0 uint 0 -todo(sm<6) draw quad -probe (0, 0) rgba(0.0, 1.0, 2.0, 3.0) -uniform 0 uint 1 -todo(sm<6) draw quad -probe (0, 0) rgba(4.0, 5.0, 6.0, 7.0) - % Matrices [srv 0]