yum-mirror/slang

Making it easier to work with shaders

git clone https://git.yummers.dev/yum-mirror/slang

Yong HeFix spirv emit for global pointer variable. (#5009)77ecad28c

master
348 B14 linesraw
1//TEST:SIMPLE(filecheck=CHECK): -target spirv
2
3// CHECK: OpDecorate %g_Instance AliasedPointer
4
5static int* g_Instance = nullptr;
6
7[vk::push_constant] int* dest;
8
9[numthreads(1)]
10void ComputeMain(int tid : SV_DispatchThreadID) {
11    // int* g_Instance = nullptr;
12    if (tid % 2 == 0) g_Instance = dest;
13    if (g_Instance) g_Instance[tid] = 123;
14}