[Mesa-dev] [Bug 43138] New: [glsl] fail to get the active attribute with function glGetProgramiv

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 21 06:41:40 PST 2011


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

             Bug #: 43138
           Summary: [glsl] fail to get the active attribute with function
                    glGetProgramiv
    Classification: Unclassified
           Product: Mesa
           Version: 7.11
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Mesa core
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: yi.sun at intel.com


System Environment:
--------------------------
Mesa:(7.11)21364bd09d6133f5da12986678fa995fa0aea7e4

Bug detailed description:
-------------------------

Fail to retrieve the correct number of active attribute with glGetProgramiv
with GL_ACTIVE_ATTRIBUTES.

The vertext shader is as following:
static const char vs_source[] =                                          
        "attribute  float  myAttribVar; \n"                              
        "attribute  float  maxAttribVal; \n"                             
        "void main() \n"                                                 
        "{ \n"                                                                  
        "    gl_Position = gl_ModelViewProjectionMatrix * gl_Vertex; \n" 
        "    gl_FrontColor.x = myAttribVar / maxAttribVal; \n"           
        "    gl_FrontColor.y = 0.0; \n"                                  
        "    gl_FrontColor.z = 0.0; \n"                                  
        "    gl_FrontColor.w = 1.0; \n"                                  
        "} \n";         

And I assume to retrieve 3 active attributes: myAttribVar, maxAttribVal and
gl_Vertex with the line glGetProgramiv(prog, GL_ACTIVE_ATTRIBUTES, &count);
But the actual value is 2.

Reproduce steps:
-------------------------
Build and run the attachment, a piglit case.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the mesa-dev mailing list