If in hw/xgl/glxext/xglglxext.c, in the function xglDrawArrays I make the following change (denoted by MISHA HACK in the comments) it no longer crashes although there are some redrawing problems:
if (cctx->list) xglStartList (XGL_LIST_OP_CALLS, cctx->listMode);
}
I am in communication with David Reverman about the bug and hopefully he will suggest something a little cleaner (basically it seems
like there is aproblem with calls to glDrawArrays with a large count
in this function, but as I have no OpenGL experience I am not clear on what array is actually being used for this function, and thus cannot currently proceed further).
If in hw/xgl/ glxext/ xglglxext. c, in the function xglDrawArrays I make the following change (denoted by MISHA HACK in the comments) it no longer crashes although there are some redrawing problems:
static void
GLint first,
GLsizei count)
xglDrawArrays (GLenum mode,
{
GLenum listMode;
if (cctx->list)
xglStartList (XGL_LIST_OP_DRAW, GL_COMPILE);
glDrawArrays (mode, first, count);
{
glEndList ();
glEndList ();
listMode = cctx->listMode; AND_EXECUTE;
}
else
listMode = GL_COMPILE_
if (listMode == GL_COMPILE_ AND_EXECUTE)
{
RegionRec region;
BoxRec scissor, box;
BoxPtr pBox;
int nBox;
while (nBox--)
XGL_ GLX_DRAW_ BOX (&box, pBox);
{
pBox++;
if (!cctx->framebuffer && cctx->attrib. scissorTest)
XGL_GLX_ INTERSECT_ BOX (&box, &scissor);
if (box.x1 < box.x2 && box.y1 < box.y2)
XGL_GLX_ SET_SCISSOR_ BOX (&box);
{
/* !!! MISHA HACK START !!! */
glDrawArray s (mode, first, count);
if (count < 1000)
/* !!! MISHA HACK END !!! */
}
}
}
if (cctx->list)
xglStartList (XGL_LIST_OP_CALLS, cctx->listMode);
}
I am in communication with David Reverman about the bug and hopefully he will suggest something a little cleaner (basically it seems
like there is aproblem with calls to glDrawArrays with a large count
in this function, but as I have no OpenGL experience I am not clear on what array is actually being used for this function, and thus cannot currently proceed further).
Misha