[Mesa-dev] [PATCH 4/9] mesa api_exec: disable various functions for GL CORE profiles

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


On 10/24/2012 02:20 PM, Jordan Justen wrote:
> These functions will no longer be enabled for CORE profiles:
> * ResizeBuffersMESA
> * MultiModeDrawArraysIBM
> * MultiModeDrawElementsIBM
> * DepthBoundsEXT
> * EGLImageTargetTexture2DOES
> * EGLImageTargetRenderbufferStorageOES
> * ObjectPurgeableAPPLE
> * ObjectUnpurgeableAPPLE
> * GetObjectParameterivAPPLE
> * FramebufferTextureARB
> * FramebufferTextureFaceARB
> * ClearColorIiEXT
> * ClearColorIuiEXT
> * VertexAttribDivisorARB
> * TextureBarrierNV

I didn't look at the whole list, but I think these all come from 
functions that we support on core profiles.

>
> Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
> ---
>   src/mesa/main/api_exec.c |   23 +++++++++++++----------
>   1 file changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
> index d21c99e..fda0a08 100644
> --- a/src/mesa/main/api_exec.c
> +++ b/src/mesa/main/api_exec.c
> @@ -442,7 +442,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>      SET_BlendFuncSeparateEXT(exec, _mesa_BlendFuncSeparateEXT);
>
>      /* 196. GL_MESA_resize_buffers */
> -   if (_mesa_is_desktop_gl(ctx)) {
> +   if (ctx->API == API_OPENGL) {
>         SET_ResizeBuffersMESA(exec, _mesa_ResizeBuffersMESA);
>      }
>
> @@ -450,7 +450,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>      /* part of _mesa_init_rastpos_dispatch(exec); */
>
>      /* 200. GL_IBM_multimode_draw_arrays */
> -   if (ctx->API != API_OPENGLES2) {
> +   if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
>         SET_MultiModeDrawArraysIBM(exec, _mesa_MultiModeDrawArraysIBM);
>         SET_MultiModeDrawElementsIBM(exec, _mesa_MultiModeDrawElementsIBM);
>      }
> @@ -490,7 +490,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>      }
>
>      /* ???. GL_EXT_depth_bounds_test */
> -   if (ctx->API != API_OPENGLES2) {
> +   if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
>         SET_DepthBoundsEXT(exec, _mesa_DepthBoundsEXT);
>      }
>
> @@ -734,16 +734,18 @@ _mesa_create_exec_table(struct gl_context *ctx)
>         SET_EndConditionalRenderNV(exec, _mesa_EndConditionalRender);
>      }
>
> -   SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES);
> -   SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES);
> +   if (ctx->API != API_OPENGL_CORE) {
> +      SET_EGLImageTargetTexture2DOES(exec, _mesa_EGLImageTargetTexture2DOES);
> +      SET_EGLImageTargetRenderbufferStorageOES(exec, _mesa_EGLImageTargetRenderbufferStorageOES);
> +   }
>
> -   if (ctx->API != API_OPENGLES2) {
> +   if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
>         SET_ObjectPurgeableAPPLE(exec, _mesa_ObjectPurgeableAPPLE);
>         SET_ObjectUnpurgeableAPPLE(exec, _mesa_ObjectUnpurgeableAPPLE);
>         SET_GetObjectParameterivAPPLE(exec, _mesa_GetObjectParameterivAPPLE);
>      }
>
> -   if (ctx->API != API_OPENGLES2) {
> +   if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
>         SET_FramebufferTextureARB(exec, _mesa_FramebufferTextureARB);
>         SET_FramebufferTextureFaceARB(exec, _mesa_FramebufferTextureFaceARB);
>      }
> @@ -753,7 +755,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>      }
>
>      /* GL_EXT_texture_integer */
> -   if (_mesa_is_desktop_gl(ctx)) {
> +   if (ctx->API == API_OPENGL) {
>         SET_ClearColorIiEXT(exec, _mesa_ClearColorIiEXT);
>         SET_ClearColorIuiEXT(exec, _mesa_ClearColorIuiEXT);
>      }
> @@ -781,7 +783,8 @@ _mesa_create_exec_table(struct gl_context *ctx)
>      }
>
>      /* GL_ARB_instanced_arrays */
> -   if (ctx->API != API_OPENGLES2 || _mesa_is_gles3(ctx)) {
> +   if ((ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) ||
> +       _mesa_is_gles3(ctx)) {
>         SET_VertexAttribDivisorARB(exec, _mesa_VertexAttribDivisor);
>      }
>
> @@ -794,7 +797,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>      }
>
>      /* GL_NV_texture_barrier */
> -   if (ctx->API != API_OPENGLES2) {
> +   if (ctx->API != API_OPENGLES2 && ctx->API != API_OPENGL_CORE) {
>         SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV);
>      }
>
>



More information about the mesa-dev mailing list