Merge pull request #2891 from dneto0/hlsl-namespace
[platform/upstream/glslang.git] / Test / hlsl.gather.offset.dx10.frag
1 SamplerState       g_sSamp : register(s0);
2
3 Texture1D          g_tTex1df4a : register(t1);
4
5 uniform Texture1D <float4> g_tTex1df4 : register(t0);
6 Texture1D <int4>   g_tTex1di4;
7 Texture1D <uint4>  g_tTex1du4;
8
9 Texture2D <float4> g_tTex2df4;
10 Texture2D <int4>   g_tTex2di4;
11 Texture2D <uint4>  g_tTex2du4;
12
13 Texture3D <float4> g_tTex3df4;
14 Texture3D <int4>   g_tTex3di4;
15 Texture3D <uint4>  g_tTex3du4;
16
17 TextureCube <float4> g_tTexcdf4;
18 TextureCube <int4>   g_tTexcdi4;
19 TextureCube <uint4>  g_tTexcdu4;
20
21 struct PS_OUTPUT
22 {
23     float4 Color : SV_Target0;
24     float  Depth : SV_Depth;
25 };
26
27 PS_OUTPUT main()
28 {
29    PS_OUTPUT psout;
30
31    // no 1D Gathers
32
33    float4 txval20 = g_tTex2df4 . Gather(g_sSamp, float2(0.1, 0.2), int2(1,0));
34    int4   txval21 = g_tTex2di4 . Gather(g_sSamp, float2(0.3, 0.4), int2(1,1));
35    uint4  txval22 = g_tTex2du4 . Gather(g_sSamp, float2(0.5, 0.6), int2(1,-1));
36
37    // no 3D gathers
38    // No Cube offset gathers
39
40    psout.Color = 1.0;
41    psout.Depth = 1.0;
42
43    return psout;
44 }