[Mesa-dev] [PATCH] glsl: glcpp: Allow "#if undefined-macro' to evaluate to false.

Kenneth Graunke kenneth at whitecape.org
Sat Jun 9 00:24:02 CEST 2012


On 06/08/2012 03:17 PM, Carl Worth wrote:
> A strict reading of the GLSL specification would have this be an
> error, but we've received reports from users who expect the
> preprocessor to interepret undefined macros as 0. This is the standard
> behavior of the rpeprocessor for C, and according to these user
> reports is also the behavior of other OpenGL implementations.
> 
> So here's one of those cases where we can make our users happier by
> ignoring the specification. And it's hard to imagine users who really,
> really want to see an error for this case.
> 
> The two affected tests cases are updated to reflect the new behavior.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>




More information about the mesa-dev mailing list