1SamplerState g_sSamp : register(s0); 2 3Texture1D <float4> g_tTex1df4 : register(t0); 4Texture1D <int4> g_tTex1di4; 5Texture1D <uint4> g_tTex1du4; 6 7Texture2D <float4> g_tTex2df4; 8Texture2D <int4> g_tTex2di4; 9Texture2D <uint4> g_tTex2du4; 10 11Texture3D <float4> g_tTex3df4; 12Texture3D <int4> g_tTex3di4; 13Texture3D <uint4> g_tTex3du4; 14 15Texture1DArray <float4> g_tTex1df4a; 16Texture1DArray <int4> g_tTex1di4a; 17Texture1DArray <uint4> g_tTex1du4a; 18 19Texture2DArray <float4> g_tTex2df4a; 20Texture2DArray <int4> g_tTex2di4a; 21Texture2DArray <uint4> g_tTex2du4a; 22 23struct PS_OUTPUT 24{ 25 float4 Color : SV_Target0; 26}; 27 28uniform int c1; 29uniform int2 c2; 30uniform int3 c3; 31uniform int4 c4; 32 33uniform int o1; 34uniform int2 o2; 35uniform int3 o3; 36uniform int4 o4; 37 38int4 Fn1(in int4 x) { return x; } 39uint4 Fn1(in uint4 x) { return x; } 40float4 Fn1(in float4 x) { return x; } 41 42float4 SomeValue() { return c4; } 43 44PS_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} 74