diff options
author | George Sapountzis <[email protected]> | 2006-12-06 06:54:13 +0200 |
---|---|---|
committer | George Sapountzis <[email protected]> | 2007-01-26 18:31:44 +0200 |
commit | 507167d7e2cf3bc64d1c112d927efeb1baa3b495 (patch) | |
tree | 6785ee585a7b67c0292d1fe173b001dbe8db35ea /src/mesa/drivers/x11/xm_api.c | |
parent | c9b33ecd7c07cace0a6553ccfdaf7b021959c934 (diff) |
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.
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r-- | src/mesa/drivers/x11/xm_api.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c index b50c4757afc..510fbd5849b 100644 --- a/src/mesa/drivers/x11/xm_api.c +++ b/src/mesa/drivers/x11/xm_api.c @@ -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; |