[Bug 74819] New: Using a shared global uniform struct in both vertex and fragment shader prevents the program from linking

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 10 18:38:58 PST 2014


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

          Priority: medium
            Bug ID: 74819
          Assignee: idr at freedesktop.org
           Summary: Using a shared global uniform struct in both vertex
                    and fragment shader prevents the program from linking
        QA Contact: intel-3d-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: arseny.kapoulkine at gmail.com
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: glsl-compiler
           Product: Mesa

Created attachment 93822
  --> https://bugs.freedesktop.org/attachment.cgi?id=93822&action=edit
Patch for glsl/linker.cpp that fixes the issue

The GLSL specification says that it's valid to have a global that's using a
structure in both vertex and fragment shader, as long as the structure
definition (name, field names and field types) matches.

Mesa GLSL linker does not do this analysis and instead just flags this as an
error in cross_validate_globals.

Additionally, the spec allows global explicitly sized arrays with the same
name; looks like this case is not handled as well.

I'm attaching a patch that resolves this by verifying that struct/array
field/order matches before giving the error.

-- 
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/20140211/eb364aa5/attachment.html>


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