yum-mirror/slang

Making it easier to work with shaders

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

ArielG-NVImplement GLSL gimageDim & memory qualifiers with optional extension(s); resolves #3587 for GLSL & SPIR-V targets #3631 (#3810)0877d1a3e

master
660 B26 linesraw
1//TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target glsl
2//TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly
3//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer
4
5// restrict modifier is allowed to be dropped as a parameter
6buffer MyBlockName2
7{
8    restrict uint data[1];
9} outputBuffer;
10
11layout(local_size_x = 4) in;
12
13// CHECK: error 31206
14bool checkAllImageSizes(writeonly uint val)
15{
16    return true
17        && val == 0
18        ;
19}
20
21void computeMain()
22{
23    outputBuffer.data[0] = true
24        && checkAllImageSizes(outputBuffer.data[0])
25        ;
26}