1 SamplerState g_sSamp : register(s0);
3 RWTexture1D <float4> g_tTex1df4 : register(t0);
4 RWTexture1D <int4> g_tTex1di4;
5 RWTexture1D <uint4> g_tTex1du4;
7 RWTexture2D <float4> g_tTex2df4;
8 RWTexture2D <int4> g_tTex2di4;
9 RWTexture2D <uint4> g_tTex2du4;
11 RWTexture3D <float4> g_tTex3df4;
12 RWTexture3D <int4> g_tTex3di4;
13 RWTexture3D <uint4> g_tTex3du4;
15 RWTexture1DArray <float4> g_tTex1df4a;
16 RWTexture1DArray <int4> g_tTex1di4a;
17 RWTexture1DArray <uint4> g_tTex1du4a;
19 RWTexture2DArray <float4> g_tTex2df4a;
20 RWTexture2DArray <int4> g_tTex2di4a;
21 RWTexture2DArray <uint4> g_tTex2du4a;
25 float4 Color : SV_Target0;
42 int4 Fn1(in int4 x) { return x; }
43 uint4 Fn1(in uint4 x) { return x; }
44 float4 Fn1(in float4 x) { return x; }
46 void Fn2(out int4 x) { x = int4(0); }
47 void Fn2(out uint4 x) { x = uint4(0); }
48 void Fn2(out float4 x) { x = float4(0); }
50 float4 SomeValue() { return c4; }
59 float4 r00 = g_tTex1df4[c1];
60 int4 r01 = g_tTex1di4[c1];
61 uint4 r02 = g_tTex1du4[c1];
64 float4 r10 = g_tTex2df4[c2];
65 int4 r11 = g_tTex2di4[c2];
66 uint4 r12 = g_tTex2du4[c2];
69 float4 r20 = g_tTex3df4[c3];
70 int4 r21 = g_tTex3di4[c3];
71 uint4 r22 = g_tTex3du4[c3];
77 g_tTex1df4[c1] = SomeValue(); // complex R-value
79 g_tTex1di4[c1] = int4(2,2,3,4);
80 g_tTex1du4[c1] = uint4(3,2,3,4);
82 // Test some operator= things, which need to do both a load and a store.
83 float4 val1 = (g_tTex1df4[c1] *= 2.0);
84 g_tTex1df4[c1] -= 3.0;
85 g_tTex1df4[c1] += 4.0;
89 g_tTex1di4[c1] &= 0xffff;
90 g_tTex1di4[c1] |= 0xf0f0;
95 g_tTex2df4[c2] = SomeValue(); // complex L-value
97 g_tTex2di4[c2] = int4(5,2,3,4);
98 g_tTex2du4[c2] = uint4(6,2,3,4);
101 g_tTex3df4[c3] = SomeValue(); // complex L-value
102 g_tTex3df4[c3] = lf4;
103 g_tTex3di4[c3] = int4(8,6,7,8);
104 g_tTex3du4[c3] = uint4(9,2,3,4);
106 // Test function calling
107 Fn1(g_tTex1df4[c1]); // in
108 Fn1(g_tTex1di4[c1]); // in
109 Fn1(g_tTex1du4[c1]); // in
111 Fn2(g_tTex1df4[c1]); // out
112 Fn2(g_tTex1di4[c1]); // out
113 Fn2(g_tTex1du4[c1]); // out
115 // Test increment operators
135 g_tTex1df4[1] = g_tTex2df4[int2(2,3)];