From 912982cee4d982d4db37e0b579b7738e516fa8e3 Mon Sep 17 00:00:00 2001 From: raster Date: Sat, 21 Apr 2012 01:51:58 +0000 Subject: [PATCH] i don't believe that we forgot that desktopgl has an unload for shader compiler... use it. minor minor minor. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/evas@70374 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/gl_common/evas_gl_common.h | 1 + src/modules/engines/gl_common/evas_gl_context.c | 5 +++++ src/modules/engines/gl_common/evas_gl_shader.c | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/modules/engines/gl_common/evas_gl_common.h b/src/modules/engines/gl_common/evas_gl_common.h index 051fb3b..a2b40a8 100644 --- a/src/modules/engines/gl_common/evas_gl_common.h +++ b/src/modules/engines/gl_common/evas_gl_common.h @@ -631,6 +631,7 @@ extern void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b); extern void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e); extern void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d); extern void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d); +extern void (*glsym_glReleaseShaderCompiler)(void); #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) extern void *(*secsym_eglCreateImage) (void *a, void *b, GLenum c, void *d, const int *e); diff --git a/src/modules/engines/gl_common/evas_gl_context.c b/src/modules/engines/gl_common/evas_gl_context.c index 4f76770..31cb602 100644 --- a/src/modules/engines/gl_common/evas_gl_context.c +++ b/src/modules/engines/gl_common/evas_gl_context.c @@ -21,6 +21,7 @@ void (*glsym_glDeleteFramebuffers) (GLsizei a, const GLuint *b) = NULL; void (*glsym_glGetProgramBinary) (GLuint a, GLsizei b, GLsizei *c, GLenum *d, void *e) = NULL; void (*glsym_glProgramBinary) (GLuint a, GLenum b, const void *c, GLint d) = NULL; void (*glsym_glProgramParameteri) (GLuint a, GLuint b, GLint d) = NULL; +void (*glsym_glReleaseShaderCompiler)(void) = NULL; #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) // just used for finding symbols :) @@ -94,6 +95,10 @@ gl_symbols(void) FINDSYM(glsym_glProgramParameteri, "glProgramParameteriEXT", glsym_func_void); FINDSYM(glsym_glProgramParameteri, "glProgramParameteriARB", glsym_func_void); + FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompiler", glsym_func_void); + FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompilerEXT", glsym_func_void); + FINDSYM(glsym_glReleaseShaderCompiler, "glReleaseShaderCompilerARB", glsym_func_void); + #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) #undef FINDSYM #define FINDSYM(dst, sym, typ) \ diff --git a/src/modules/engines/gl_common/evas_gl_shader.c b/src/modules/engines/gl_common/evas_gl_shader.c index 6666ac5..d7ca3b9 100644 --- a/src/modules/engines/gl_common/evas_gl_shader.c +++ b/src/modules/engines/gl_common/evas_gl_shader.c @@ -1250,6 +1250,8 @@ evas_gl_common_shader_program_init_done(void) { #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) glReleaseShaderCompiler(); +#else + if (glsym_glReleaseShaderCompiler) glsym_glReleaseShaderCompiler(); #endif } -- 2.7.4