[Bug 96354] [i965] GS instancing (gl_InvocationID) reads garbage instead of what the vertex shader says

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jun 3 04:28:34 UTC 2016


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

            Bug ID: 96354
           Summary: [i965] GS instancing (gl_InvocationID) reads garbage
                    instead of what the vertex shader says
           Product: Mesa
           Version: git
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Drivers/DRI/i965
          Assignee: idr at freedesktop.org
          Reporter: thematrixeatsyou at gmail.com
        QA Contact: intel-3d-bugs at lists.freedesktop.org

Created attachment 124298
  --> https://bugs.freedesktop.org/attachment.cgi?id=124298&action=edit
Point-to-cube geometry shader with toggleable GS instancing

Overview:

  If GLSL 4.00 GS instancing is enabled via the `layout(invocations = x) in;`
layout specifier (where x > 1), the GS no longer reads valid data from the
vertex shader.

Steps to Reproduce:

  You will need a GPU which currently supports GLSL 4.00. This is currently
restricted to gen8+.

  1) Find a geometry shader you can change.
  2) Ensure the #version directive is 400 or higher - if not, bump it up to
400.
  3) Add this line near the top of it:

    layout(invocations = 2) in;

  4) Observe that the geometry is now garbage or apparently missing (degenerate
/ culled primitives).

  Attached is a geometry shader with toggleable GS instancing. It requires
GL_POINTS as input.

  vec3 v_vtx[], v_col[] are vertex and colour attribute data respectively.
  mat4 Mproj, Mcam are projection and modelview matrices respectively.
  vec3 campos is the position of the camera in the world.

Expected Results:

  For the given shader, input points should be expanded to cubes of their
respective colours.

Actual Results:

  A single black cube appears at (0, 0, 0).

  In some frames you may see intermittent garbage - this is noticeable at
~3000FPS with vsync disabled.

  The uniform data is being read correctly, but the VS input data is completely
wrong.

Additional Information:

  Build Date: 2016-06-03 ~15:30 +1200
  Git Revision: d10ae20b9678f1a5b8a81716c68e612662665277
  GPU: Intel HD 530 (Skylake GT2)
  OS: Void Linux

  This bug may be relevant (#93859) - the output is SIMD8:
https://bugs.freedesktop.org/show_bug.cgi?id=93859

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


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