yum-mirror/glslang

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

Ralph PotterMake printf require that the first parameter be a string literal6fd3b430

main
573 B25 linesraw
1#version 450
2#extension GL_EXT_debug_printf : enable
3
4void main()
5{
6    // invalid hex sequence
7    debugPrintfEXT("\xZ");
8
9    // not an octal sequence
10    debugPrintfEXT("\8");
11
12    // the format must be a string literal, not just any constant expression
13    const int notAString = 1;
14    debugPrintfEXT(notAString, 2);
15
16    // a parenthesized string literal is an expression, not a string literal
17    debugPrintfEXT(("%d"), 3);
18
19    // a non-constant format
20    int i = 4;
21    debugPrintfEXT(i);
22
23    // no format at all
24    debugPrintfEXT();
25}