steve-lunarg | 07830e8 | 2016-10-10 10:00:14 -0600 | [diff] [blame] | 1 | SamplerState g_sSamp : register(s0); |
| 2 | |
| 3 | Texture1D <float4> g_tTex1df4 : register(t0); |
| 4 | Texture1D <int4> g_tTex1di4; |
| 5 | Texture1D <uint4> g_tTex1du4; |
| 6 | |
| 7 | Texture2D <float4> g_tTex2df4; |
| 8 | Texture2D <int4> g_tTex2di4; |
| 9 | Texture2D <uint4> g_tTex2du4; |
| 10 | |
| 11 | Texture3D <float4> g_tTex3df4; |
| 12 | Texture3D <int4> g_tTex3di4; |
| 13 | Texture3D <uint4> g_tTex3du4; |
| 14 | |
| 15 | Texture1DArray <float4> g_tTex1df4a; |
| 16 | Texture1DArray <int4> g_tTex1di4a; |
| 17 | Texture1DArray <uint4> g_tTex1du4a; |
| 18 | |
| 19 | Texture2DArray <float4> g_tTex2df4a; |
| 20 | Texture2DArray <int4> g_tTex2di4a; |
| 21 | Texture2DArray <uint4> g_tTex2du4a; |
| 22 | |
| 23 | struct PS_OUTPUT |
| 24 | { |
| 25 | float4 Color : SV_Target0; |
| 26 | }; |
| 27 | |
| 28 | uniform int c1; |
| 29 | uniform int2 c2; |
| 30 | uniform int3 c3; |
| 31 | uniform int4 c4; |
| 32 | |
| 33 | uniform int o1; |
| 34 | uniform int2 o2; |
| 35 | uniform int3 o3; |
| 36 | uniform int4 o4; |
| 37 | |
| 38 | int4 Fn1(in int4 x) { return x; } |
| 39 | uint4 Fn1(in uint4 x) { return x; } |
| 40 | float4 Fn1(in float4 x) { return x; } |
| 41 | |
| 42 | float4 SomeValue() { return c4; } |
| 43 | |
| 44 | PS_OUTPUT main() |
| 45 | { |
| 46 | PS_OUTPUT psout; |
| 47 | |
| 48 | // 1D |
| 49 | g_tTex1df4[c1]; |
| 50 | |
| 51 | float4 r00 = g_tTex1df4[c1]; |
| 52 | int4 r01 = g_tTex1di4[c1]; |
| 53 | uint4 r02 = g_tTex1du4[c1]; |
| 54 | |
| 55 | // 2D |
| 56 | float4 r10 = g_tTex2df4[c2]; |
| 57 | int4 r11 = g_tTex2di4[c2]; |
| 58 | uint4 r12 = g_tTex2du4[c2]; |
| 59 | |
| 60 | // 3D |
| 61 | float4 r20 = g_tTex3df4[c3]; |
| 62 | int4 r21 = g_tTex3di4[c3]; |
| 63 | uint4 r22 = g_tTex3du4[c3]; |
| 64 | |
| 65 | // Test function calling |
| 66 | Fn1(g_tTex1df4[c1]); // in |
| 67 | Fn1(g_tTex1di4[c1]); // in |
| 68 | Fn1(g_tTex1du4[c1]); // in |
| 69 | |
| 70 | psout.Color = 1.0; |
| 71 | |
| 72 | return psout; |
| 73 | } |