<html>
<head>
<base href="https://bugs.freedesktop.org/">
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - PrimitiveRestartNV inside a render list causes a crash"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101464#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - PrimitiveRestartNV inside a render list causes a crash"
href="https://bugs.freedesktop.org/show_bug.cgi?id=101464">bug 101464</a>
from <span class="vcard"><a class="email" href="mailto:o.lauffenburger@topsolid.com" title="Olivier Lauffenburger <o.lauffenburger@topsolid.com>"> <span class="fn">Olivier Lauffenburger</span></a>
</span></b>
<pre>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...</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>