Merge pull request #2908 from Biswa96/cmake-spirv-remap
[platform/upstream/glslang.git] / Test / hlsl.imagefetch-subvec4.comp
1 Texture1D<float>            i1D:            register(t0);
2 Texture2D<float>            i2D:            register(t1);
3 Texture3D<float>            i3D:            register(t2);
4 Texture1DArray<float>       i1DArray:       register(t3);
5 Texture2DArray<float>       i2DArray:       register(t4);
6 Texture2DMS<float>          i2DMS:          register(t5);
7 Texture2DMSArray<float>     i2DMSArray:     register(t6);
8
9 Texture1D<int>              ii1D:           register(t7);
10 Texture2D<int>              ii2D:           register(t8);
11 Texture3D<int>              ii3D:           register(t9);
12 Texture1DArray<int>         ii1DArray:      register(t10);
13 Texture2DArray<int>         ii2DArray:      register(t11);
14 Texture2DMS<int>            ii2DMS:         register(t12);
15 Texture2DMSArray<int>       ii2DMSArray:    register(t13);
16
17 RWTexture3D<float> OUT: register(u0);
18
19 [numthreads(8,8,8)]
20 void main(uint3 tid: SV_DispatchThreadID)
21 {
22     float f = 0.0;
23     f += i1D[tid.x];
24     f += i2D[tid.xy];
25     f += i3D[tid];
26     f += i1DArray[tid.xy];
27     f += i2DArray[tid];
28     f += i2DMS.Load(tid.xy, 1);
29     f += i2DMSArray.Load(tid, 3);
30
31     int i = 0.0;
32     i += ii1D[tid.x];
33     i += ii2D[tid.xy];
34     i += ii3D[tid];
35     i += ii1DArray[tid.xy];
36     i += ii2DArray[tid];
37     i += ii2DMS.Load(tid.xy, 1);
38     i += ii2DMSArray.Load(tid, 3);
39
40     OUT[tid] = f + float(i);
41 }