summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/x11
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/x11')
-rw-r--r--src/mesa/drivers/x11/glxapi.c2
-rw-r--r--src/mesa/drivers/x11/xm_api.c13
-rw-r--r--src/mesa/drivers/x11/xm_dd.c3
3 files changed, 12 insertions, 6 deletions
diff --git a/src/mesa/drivers/x11/glxapi.c b/src/mesa/drivers/x11/glxapi.c
index 7945f1c5b06..973f3940451 100644
--- a/src/mesa/drivers/x11/glxapi.c
+++ b/src/mesa/drivers/x11/glxapi.c
@@ -241,7 +241,7 @@ glXGetCurrentContext(void)
#if defined(GLX_USE_TLS)
return CurrentContext;
#elif defined(THREADS)
- return _glthread_GetTSD(&ContextTSD);
+ return (GLXContext) _glthread_GetTSD(&ContextTSD);
#else
return CurrentContext;
#endif
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 );
}
diff --git a/src/mesa/drivers/x11/xm_dd.c b/src/mesa/drivers/x11/xm_dd.c
index d272630d18a..dbac3b8cdb6 100644
--- a/src/mesa/drivers/x11/xm_dd.c
+++ b/src/mesa/drivers/x11/xm_dd.c
@@ -47,7 +47,6 @@
#include "texstore.h"
#include "texformat.h"
#include "xmesaP.h"
-#include "array_cache/acache.h"
#include "swrast/swrast.h"
#include "swrast/s_context.h"
#include "swrast_setup/swrast_setup.h"
@@ -829,8 +828,8 @@ xmesa_update_state( GLcontext *ctx, GLbitfield new_state )
* modules. The X11 driver has no internal GL-dependent state.
*/
_swrast_InvalidateState( ctx, new_state );
- _ac_InvalidateState( ctx, new_state );
_tnl_InvalidateState( ctx, new_state );
+ _vbo_InvalidateState( ctx, new_state );
_swsetup_InvalidateState( ctx, new_state );
if (ctx->DrawBuffer->Name != 0)