Bug 97307 - glsl/glcpp/tests/glcpp-test regression
Summary: glsl/glcpp/tests/glcpp-test regression
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: glsl-compiler (show other bugs)
Version: git
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Kenneth Graunke
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords: bisected, regression
Depends on:
Blocks:
 
Reported: 2016-08-11 20:30 UTC by Vinson Lee
Modified: 2016-08-16 05:58 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2016-08-11 20:30:57 UTC
mesa: 17f1c49b9ad05af4f6482f6fa950e5dcc1a779d1 (master 12.1.0-devel)

Testing ./glsl/glcpp/tests/120-undef-builtin.c... > src/compiler/glsl/glcpp/tests/120-undef-builtin.c.out (./glsl/glcpp/tests/120-undef-builtin.c.expected) FAIL
--- ./glsl/glcpp/tests/120-undef-builtin.c.expected     2016-01-26 09:59:33.017797268 -0800
+++ src/compiler/glsl/glcpp/tests/120-undef-builtin.c.out  2016-08-11 10:30:15.630875304 -0700
@@ -1,6 +1,3 @@
-0:1(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.
-0:2(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.
-0:3(1): preprocessor error: Built-in (pre-defined) macro names cannot be undefined.


50b49d242d702e4728329cc59f87d929963e7c53 is the first bad commit
commit 50b49d242d702e4728329cc59f87d929963e7c53
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Tue Aug 9 14:32:24 2016 -0700

    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 <ian.d.romanick@intel.com>
    Reviewed-by: Timothy Arceri <timothy.arceri@collabora.com>
    Cc: mesa-stable@lists.freedesktop.org

:040000 040000 fbe8d2e45f4f1e6755e70b6e6f8fa971701e3ae8 d7c77a29d8aa922a28948df34eca499077eaac45 M	src
bisect run success
Comment 1 Ian Romanick 2016-08-12 22:43:13 UTC
I'll just need to update the test.  Ideally I'd like to be able to test version-specific behavior, but I'm not sure the standalone preprocessor can do that.
Comment 3 Kenneth Graunke 2016-08-16 05:58:33 UTC
Fixed by:

commit 1f47f78fc3193ecff13799305a8e35af82e68a06
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Sun Aug 14 21:00:31 2016 -0700

    glcpp: Update tests for new #undef of built-in macro rules.


bug/show.html.tmpl processed on Mar 26, 2017 at 03:28:24.
(provided by the Example extension).