[Mesa-dev] [PATCH 2/2] glsl: Don't choke on an empty pragma

Kenneth Graunke kenneth at whitecape.org
Fri Jun 13 16:37:47 PDT 2014

On Friday, June 13, 2014 04:04:44 PM Carl Worth wrote:
> The lexer was insisting that there be at least one character after "#pragma"
> and before the end of the line. This caused an error for a line consisting
> only of "#pragma" which volates at least the following sentence from the 
> ES Specification 3.00.4:
> 	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. [Page 12 (Page 28 of PDF)]
> and likely the following sentence from that specification and also in
> GLSLangSpec 4.30.6:
> 	If an implementation does not recognize the tokens following #pragma,
> 	then it will ignore that pragma.
> Add a "make check" test to ensure no future regressions.
> This change fixes at least part of the following Khronos GLES3 CTS test:
> 	preprocessor.pragmas.pragma_vertex

<sarcasm>Because empty #pragmas are so useful!</sarcasm>

Ah well.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140613/09481374/attachment.sig>

More information about the mesa-dev mailing list