From: Conor McCarthy cmccarthy@codeweavers.com
--- tests/hlsl/non-const-indexing.shader_test | 26 +++++++++++++++++++++++ 1 file changed, 26 insertions(+)
diff --git a/tests/hlsl/non-const-indexing.shader_test b/tests/hlsl/non-const-indexing.shader_test index 5c8e1db4a..27ea657c5 100644 --- a/tests/hlsl/non-const-indexing.shader_test +++ b/tests/hlsl/non-const-indexing.shader_test @@ -194,3 +194,29 @@ uniform 8 int 3 uniform 9 int 4 todo(sm>=6) draw quad todo(sm>=6) probe all rgba (1126, 3344, 5566, 3788) + + +[pixel shader] +uniform float4 f[4]; +uniform uint4 u; +uniform uint4 v; + +float4 main() : sv_target +{ + float temp[4]; + temp[0] = f[u.x]; + temp[1] = f[u.y]; + temp[2] = f[u.z]; + temp[3] = f[u.w]; + return float4(temp[v.x], temp[v.y], temp[v.z], temp[v.w]); +} + +[test] +uniform 0 float 1.0 +uniform 4 float 2.0 +uniform 8 float 3.0 +uniform 12 float 4.0 +uniform 16 uint4 3 1 0 2 +uniform 20 uint4 0 3 1 2 +todo(sm>=6) draw quad +todo(sm>=6) probe all rgba (4.0, 3.0, 2.0, 1.0)