[Mesa-dev] [Bug 101464] PrimitiveRestartNV inside a render list causes a crash

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Jun 21 08:45:09 UTC 2017


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

--- Comment #1 from Olivier Lauffenburger <o.lauffenburger at topsolid.com> ---
I have replaced the content of save_PrimitiveRestartNV() by the following code
to make it work:

static void GLAPIENTRY
_save_PrimitiveRestartNV(void)
{
   GLenum curPrim;
   GET_CURRENT_CONTEXT(ctx);

   /* get current primitive mode */
   struct vbo_save_context *save = &vbo_context(ctx)->save;
   if (save->prim_count == 0) return;

   const GLuint i = save->prim_count - 1;

   curPrim = save->prim[i].mode;

   /* restart primitive */
   CALL_End(GET_DISPATCH(), ());
   vbo_save_NotifyBegin(ctx, (curPrim | VBO_SAVE_PRIM_WEAK
           | VBO_SAVE_PRIM_NO_CURRENT_UPDATE));
}

Contrarily to what is stated, ctx->Driver.CurrentSavePrimitive is not correctly
set before _save_PrimitiveRestartNV() is called, whence this intricate code to
get the current primitive mode...

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170621/0a72bd38/attachment-0001.html>


More information about the mesa-dev mailing list