On 08/08/2012 10:38 AM, Ian Romanick wrote:
> From: Ian Romanick <[email protected]>
> 
> Signed-off-by: Ian Romanick <[email protected]>

Two small mistakes, noted below.

> diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
> index 81be46d..67f17a4 100644
> --- a/src/mesa/main/api_exec.c
> +++ b/src/mesa/main/api_exec.c
> @@ -158,7 +158,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>     SET_GetError(exec, _mesa_GetError);
>     SET_GetFloatv(exec, _mesa_GetFloatv);
>     SET_GetString(exec, _mesa_GetString);
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_LineStipple(exec, _mesa_LineStipple);
>     }
>     SET_LineWidth(exec, _mesa_LineWidth);
> @@ -197,13 +197,13 @@ _mesa_create_exec_table(struct gl_context *ctx)
>     }
>     SET_Viewport(exec, _mesa_Viewport);
>  
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        _mesa_init_accum_dispatch(exec);
>        _mesa_init_dlist_dispatch(exec);
>     }
>  
>     SET_ClearDepth(exec, _mesa_ClearDepth);
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_ClearIndex(exec, _mesa_ClearIndex);
>        SET_ClipPlane(exec, _mesa_ClipPlane);

glClipPlane is allowed in ES 1.1.  The rest in this block are not.

>        SET_ColorMaterial(exec, _mesa_ColorMaterial);
> @@ -213,9 +213,11 @@ _mesa_create_exec_table(struct gl_context *ctx)
>     SET_DepthRange(exec, _mesa_DepthRange);
>  
>     _mesa_init_drawpix_dispatch(exec);
> -   _mesa_init_feedback_dispatch(exec);
> +   if (ctx->API == API_OPENGL) {
> +      _mesa_init_feedback_dispatch(exec);
> +   }
>  
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_FogCoordPointerEXT(exec, _mesa_FogCoordPointerEXT);
>        SET_Fogf(exec, _mesa_Fogf);
>        SET_Fogfv(exec, _mesa_Fogfv);
> @@ -241,7 +243,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>     SET_GetTexParameteriv(exec, _mesa_GetTexParameteriv);
>     SET_GetTexImage(exec, _mesa_GetTexImage);
>     SET_Hint(exec, _mesa_Hint);
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_IndexMask(exec, _mesa_IndexMask);
>     }

Oddly, the ES 2.0.24 spec mentions "just as for IndexMask" and includes
IndexMask in the spec's index (no pun intended).  This seems to be an
error, however, since it never actually defines what the function does.

So I think this hunk is correct.

>     SET_IsEnabled(exec, _mesa_IsEnabled);
> @@ -257,24 +259,22 @@ _mesa_create_exec_table(struct gl_context *ctx)
>        SET_LoadMatrixd(exec, _mesa_LoadMatrixd);
>     }
>  
> -   _mesa_init_eval_dispatch(exec);
> -
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
> +      _mesa_init_eval_dispatch(exec);
>        SET_MultMatrixd(exec, _mesa_MultMatrixd);
> +      _mesa_init_pixel_dispatch(exec);
>     }
>  
> -   _mesa_init_pixel_dispatch(exec);
> -
>     SET_PixelStoref(exec, _mesa_PixelStoref);
>     SET_PointSize(exec, _mesa_PointSize);
>     SET_PolygonMode(exec, _mesa_PolygonMode);
>     SET_PolygonOffset(exec, _mesa_PolygonOffset);
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_PolygonStipple(exec, _mesa_PolygonStipple);
> -   }
>  
> -   _mesa_init_attrib_dispatch(exec);
> -   _mesa_init_rastpos_dispatch(exec);
> +      _mesa_init_attrib_dispatch(exec);
> +      _mesa_init_rastpos_dispatch(exec);
> +   }
>  
>     SET_ReadPixels(exec, _mesa_ReadPixels);
>     if (ctx->API != API_OPENGL_CORE) {
> @@ -285,13 +285,15 @@ _mesa_create_exec_table(struct gl_context *ctx)
>        SET_TexEnviv(exec, _mesa_TexEnviv);
>     }
>  
> -   _mesa_init_texgen_dispatch(exec);
> +   if (ctx->API != API_OPENGL_CORE) {
> +      _mesa_init_texgen_dispatch(exec);
> +   }
>     SET_TexImage1D(exec, _mesa_TexImage1D);
>     SET_TexParameterf(exec, _mesa_TexParameterf);
>     SET_TexParameterfv(exec, _mesa_TexParameterfv);
>     SET_TexParameteriv(exec, _mesa_TexParameteriv);
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_Translated(exec, _mesa_Translated);
>     }
>  
> @@ -300,7 +302,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
>     SET_DeleteTextures(exec, _mesa_DeleteTextures);
>     SET_GenTextures(exec, _mesa_GenTextures);
>  #if _HAVE_FULL_GL
> -   if (ctx->API != API_OPENGL_CORE) {
> +   if (ctx->API == API_OPENGL) {
>        SET_AreTexturesResident(exec, _mesa_AreTexturesResident);
>        SET_ColorPointer(exec, _mesa_ColorPointer);

glColorPointer is allowed in ES 1.1.

Otherwise, looks good!  With those fixed,
Reviewed-by: Kenneth Graunke <[email protected]>
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to