mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
Override Const.CheckArrayBounds for Xserver in XMesaCreateContext().
This leaves one last XFree86Server ifdef in Mesa core. --- Bug 9285: misc glcore, xmesa cleanups ACKed by Ian Romanick.
This commit is contained in:
parent
c9b33ecd7c
commit
507167d7e2
2 changed files with 8 additions and 7 deletions
|
|
@ -1545,6 +1545,13 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
|
|||
_mesa_enable_extension(mesaCtx, "GL_EXT_timer_query");
|
||||
#endif
|
||||
|
||||
#ifdef XFree86Server
|
||||
/* If we're running in the X server, do bounds checking to prevent
|
||||
* segfaults and server crashes!
|
||||
*/
|
||||
mesaCtx->Const.CheckArrayBounds = GL_TRUE;
|
||||
#endif
|
||||
|
||||
/* finish up xmesa context initializations */
|
||||
c->swapbytes = CHECK_BYTE_ORDER(v) ? GL_FALSE : GL_TRUE;
|
||||
c->xm_visual = v;
|
||||
|
|
|
|||
|
|
@ -1078,14 +1078,8 @@ _mesa_init_constants( GLcontext *ctx )
|
|||
ctx->Const.MaxProgramMatrices = MAX_PROGRAM_MATRICES;
|
||||
ctx->Const.MaxProgramMatrixStackDepth = MAX_PROGRAM_MATRIX_STACK_DEPTH;
|
||||
|
||||
/* If we're running in the X server, do bounds checking to prevent
|
||||
* segfaults and server crashes!
|
||||
*/
|
||||
#if defined(XFree86Server)
|
||||
ctx->Const.CheckArrayBounds = GL_TRUE;
|
||||
#else
|
||||
/* CheckArrayBounds is overriden by drivers/x11 for X server */
|
||||
ctx->Const.CheckArrayBounds = GL_FALSE;
|
||||
#endif
|
||||
|
||||
/* GL_ARB_draw_buffers */
|
||||
ctx->Const.MaxDrawBuffers = MAX_DRAW_BUFFERS;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue