[Bug 83380] New: Linking fails when not writing gl_Position.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Sep 1 20:13:46 PDT 2014


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

          Priority: medium
            Bug ID: 83380
          Assignee: idr at freedesktop.org
           Summary: Linking fails when not writing gl_Position.
        QA Contact: intel-3d-bugs at lists.freedesktop.org
          Severity: normal
    Classification: Unclassified
                OS: Linux (All)
          Reporter: kondapallykalyancontribute at gmail.com
          Hardware: All
            Status: NEW
           Version: 10.2
         Component: glsl-compiler
           Product: Mesa

Created attachment 105583
  --> https://bugs.freedesktop.org/attachment.cgi?id=105583&action=edit
Fix.

>From GLSL3.0 Spec(section 7.1)
"The variable gl_Position is intended for writing the homogeneous vertex
position. It can be written at any time during shader execution. This value
will be used by primitive assembly, clipping, culling, and other fixed
functionality operations, if present, that operate on primitives after vertex
processing has occurred. Its value is undefined after the vertex processing
stage if the vertex shader executable does not write gl_Position."

Failing to write to a gl_position is not an error and atleast the linking of
shaders should pass. Mesa throws an linker error in case we dont write to a
gl_position. 


GL & GLSL version:

OpenGL ES 3.0 Mesa 10.3.0-devel (git-a1853ea)
OpenGL ES GLSL ES 3.0


Use Case:

The following WebGL conformance tests fail when running Chromium Web Browser
with Wayland(https://github.com/01org/ozone-wayland)

1)https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/glsl/misc/empty_main.vert.html
2)https://github.com/KhronosGroup/WebGL/blob/master/sdk/tests/conformance/glsl/misc/gl_position_unset.vert.html

Related discussion on khronos webgl mailing list:
http://www.khronos.org/webgl/public-mailing-list/archives/1306/msg00042.html

Possible fix:
I have attached the patch which changes the error to warning.

-- 
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/20140902/bc73463b/attachment-0001.html>


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