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

            Bug ID: 93731
           Summary: glUniformSubroutinesuiv segfaults when subroutine
                    uniform is bound to a specific location
           Product: Mesa
           Version: 11.0
          Hardware: x86-64 (AMD64)
                OS: Linux (All)
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Created attachment 121069
  --> https://bugs.freedesktop.org/attachment.cgi?id=121069&action=edit
fragment shader to test segfault

In GLSL, one can specify the location of a subroutine uniform by using
something like:
#extension GL_ARB_shader_subroutine : require
#extension GL_ARB_explicit_uniform_location : require
layout(location = 5) subroutine uniform color_t Color;

Assuming this is the only subroutine uniform, you should be able to set it's
value by calling:

UniformSubroutinesuiv(GL_FRAGMENT_SHADER, 6, &[0, 0, 0, 0, 0 ,
subroutin_index]);

According to the spec, the values [0]-[4] should be ignored, and the subroutine
uniform at location 5 should be set to `subroutin_index`.
Mesa will segfault when calling this function like that.

Unfortunately, I do not have a complete minimum example program right now (I'm
not good with raw opengl), but attached is a fragment shader which can be used
to reproduce the problem.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to