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
523 B17 linesraw
1//TEST:SIMPLE(filecheck=CHECK_FAIL): -target glsl -entry computeMain -stage compute
2//TEST:SIMPLE(filecheck=CHECK_PASS): -target spirv -entry computeMain -stage compute
3
4// Test that __getAddress correctly reports capabilities.
5
6uniform int* outputBuffer;
7uniform int* buffer;
8
9// CHECK_PASS: OpEntryPoint
10// CHECK_PASS-NOT: error
11
12// CHECK_FAIL: ([[# @LINE+1]]): error 36107{{.*}}glsl
13void computeMain()
14{
15    // CHECK: ([[# @LINE+1]]): note: see using of '__getAddress'
16    outputBuffer[0] = *(__getAddress(buffer[0]));
17}