summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 94d0ff6307..59e8740cdc 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -876,6 +876,16 @@ delete_arrayobj_cb(GLuint id, void *data, void *userData)
_mesa_delete_array_object(ctx, arrayObj);
}
+/**
+ * Callback for deleting an shader object. Called by _mesa_HashDeleteAll().
+ */
+static void
+delete_shaderobj_cb(GLuint id, void *data, void *userData)
+{
+ /* XXX probably need to fix this */
+ _mesa_free(data);
+}
+
/**
* Deallocate a shared state object and all children structures.
@@ -938,6 +948,7 @@ free_shared_state( GLcontext *ctx, struct gl_shared_state *ss )
_mesa_DeleteHashTable(ss->ArrayObjects);
#if FEATURE_ARB_shader_objects
+ _mesa_HashDeleteAll(ss->GL2Objects, delete_shaderobj_cb, ctx);
_mesa_DeleteHashTable(ss->GL2Objects);
#endif
@@ -1074,7 +1085,7 @@ _mesa_init_constants( GLcontext *ctx )
/* If we're running in the X server, do bounds checking to prevent
* segfaults and server crashes!
*/
-#if defined(XFree86LOADER) && defined(IN_MODULE)
+#if defined(XFree86Server)
ctx->Const.CheckArrayBounds = GL_TRUE;
#else
ctx->Const.CheckArrayBounds = GL_FALSE;