1 SamplerState g_sSamp : register(s0);
3 RWTexture1D <float> g_tTex1df1;
4 RWTexture1D <int> g_tTex1di1;
5 RWTexture1D <uint> g_tTex1du1;
7 RWTexture2D <float> g_tTex2df1;
8 RWTexture2D <int> g_tTex2di1;
9 RWTexture2D <uint> g_tTex2du1;
11 RWTexture3D <float> g_tTex3df1;
12 RWTexture3D <int> g_tTex3di1;
13 RWTexture3D <uint> g_tTex3du1;
15 RWTexture1DArray <float> g_tTex1df1a;
16 RWTexture1DArray <int> g_tTex1di1a;
17 RWTexture1DArray <uint> g_tTex1du1a;
19 RWTexture2DArray <float> g_tTex2df1a;
20 RWTexture2DArray <int> g_tTex2di1a;
21 RWTexture2DArray <uint> g_tTex2du1a;
25 float4 Color : SV_Target0;
42 int Fn1(in int x) { return x; }
43 uint Fn1(in uint x) { return x; }
44 float Fn1(in float x) { return x; }
46 void Fn2(out int x) { x = int(0); }
47 void Fn2(out uint x) { x = uint(0); }
48 void Fn2(out float x) { x = float(0); }
50 float SomeValue() { return c1; }
59 float r00 = g_tTex1df1[c1];
60 int r01 = g_tTex1di1[c1];
61 uint r02 = g_tTex1du1[c1];
64 float r10 = g_tTex2df1[c2];
65 int r11 = g_tTex2di1[c2];
66 uint r12 = g_tTex2du1[c2];
69 float r20 = g_tTex3df1[c3];
70 int r21 = g_tTex3di1[c3];
71 uint r22 = g_tTex3du1[c3];
77 g_tTex1df1[c1] = SomeValue(); // complex R-value
79 g_tTex1di1[c1] = int(2);
80 g_tTex1du1[c1] = uint(3);
82 // Test some operator= things, which need to do both a load and a store.
83 float val1 = (g_tTex1df1[c1] *= 2.0);
84 g_tTex1df1[c1] -= 3.0;
85 g_tTex1df1[c1] += 4.0;
89 g_tTex1di1[c1] &= 0xffff;
90 g_tTex1di1[c1] |= 0xf0f0;
95 g_tTex2df1[c2] = SomeValue(); // complex L-value
97 g_tTex2di1[c2] = int(5);
98 g_tTex2du1[c2] = uint(6);
101 g_tTex3df1[c3] = SomeValue(); // complex L-value
102 g_tTex3df1[c3] = lf1;
103 g_tTex3di1[c3] = int(8);
104 g_tTex3du1[c3] = uint(9);
106 // Test function calling
107 Fn1(g_tTex1df1[c1]); // in
108 Fn1(g_tTex1di1[c1]); // in
109 Fn1(g_tTex1du1[c1]); // in
111 Fn2(g_tTex1df1[c1]); // out
112 Fn2(g_tTex1di1[c1]); // out
113 Fn2(g_tTex1du1[c1]); // out
115 // Test increment operators
135 g_tTex1df1[1] = g_tTex2df1[int2(2, 3)];