yum-mirror/slang

Making it easier to work with shaders

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

ArielG-NV[CBP] Pointer frontend changes + groupshared pointer support (#7848)7758625d3

master
479 B17 linesraw
1//DISABLE_TEST:SIMPLE(filecheck=SPIRV):-stage compute -entry computeMain -target spirv
2//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -output-using-type -emit-spirv-directly
3
4// SPIRV: OpEntryPoint
5// SPIRV-NOT: error
6
7//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer
8uniform int4* output;
9
10[shader("compute")]
11[numthreads(1, 1, 1)]
12void computeMain()
13{
14    // CHECK: 1
15    int* v = __getAddress(output[0].x);
16    InterlockedAdd(*v, 1);
17}