[Mesa-dev] [Bug 74010] mesa-10.0.2: z-buffer issue with opengl 3.3 context on intel

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Feb 24 18:27:44 PST 2014


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

--- Comment #6 from Tibbo <leclercq.thibault at yahoo.fr> ---
I've encountered this segfault before, and i think i can give some useful
informations.
As stated in the file src/mesa/main/varray.c:

   /* Page 407 (page 423 of the PDF) of the OpenGL 3.0 spec says:
    *
    *     "Client vertex arrays - all vertex array attribute pointers must
    *     refer to buffer objects (section 2.9.2). The default vertex array
    *     object (the name zero) is also deprecated. Calling
    *     VertexAttribPointer when no buffer object or no vertex array object
    *     is bound will generate an INVALID_OPERATION error..."
    *
    * The check for VBOs is handled below.
    */

That means you must use a VAO to encapsulate these calls to conform the spec.

Of course this is not a good reason to end up with a segmentation fault,
especially when everyone around keep not using VAO with recent core profiles... 

So, in order to avoid the crash you can just comment the line 390 in varray.c:

   if (ctx->API == API_OPENGL_CORE
       && (ctx->Array.VAO == ctx->Array.DefaultVAO)) {
      _mesa_error(ctx, GL_INVALID_OPERATION, "%s(no array object bound)",
                  func);
   //   return;
   }

This way the deprecated default VAO "0" will be used, and everything should
work. Maybe some testing later in the process should also be implemented...

Just in case you want know: the segfault happens line 112 in
src/mesa/drivers/dri/i965/intel_upload.c, when memcpy is call with null src and
dest.

Be aware that this workaround is not fully tested, and comes with no warranty.  

For the overlapping triangles problem, i've never seen that before... so maybe
it is a problem in your code.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140225/d3638a5d/attachment-0001.html>


More information about the mesa-dev mailing list