Mesa (master): mesa: Fix OpenGL ES-only builds.
Chia-I Wu
olv at kemper.freedesktop.org
Sat Jul 3 08:50:37 UTC 2010
Module: Mesa
Branch: master
Commit: 40ef298641046d0455df9e177b14d33ba618f466
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=40ef298641046d0455df9e177b14d33ba618f466
Author: Chia-I Wu <olv at lunarg.com>
Date: Sat Jul 3 16:41:55 2010 +0800
mesa: Fix OpenGL ES-only builds.
Check FEATURE_GL in _mesa_init_shader_dispatch and
_mesa_init_shader_uniform_dispatch. OpenGL ES can not and does not use
_mesa_init_<...>_dispatch. This is supposed to be temporary. Ideally,
a more flexible way for initializing dispatch tables should be
developed.
---
src/mesa/main/shaderapi.c | 2 ++
src/mesa/main/uniforms.c | 2 ++
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 9b251c9..9cb2391 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1590,6 +1590,7 @@ _mesa_ProgramParameteriARB(GLuint program, GLenum pname,
void
_mesa_init_shader_dispatch(struct _glapi_table *exec)
{
+#if FEATURE_GL
/* GL_ARB_vertex/fragment_shader */
SET_DeleteObjectARB(exec, _mesa_DeleteObjectARB);
SET_GetHandleARB(exec, _mesa_GetHandleARB);
@@ -1632,5 +1633,6 @@ _mesa_init_shader_dispatch(struct _glapi_table *exec)
#if FEATURE_ARB_geometry_shader4
SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
#endif
+#endif /* FEATURE_GL */
}
diff --git a/src/mesa/main/uniforms.c b/src/mesa/main/uniforms.c
index cabdb0b..c869942 100644
--- a/src/mesa/main/uniforms.c
+++ b/src/mesa/main/uniforms.c
@@ -1293,6 +1293,7 @@ _mesa_GetActiveUniformARB(GLhandleARB program, GLuint index,
void
_mesa_init_shader_uniform_dispatch(struct _glapi_table *exec)
{
+#if FEATURE_GL
SET_Uniform1fARB(exec, _mesa_Uniform1fARB);
SET_Uniform2fARB(exec, _mesa_Uniform2fARB);
SET_Uniform3fARB(exec, _mesa_Uniform3fARB);
@@ -1336,4 +1337,5 @@ _mesa_init_shader_uniform_dispatch(struct _glapi_table *exec)
(void) _mesa_Uniform2uiv;
(void) _mesa_Uniform3uiv;
(void) _mesa_Uniform4uiv;
+#endif /* FEATURE_GL */
}
More information about the mesa-commit
mailing list