meta: Remove unsafe global mem_ctx pointer
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 5 Oct 2012 22:11:31 +0000 (15:11 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 8 Oct 2012 03:34:17 +0000 (20:34 -0700)
NOTE: This is a candidate for the 9.0 branch.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/drivers/common/meta.c

index d0bb5e0aeb93e05ca45648517cb1b2b9e065d76c..0c9ee59185910e62cc86ede181268234f36ac443 100644 (file)
@@ -78,7 +78,6 @@
 #include "main/glformats.h"
 #include "../glsl/ralloc.h"
 
-static void *mem_ctx;
 /** Return offset in bytes of the field within a vertex struct */
 #define OFFSET(FIELD) ((void *) offsetof(struct vertex, FIELD))
 
@@ -3073,6 +3072,7 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
    char *fs_source;
    const char *extension_mode;
    GLuint vs, fs;
+   void *mem_ctx;
 
    if (ctx->Const.GLSLVersion < 130) {
       vs_source =