Bug 31925 - [GLSL 1.20] "#pragma STDGL invariant(all)" fail
[GLSL 1.20] "#pragma STDGL invariant(all)" fail
Status: VERIFIED FIXED
Product: Mesa
Classification: Unclassified
Component: glsl-compiler
7.10
Other All
: medium normal
Assigned To: Ian Romanick
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-11-25 18:57 UTC by Gordon Jin
Modified: 2011-02-11 21:56 UTC (History)
1 user (show)

See Also:


Attachments
test case for piglit shader_runner (327 bytes, application/octet-stream)
2010-11-25 18:57 UTC, Gordon Jin
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gordon Jin 2010-11-25 18:57:57 UTC
Created attachment 40577 [details]
test case for piglit shader_runner

GLSL spec 1.20 section 4.6.1 mentions all output variables can be forced to be invariant by:
    #pragma STDGL invariant(all)

but the attached test case shows it doesn't take effect, which fails with below error:

Failed to link:
error: vertex shader output `var' lacks invariant qualifier, but fragment shader input has invariant qualifier

PIGLIT: {'result': 'fail' }

Tested on Piketon (i965) with mesa master.
Comment 1 Vinson Lee 2010-11-25 21:30:16 UTC
I committed the attached test case (attachment id=40577) to piglit.
Comment 2 Ian Romanick 2011-01-06 10:58:07 UTC
Since the 7.9.1 and 7.10 releases are tomorrow, I'm going to wait to cherry pick these patches until after the release.

commit f2d0f776b17947f2e84a82444771faa853a76b8b
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Jan 6 10:53:38 2011 -0800

    glsl: Refresh autogenerated lexer and parser files.
    
    For the previous commit.

commit 86b4398cd158024f6be9fa830554a11c2a7ebe0c
Author: Ian Romanick <ian.d.romanick@intel.com>
Date:   Thu Jan 6 10:49:56 2011 -0800

    glsl: Support the 'invariant(all)' pragma
    
    Previously the 'STDGL invariant(all)' pragma added in GLSL 1.20 was
    simply ignored by the compiler.  This adds support for setting all
    variable invariant.
    
    In GLSL 1.10 and GLSL ES 1.00 the pragma is ignored, per the specs,
    but a warning is generated.
    
    Fixes piglit test glsl-invariant-pragma and bugzilla #31925.
    
    NOTE: This is a candidate for the 7.9 and 7.10 branches.
Comment 3 Ian Romanick 2011-01-27 12:28:59 UTC
Fixed by 77579801392c23d6fa425982dd8fa7cbdec2ca2e (7.9) and 6fded6d29d17b5402349881350fe92c175cbdc43 (7.10).
Comment 4 Gordon Jin 2011-02-11 21:56:32 UTC
verified.