Merge pull request #2892 from greg-lunarg/mb
[platform/upstream/glslang.git] / Test / hlsl.structbuffer.floatidx.comp
1 struct sb_t
2 {
3     float4 color;
4     uint2  threadId;
5 };
6
7 RWTexture2D<float4> outtx;
8 ConsumeStructuredBuffer<sb_t> csb : register(u1);
9 RWStructuredBuffer<float4> rwsb;
10
11 [numthreads(1, 1, 1)]
12 void main(uint3 nThreadId : SV_DispatchThreadID)
13 {
14     sb_t data = csb.Consume();
15     float2 coord = float2(data.threadId.xy);
16     outtx[coord] = data.color;
17
18     rwsb[coord.x] = rwsb.Load(coord.y);
19 }