r600: fix memory leak
authorAlex Deucher <alexdeucher@gmail.com>
Wed, 26 Aug 2009 15:09:59 +0000 (11:09 -0400)
committerAlex Deucher <alexdeucher@gmail.com>
Wed, 26 Aug 2009 15:09:59 +0000 (11:09 -0400)
src/mesa/drivers/dri/r600/r700_fragprog.c

index e4a6d4cedf860ef539300e1686a9cb0711ded61f..78ce3ae4366efe52f7b6090f8b1ab33359e8acfc 100644 (file)
@@ -268,7 +268,8 @@ void r700SelectFragmentShader(GLcontext *ctx)
            fp->r700AsmCode.bR6xx = 1;
     }
 
-    r700TranslateFragmentShader(fp, &(fp->mesa_program));
+    if (GL_FALSE == fp->translated)
+           r700TranslateFragmentShader(fp, &(fp->mesa_program));
 }
 
 void * r700GetActiveFpShaderBo(GLcontext * ctx)