preprocessor: Undefining __VERSION__ on GLSL 3.30 is not an error
authorEduardo Lima Mitev <elima@igalia.com>
Wed, 8 Mar 2017 08:42:25 +0000 (09:42 +0100)
committerAlexander Galazin <Alexander.Galazin@arm.com>
Fri, 10 Mar 2017 17:01:38 +0000 (12:01 -0500)
OpenGL Shading Language 4.5 spec, section '3.3 Preprocessor',
page 12 states:

   "By convention, all macro names containing two consecutive
    underscores ( __ ) are reserved for use by underlying
    software layers. Defining such a name in a shader does not
    itself result in an error, but may result in unintended
    behaviors that stem from having multiple definitions of the
    same name."

There is no explicit mention to #undef, but the consensus is that
defining or undefining are both subject to the same restrictions
in this context.

Affects:
GL45-CTS.shaders.preprocessor.definitions.undefine_version_fragment
GL45-CTS.shaders.preprocessor.definitions.undefine_version_vertex

VK-GL-CTS issue: 206

Components: OpenGL

Change-Id: I36c9ada736d7704767e403b18f21d7343dff1aa2

external/openglcts/data/gl33/preprocessor.test

index 991bdeb..8768602 100644 (file)
@@ -236,7 +236,6 @@ group definitions "Symbol Definition Tests"
 
        case undefine_version
                version 330
-               expect compile_fail
                values { output float out0 = 1.0; }
                both ""
                        #version 330