[Mesa-dev] [PATCH 2/9] mesa shaderapi: don't enable various functions for GL CORE
Jordan Justen
jordan.l.justen at intel.com
Wed Oct 24 14:20:04 PDT 2012
These functions will no longer be enabled for CORE profiles:
* DeleteObjectARB
* GetHandleARB
* DetachObjectARB
* CreateShaderObjectARB
* CreateProgramObjectARB
* AttachObjectARB
* GetObjectParameterfvARB
* GetObjectParameterivARB
* GetInfoLogARB
* GetAttachedObjectsARB
* ProgramParameteriARB
* UseShaderProgramEXT
* ActiveProgramEXT
* CreateShaderProgramEXT
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
src/mesa/main/shaderapi.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index d40a353..45db831 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -1692,7 +1692,7 @@ _mesa_init_shader_dispatch(const struct gl_context *ctx,
{
#if FEATURE_GL
/* GL_ARB_vertex/fragment_shader */
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
SET_DeleteObjectARB(exec, _mesa_DeleteObjectARB);
SET_GetHandleARB(exec, _mesa_GetHandleARB);
SET_DetachObjectARB(exec, _mesa_DetachObjectARB);
@@ -1732,9 +1732,8 @@ _mesa_init_shader_dispatch(const struct gl_context *ctx,
SET_GetActiveAttribARB(exec, _mesa_GetActiveAttribARB);
SET_GetAttribLocationARB(exec, _mesa_GetAttribLocationARB);
- if (ctx->API != API_OPENGLES2) {
+ if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
SET_ProgramParameteriARB(exec, _mesa_ProgramParameteriARB);
-
SET_UseShaderProgramEXT(exec, _mesa_UseShaderProgramEXT);
SET_ActiveProgramEXT(exec, _mesa_ActiveProgramEXT);
SET_CreateShaderProgramEXT(exec, _mesa_CreateShaderProgramEXT);
--
1.7.9.5
More information about the mesa-dev
mailing list