yum-mirror/glslang

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

Ralph PotterabortEXT requires that the first parameter be a string literalefa01665

main
665 B26 linesraw
1#version 450
2
3#extension GL_EXT_abort : require
4
5layout(local_size_x = 1) in;
6
7layout(set = 0, binding = 0) buffer Data {
8    int i;
9} data;
10
11// The message, when present, must be a string literal. Calling abortEXT with no
12// arguments at all is allowed, and is covered by the positive tests.
13void main() {
14    // not a compile-time constant
15    abortEXT(data.i);
16
17    // constant, but not a string
18    abortEXT(1, 2);
19
20    // a compile-time constant of the wrong type is still not a string literal
21    const int notAString = 3;
22    abortEXT(notAString);
23
24    // a parenthesized string literal is an expression, not a string literal
25    abortEXT(("%d"), data.i);
26}