[Mesa-dev] [Bug 34047] New: Assert in _tnl_import_array() when using GLfixed vertex datatypes with GLESv2

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Feb 8 10:27:53 PST 2011


           Summary: Assert in _tnl_import_array() when using GLfixed
                    vertex datatypes with GLESv2
           Product: Mesa
           Version: 7.9
          Platform: x86 (IA32)
        OS/Version: other
            Status: NEW
          Severity: critical
          Priority: medium
         Component: Other
        AssignedTo: mesa-dev at lists.freedesktop.org
        ReportedBy: david.leong at nokia.com

-Hardware/software setup:
Intel GMA 3150 (Atom N450) DRI i915
Meego 1.1 trunk 
Mesa 7.9.1 / Mesa 7.10 

Our program hits an assert in _tnl_import_array() when we try to use GLfixed
datatypes for vertices. It seems the _tnl_import_array() method is unable to
convert this datatype and just asserts to crash the program. According to the
GLESv2 spec, GLfixed datatypes are supported for vertex input. 

We are using the following gl functions to render:
glVertexAttribPointer();  // Datatype is GL_FIXED

I prototyped a GLfixed to GLfloat conversion function in _tnl_import_array()and
it seems to have fixed the problem. 

static void
convert_fixed_to_float(const struct gl_client_array *input,
                       const GLubyte *ptr, GLfloat *fptr,
                       GLuint count, GLuint sz)
    GLuint i,j;
    GLfixed *in =(GLfixed *)ptr;
    for (i = 0; i < count; i++) {
        for (j = 0; j < input->Size; j++) {
            *fptr = (GLfloat)((*in)*(1/65536.0f));
        ptr += input->StrideB;

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