[Mesa-dev] [PATCH 2/9] mesa shaderapi: don't enable various functions for GL CORE

Ian Romanick idr at freedesktop.org
Thu Oct 25 11:03:05 PDT 2012


On 10/24/2012 02:20 PM, Jordan Justen wrote:
> These functions will no longer be enabled for CORE profiles:
> * DeleteObjectARB
> * GetHandleARB
> * DetachObjectARB
> * CreateShaderObjectARB
> * CreateProgramObjectARB
> * AttachObjectARB
> * GetObjectParameterfvARB
> * GetObjectParameterivARB
> * GetInfoLogARB
> * GetAttachedObjectsARB

These are all part of ARB_shader_objects, which we still expose in core 
profiles.  These need to stay.

> * ProgramParameteriARB

This is part of ARB_geometery_shader, which we will (eventually) expose 
in core profiles.  It should be deleted altogether until the extension 
is actually implemented.

> * UseShaderProgramEXT
> * ActiveProgramEXT
> * CreateShaderProgramEXT

These are part of EXT_separate_shader_objects, so they should be removed.

> 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);
>



More information about the mesa-dev mailing list