summaryrefslogtreecommitdiffstats
path: root/tests/language-feature/shared-memory-initializer-error.slang
blob: ceb3611763c40b22d44bef877da7d9a079b7343a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//TEST:SIMPLE(filecheck=HLSL): -target hlsl -stage compute -entry computeMain
//TEST:SIMPLE(filecheck=GLSL): -target glsl -stage compute -entry computeMain

RWStructuredBuffer<uint> outputBuffer;

// GLSL: error 30623
// HLSL: error 30623
groupshared uint globalMem = 1;

[numthreads(1, 1, 1)]
void computeMain(int3 dispatchThreadID: SV_DispatchThreadID)
{
    outputBuffer[0] = globalMem ;
}