diff options
author | Ian Romanick <[email protected]> | 2016-08-09 14:32:24 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2016-08-10 16:42:02 -0700 |
commit | 50b49d242d702e4728329cc59f87d929963e7c53 (patch) | |
tree | a2267d01a0b3fc3a94393ef9a0ed6a652a05c0bf /src/mapi/mapi.c | |
parent | eda6349346616f3a45ca2d03e2c1a3da956df6b3 (diff) |
glcpp: Only disallow #undef of pre-defined macros on GLSL ES >= 3.00 shaders
Section 3.4 (Preprocessor) of the GLSL ES 3.00 spec says:
It is an error to undefine or to redefine a built-in (pre-defined)
macro name.
The GLSL ES 1.00 spec does not contain this text.
Section 3.3 (Preprocessor) of the GLSL 1.30 spec says:
#define and #undef functionality are defined as is standard for C++
preprocessors for macro definitions both with and without macro
parameters.
At least as far as I can tell GCC allow '#undef __FILE__'. Furthermore,
there are desktop OpenGL conformance tests that expect '#undef
__VERSION__' and '#undef GL_core_profile' to work.
Fixes:
GL45-CTS.shaders.preprocessor.definitions.undefine_version_vertex
GL45-CTS.shaders.preprocessor.definitions.undefine_version_fragment
GL45-CTS.shaders.preprocessor.definitions.undefine_core_profile_vertex
GL45-CTS.shaders.preprocessor.definitions.undefine_core_profile_fragment
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/mapi/mapi.c')
0 files changed, 0 insertions, 0 deletions