summaryrefslogtreecommitdiff
path: root/tests/hlsl/simple/globallycoherent.hlsl
blob: 70b5cdb2b7a6354d68e5639737fd340bf60ba692 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
//TEST:COMPARE_HLSL:-profile cs_5_0

// Check output for `globallycoherent`

#ifndef __SLANG__
#define gBuffer gBuffer_0
#define SV_DispatchThreadID SV_DISPATCHTHREADID
#endif

globallycoherent
RWStructuredBuffer<uint> gBuffer : register(u0);

[numthreads(16,1,1)]
void main(
	uint tid : SV_DispatchThreadID)
{
	uint index = tid;

    gBuffer[index] = gBuffer[index + 1];
}