Merge branch 'semantic_handling' of https://github.com/TiemoJung/glslang into TiemoJu...
[platform/upstream/glslang.git] / Test / hlsl.structbuffer.fn.frag
1
2 StructuredBuffer<uint4>  sbuf : register(t10);
3
4 uint4 get(in StructuredBuffer<uint4> sb, uint bufferOffset)
5 {
6     return sb[bufferOffset];
7 }
8
9 void set(in RWStructuredBuffer<uint4> sb, uint bufferOffset, uint4 data)
10 {
11     sb[bufferOffset] = data;
12 }
13
14 RWStructuredBuffer<uint4> sbuf2;
15
16 // Not shared, because of type difference.
17 StructuredBuffer<uint3>  sbuf3 : register(t12);
18
19 float4 main(uint pos : FOO) : SV_Target0
20 {
21     set(sbuf2, 2, get(sbuf, 3));
22
23     return 0;
24 }