Bug 75293 - [Bisected]Piglit spec_glsl-1.10_compiler_reserved_double-underscore-01.frag fails
Summary: [Bisected]Piglit spec_glsl-1.10_compiler_reserved_double-underscore-01.frag f...
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i915 (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: high major
Assignee: Ian Romanick
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-21 02:24 UTC by lu hua
Modified: 2014-02-24 03:35 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description lu hua 2014-02-21 02:24:18 UTC
System Environment:
--------------------------
Platform: Ironlake
Libdrm:		(master)libdrm-2.4.52-4-gc5de5abbd90333fe1359283fb3a5e457b0f389f3
Mesa:		(master)57405605a8c320f9d6ea389afd43ce6f013330a5
Xserver:	(master)xorg-server-1.15.0-627-gf34dc7fa96457ea6a0703493d74e63cca357712e
Xf86_video_intel:(master)2.99.910-47-gc91af569ee90a832899c9038badd84921e9a87fc
Cairo:		(master)4144307dbfbe7b297135d9ea4b080cae7e06b997
Libva:		(staging)fae9c44816a4c3cfc480d2879d1b4a0c1c3a1527
Libva_intel_driver:(staging)bd630edd844b88ea543a027654db296ff7da16cd
Kernel:	(drm-intel-nightly) 164a4cb4c1431a0689f85507868356fae24da638

Bug detailed description:
-------------------------
It fails on all platforms  with mesa master branch, works well on 10.1 branch.
Following piglit cases also fail with same bisect commit:
spec_glsl-1.10_compiler_reserved_double-underscore-02.frag	
spec_glsl-1.10_compiler_reserved_double-underscore-03.frag	

Bisect shows: 2c85fd5a964a78c9f7a93994fb79f1723c6f45b5 is the first bad commit
commit 2c85fd5a964a78c9f7a93994fb79f1723c6f45b5
Author:     Ian Romanick <ian.d.romanick@intel.com>
AuthorDate: Tue Feb 18 09:36:08 2014 -0800
Commit:     Ian Romanick <ian.d.romanick@intel.com>
CommitDate: Wed Feb 19 15:08:50 2014 -0800

    glsl: Only warn for macro names containing __

    From page 14 (page 20 of the PDF) of the GLSL 1.10 spec:

        "In addition, all identifiers containing two consecutive underscores
         (__) are reserved as possible future keywords."

    The intention is that names containing __ are reserved for internal use
    by the implementation, and names prefixed with GL_ are reserved for use
    by Khronos.  Names simply containing __ are dangerous to use, but should
    be allowed.

    Per the Khronos bug mentioned below, a future version of the GLSL
    specification will clarify this.

    Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
    Cc: "9.2 10.0 10.1" <mesa-stable@lists.freedesktop.org>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Tested-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
    Tested-by: Darius Spitznagel <d.spitznagel@goodbytez.de>
    Cc: Tapani Pälli <lemody@gmail.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71870
    Bugzilla: Khronos #11702

output:
Successfully compiled fragment shader /GFX/Test/Piglit/piglit/tests/spec/glsl-1.10/compiler/reserved/double-underscore-01.frag: 0:15(21): warning: identifier `__i_am_reserved' uses reserved `__' string

Shader source:
// [config]
// expect_result: fail
// glsl_version: 1.10
// [end config]
//
// Check that variable names that contain a double underscore, and the double
// underscore is located in the middle of the variable name, are reserved,
//
// From page 14 (20 of pdf) of the GLSL 1.10 spec:
//     "In addition, all identifiers containing two consecutive underscores
//     (__) are reserved as possible future keywords."

int f()
{
        int __i_am_reserved;
        return 0;
}

PIGLIT: {'result': 'fail' }

Reproduce steps:
-------------------------
1. xinit
2. ./bin/glslparsertest /GFX/Test/Piglit/piglit/tests/spec/glsl-1.10/compiler/reserved/double-underscore-01.frag fail 1.10
Comment 1 Ian Romanick 2014-02-21 22:20:04 UTC

*** This bug has been marked as a duplicate of bug 75294 ***
Comment 2 lu hua 2014-02-24 03:35:20 UTC
Fixed on latest Piglit and Mesa master branch.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.