[Bug 90157] New: GLSL ES does not allow non-constant initializers for globals

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 23 22:17:21 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=90157

            Bug ID: 90157
           Summary: GLSL ES does not allow non-constant initializers for
                    globals
           Product: Mesa
           Version: git
          Hardware: Other
                OS: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: glsl-compiler
          Assignee: idr at freedesktop.org
          Reporter: idr at freedesktop.org
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Desktop GLSL allows things like

uniform int foo;
int bar = foo + 10;

void main()
{
    ...
}

However, the GLSL ES 3.0 and 3.1 specifications have the following language in
section 4.3:

    "Initializers may only be used in declarations of globals with no storage
    qualifier or with a const qualifier. Such initializers must be a constant
    expression."

There is anecdotal evidence that other implementations, at least on Android,
enforce this restriction.  At the very least, we should emit a portability
warning.  We probably should emit an error (in GLSL ES only) and have a driconf
option to disable.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20150424/915c7f3c/attachment.html>


More information about the intel-3d-bugs mailing list