Mesa (7.10): mesa: Add actual support for glReleaseShaderCompiler from ES2.

Ian Romanick idr at kemper.freedesktop.org
Mon Feb 28 22:27:45 UTC 2011


Module: Mesa
Branch: 7.10
Commit: 88f24e2598b6481bdfb5d04a2997b37eae719e98
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=88f24e2598b6481bdfb5d04a2997b37eae719e98

Author: Eric Anholt <eric at anholt.net>
Date:   Fri Jan 14 15:08:00 2011 -0800

mesa: Add actual support for glReleaseShaderCompiler from ES2.

Fixes no-op dispatch warning in piglit
arb_es2_compatibility-releaseshadercompiler.c.
(cherry picked from commit 7b987578a94008e28daa5cacf68ee37566a27be8)

---

 src/mesa/main/shaderapi.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index a84e545..f26d0be 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -48,6 +48,7 @@
 #include "program/prog_uniform.h"
 #include "ralloc.h"
 #include <stdbool.h>
+#include "../glsl/glsl_parser_extras.h"
 
 /** Define this to enable shader substitution (see below) */
 #define SHADER_SUBST 0
@@ -1637,8 +1638,7 @@ _mesa_GetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype,
 void GLAPIENTRY
 _mesa_ReleaseShaderCompiler(void)
 {
-   GET_CURRENT_CONTEXT(ctx);
-   _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+   _mesa_destroy_shader_compiler_caches();
 }
 
 
@@ -1881,6 +1881,9 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
    SET_BindFragDataLocationEXT(exec, _mesa_BindFragDataLocation);
    SET_GetFragDataLocationEXT(exec, _mesa_GetFragDataLocation);
 
+   /* GL_ARB_ES2_compatibility */
+   SET_ReleaseShaderCompiler(exec, _mesa_ReleaseShaderCompiler);
+
 #endif /* FEATURE_GL */
 }
 




More information about the mesa-commit mailing list