summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11/xm_api.c
diff options
context:
space:
mode:
authorNian Wu <nian@graphics.(none)>2007-02-25 09:40:28 -0800
committerNian Wu <nian@graphics.(none)>2007-02-25 09:40:28 -0800
commit675f7f627bec92315bf168a9c872ffc05f88c69c (patch)
tree19c8f9cc509dc7ce73a0709832f34bf13a2c7425 /src/mesa/drivers/x11/xm_api.c
parent51bfb8fc8c78bb066d24e6ecbc20f00af7210386 (diff)
parentc080123998f28d9317331aec7ddfcd1074b29daf (diff)
Merge git://proxy01.pd.intel.com:9419/git/mesa/mesa into crestline
Diffstat (limited to 'src/mesa/drivers/x11/xm_api.c')
-rw-r--r--src/mesa/drivers/x11/xm_api.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/mesa/drivers/x11/xm_api.c b/src/mesa/drivers/x11/xm_api.c
index b50c4757afc..b0ef422de2e 100644
--- a/src/mesa/drivers/x11/xm_api.c
+++ b/src/mesa/drivers/x11/xm_api.c
@@ -74,7 +74,7 @@
#include "renderbuffer.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
-#include "array_cache/acache.h"
+#include "vbo/vbo.h"
#include "tnl/tnl.h"
#include "tnl/t_context.h"
#include "tnl/t_pipeline.h"
@@ -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;
@@ -1555,7 +1562,7 @@ XMesaContext XMesaCreateContext( XMesaVisual v, XMesaContext share_list )
/* Initialize the software rasterizer and helper modules.
*/
if (!_swrast_CreateContext( mesaCtx ) ||
- !_ac_CreateContext( mesaCtx ) ||
+ !_vbo_CreateContext( mesaCtx ) ||
!_tnl_CreateContext( mesaCtx ) ||
!_swsetup_CreateContext( mesaCtx )) {
_mesa_free_context_data(&c->mesa);
@@ -1587,7 +1594,7 @@ void XMesaDestroyContext( XMesaContext c )
_swsetup_DestroyContext( mesaCtx );
_swrast_DestroyContext( mesaCtx );
_tnl_DestroyContext( mesaCtx );
- _ac_DestroyContext( mesaCtx );
+ _vbo_DestroyContext( mesaCtx );
_mesa_free_context_data( mesaCtx );
_mesa_free( c );
}