summaryrefslogtreecommitdiff
path: root/tests/glsl-intrinsic/image/nonImageAsParamWithMemoryQualifierError.slang
blob: 1248020d4aeeff2d39ba24cdf19e2bcde9cf092e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
//TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target glsl
//TEST:SIMPLE(filecheck=CHECK):  -allow-glsl -stage compute -entry computeMain -target spirv -emit-spirv-directly
//TEST_INPUT:ubuffer(data=[0], stride=4):out,name=outputBuffer

// restrict modifier is allowed to be dropped as a parameter
buffer MyBlockName2
{
    restrict uint data[1];
} outputBuffer;

layout(local_size_x = 4) in;

// CHECK: error 31206
bool checkAllImageSizes(writeonly uint val)
{
    return true
        && val == 0
        ;
}

void computeMain()
{
    outputBuffer.data[0] = true
        && checkAllImageSizes(outputBuffer.data[0])
        ;
}