[Mesa-dev] glsl es question: invalid pragma debug argument
Samuel Iglesias Gonsálvez
siglesias at igalia.com
Mon Nov 24 02:13:49 PST 2014
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hello,
I found a GLSL ES test that provides an invalid argument to #pragma
debug() such as:
#pragma debug (1.23)
And it expects a compilation error. Mesa doesn't complain about it,
just ignore the whole thing. The allowed keywords are 'on' and 'off'
for that pragma.
- From GLSL ES 3.00 spec, chapter 3.4 (Preprocessor), page 12:
"#pragma allows implementation dependent compiler control.
Tokens following #pragma are not subject to preprocessor macro
expansion. If an implementation does not recognize the tokens
following #pragma, then it will ignore that pragma. [...] The
debug pragma
#pragma debug(on)
#pragma debug(off)
can be used to enable compiling and annotating a shader with
debug information, so that it can be used with a debugger. It
can only be used outside function definitions. By default, debug
is turned off.
The scope as well as the effect of the optimize and debug
pragmas is implementation-dependent except that their use must
not generate an error."
So, from the spec, I understand that Mesa is doing the right thing but
I would like to have a confirmation because it is a valid pragma but
with wrong argument.
Thanks,
Sam
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJUcwTdAAoJEH/0ujLxfcNDAIwQAM4RSkacygSTXY1qCT8Py55x
zVqwhtwuPmqLVxMd8K+OnGvU5mqW9pVeyIH2YtX01ODt9ytWw925cY1AdZd4n2h2
KY58PDD+AhlS9r4QRYFiihQtY0JPZgHZ56SePXmoHEQKHA0bXrpFiPvQl40i5Tjy
g1z/S6Gnjj4UbQHxE+M2VXrBlebQ2QSIC5UG8wXb5AOYApa/U+TNSbQidVFqLIB8
gLnnVd5hPGgrgfewLz+MSKuk9lyRuliWYbe7c8JBfBrS1Q6e4xh8nx0laacPMz1j
nxgAddHtet8iuT2z21opcm3xOcYSrZR7NFnZGcln6zVhUMNhNkSyR6ZDDiRwzgu8
ccKVoVzKLgsNlaDef5/0QFxeNCEWUnad+ajpV6VxAYZS4GtL2P9DVn0P7NV574wt
3gkrU8z4X1zSqYdzIQr0C2f60fJ8k5/Cs3qCGXB4UfJdI7Oe8HY9w38pRdzDnQDp
S+sdLQVigR2/pbk8GQOqXMd84mHmtSzvIh0DB18uj/Vq6zlLWVzo4rDEAcmlQXW/
cstU9eZCJzGmPBodMwrQD4fIKplM7uFc8HUlpe6Okzka36cKrOGw/hXBL326qGRk
meQWIO1O1L7o+CQk06m64r7gD8VtI+33k75XP6fPU5Wu8z3v+ZBwhvJx3g4Fv9Ls
CEoqCp2n2Y5Zhq6/hrle
=7Q3l
-----END PGP SIGNATURE-----
More information about the mesa-dev
mailing list