[Mesa-dev] [PATCH 13/19] mesa: Don't set loopback dispatch pointers for most things in ES2 or core

Ian Romanick idr at freedesktop.org
Wed Sep 5 15:09:08 PDT 2012


From: Ian Romanick <ian.d.romanick at intel.com>

NOTE: This is a candidate for the 9.0 branch

Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
---
 src/mesa/main/api_exec.c     |   2 +-
 src/mesa/main/api_loopback.c | 439 ++++++++++++++++++++++---------------------
 src/mesa/main/api_loopback.h |   4 +-
 src/mesa/main/dlist.c        |   2 +-
 4 files changed, 228 insertions(+), 219 deletions(-)

diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 102637a..05c1a11 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -129,7 +129,7 @@ _mesa_create_exec_table(struct gl_context *ctx)
       return NULL;
 
 #if _HAVE_FULL_GL
-   _mesa_loopback_init_api_table( exec );
+   _mesa_loopback_init_api_table(ctx, exec);
 #endif
 
    /* load the dispatch slots we understand */
diff --git a/src/mesa/main/api_loopback.c b/src/mesa/main/api_loopback.c
index c438307..8a29f04 100644
--- a/src/mesa/main/api_loopback.c
+++ b/src/mesa/main/api_loopback.c
@@ -1502,223 +1502,230 @@ loopback_VertexAttribI4usv(GLuint index, const GLushort *v)
  * listed in vtxfmt.h.
  */
 void
-_mesa_loopback_init_api_table( struct _glapi_table *dest )
-{
-   SET_Color3b(dest, loopback_Color3b_f);
-   SET_Color3d(dest, loopback_Color3d_f);
-   SET_Color3i(dest, loopback_Color3i_f);
-   SET_Color3s(dest, loopback_Color3s_f);
-   SET_Color3ui(dest, loopback_Color3ui_f);
-   SET_Color3us(dest, loopback_Color3us_f);
-   SET_Color3ub(dest, loopback_Color3ub_f);
-   SET_Color4b(dest, loopback_Color4b_f);
-   SET_Color4d(dest, loopback_Color4d_f);
-   SET_Color4i(dest, loopback_Color4i_f);
-   SET_Color4s(dest, loopback_Color4s_f);
-   SET_Color4ui(dest, loopback_Color4ui_f);
-   SET_Color4us(dest, loopback_Color4us_f);
-   SET_Color4ub(dest, loopback_Color4ub_f);
-   SET_Color3bv(dest, loopback_Color3bv_f);
-   SET_Color3dv(dest, loopback_Color3dv_f);
-   SET_Color3iv(dest, loopback_Color3iv_f);
-   SET_Color3sv(dest, loopback_Color3sv_f);
-   SET_Color3uiv(dest, loopback_Color3uiv_f);
-   SET_Color3usv(dest, loopback_Color3usv_f);
-   SET_Color3ubv(dest, loopback_Color3ubv_f);
-   SET_Color4bv(dest, loopback_Color4bv_f);
-   SET_Color4dv(dest, loopback_Color4dv_f);
-   SET_Color4iv(dest, loopback_Color4iv_f);
-   SET_Color4sv(dest, loopback_Color4sv_f);
-   SET_Color4uiv(dest, loopback_Color4uiv_f);
-   SET_Color4usv(dest, loopback_Color4usv_f);
-   SET_Color4ubv(dest, loopback_Color4ubv_f);
-
-   SET_SecondaryColor3bEXT(dest, loopback_SecondaryColor3bEXT_f);
-   SET_SecondaryColor3dEXT(dest, loopback_SecondaryColor3dEXT_f);
-   SET_SecondaryColor3iEXT(dest, loopback_SecondaryColor3iEXT_f);
-   SET_SecondaryColor3sEXT(dest, loopback_SecondaryColor3sEXT_f);
-   SET_SecondaryColor3uiEXT(dest, loopback_SecondaryColor3uiEXT_f);
-   SET_SecondaryColor3usEXT(dest, loopback_SecondaryColor3usEXT_f);
-   SET_SecondaryColor3ubEXT(dest, loopback_SecondaryColor3ubEXT_f);
-   SET_SecondaryColor3bvEXT(dest, loopback_SecondaryColor3bvEXT_f);
-   SET_SecondaryColor3dvEXT(dest, loopback_SecondaryColor3dvEXT_f);
-   SET_SecondaryColor3ivEXT(dest, loopback_SecondaryColor3ivEXT_f);
-   SET_SecondaryColor3svEXT(dest, loopback_SecondaryColor3svEXT_f);
-   SET_SecondaryColor3uivEXT(dest, loopback_SecondaryColor3uivEXT_f);
-   SET_SecondaryColor3usvEXT(dest, loopback_SecondaryColor3usvEXT_f);
-   SET_SecondaryColor3ubvEXT(dest, loopback_SecondaryColor3ubvEXT_f);
+_mesa_loopback_init_api_table(const struct gl_context *ctx,
+                              struct _glapi_table *dest)
+{
+   if (ctx->API != API_OPENGL_CORE && ctx->API != API_OPENGLES2) {
+      SET_Color3b(dest, loopback_Color3b_f);
+      SET_Color3d(dest, loopback_Color3d_f);
+      SET_Color3i(dest, loopback_Color3i_f);
+      SET_Color3s(dest, loopback_Color3s_f);
+      SET_Color3ui(dest, loopback_Color3ui_f);
+      SET_Color3us(dest, loopback_Color3us_f);
+      SET_Color3ub(dest, loopback_Color3ub_f);
+      SET_Color4b(dest, loopback_Color4b_f);
+      SET_Color4d(dest, loopback_Color4d_f);
+      SET_Color4i(dest, loopback_Color4i_f);
+      SET_Color4s(dest, loopback_Color4s_f);
+      SET_Color4ui(dest, loopback_Color4ui_f);
+      SET_Color4us(dest, loopback_Color4us_f);
+      SET_Color4ub(dest, loopback_Color4ub_f);
+      SET_Color3bv(dest, loopback_Color3bv_f);
+      SET_Color3dv(dest, loopback_Color3dv_f);
+      SET_Color3iv(dest, loopback_Color3iv_f);
+      SET_Color3sv(dest, loopback_Color3sv_f);
+      SET_Color3uiv(dest, loopback_Color3uiv_f);
+      SET_Color3usv(dest, loopback_Color3usv_f);
+      SET_Color3ubv(dest, loopback_Color3ubv_f);
+      SET_Color4bv(dest, loopback_Color4bv_f);
+      SET_Color4dv(dest, loopback_Color4dv_f);
+      SET_Color4iv(dest, loopback_Color4iv_f);
+      SET_Color4sv(dest, loopback_Color4sv_f);
+      SET_Color4uiv(dest, loopback_Color4uiv_f);
+      SET_Color4usv(dest, loopback_Color4usv_f);
+      SET_Color4ubv(dest, loopback_Color4ubv_f);
+
+      SET_SecondaryColor3bEXT(dest, loopback_SecondaryColor3bEXT_f);
+      SET_SecondaryColor3dEXT(dest, loopback_SecondaryColor3dEXT_f);
+      SET_SecondaryColor3iEXT(dest, loopback_SecondaryColor3iEXT_f);
+      SET_SecondaryColor3sEXT(dest, loopback_SecondaryColor3sEXT_f);
+      SET_SecondaryColor3uiEXT(dest, loopback_SecondaryColor3uiEXT_f);
+      SET_SecondaryColor3usEXT(dest, loopback_SecondaryColor3usEXT_f);
+      SET_SecondaryColor3ubEXT(dest, loopback_SecondaryColor3ubEXT_f);
+      SET_SecondaryColor3bvEXT(dest, loopback_SecondaryColor3bvEXT_f);
+      SET_SecondaryColor3dvEXT(dest, loopback_SecondaryColor3dvEXT_f);
+      SET_SecondaryColor3ivEXT(dest, loopback_SecondaryColor3ivEXT_f);
+      SET_SecondaryColor3svEXT(dest, loopback_SecondaryColor3svEXT_f);
+      SET_SecondaryColor3uivEXT(dest, loopback_SecondaryColor3uivEXT_f);
+      SET_SecondaryColor3usvEXT(dest, loopback_SecondaryColor3usvEXT_f);
+      SET_SecondaryColor3ubvEXT(dest, loopback_SecondaryColor3ubvEXT_f);
       
-   SET_EdgeFlagv(dest, loopback_EdgeFlagv);
-
-   SET_Indexd(dest, loopback_Indexd);
-   SET_Indexi(dest, loopback_Indexi);
-   SET_Indexs(dest, loopback_Indexs);
-   SET_Indexub(dest, loopback_Indexub);
-   SET_Indexdv(dest, loopback_Indexdv);
-   SET_Indexiv(dest, loopback_Indexiv);
-   SET_Indexsv(dest, loopback_Indexsv);
-   SET_Indexubv(dest, loopback_Indexubv);
-   SET_Normal3b(dest, loopback_Normal3b);
-   SET_Normal3d(dest, loopback_Normal3d);
-   SET_Normal3i(dest, loopback_Normal3i);
-   SET_Normal3s(dest, loopback_Normal3s);
-   SET_Normal3bv(dest, loopback_Normal3bv);
-   SET_Normal3dv(dest, loopback_Normal3dv);
-   SET_Normal3iv(dest, loopback_Normal3iv);
-   SET_Normal3sv(dest, loopback_Normal3sv);
-   SET_TexCoord1d(dest, loopback_TexCoord1d);
-   SET_TexCoord1i(dest, loopback_TexCoord1i);
-   SET_TexCoord1s(dest, loopback_TexCoord1s);
-   SET_TexCoord2d(dest, loopback_TexCoord2d);
-   SET_TexCoord2s(dest, loopback_TexCoord2s);
-   SET_TexCoord2i(dest, loopback_TexCoord2i);
-   SET_TexCoord3d(dest, loopback_TexCoord3d);
-   SET_TexCoord3i(dest, loopback_TexCoord3i);
-   SET_TexCoord3s(dest, loopback_TexCoord3s);
-   SET_TexCoord4d(dest, loopback_TexCoord4d);
-   SET_TexCoord4i(dest, loopback_TexCoord4i);
-   SET_TexCoord4s(dest, loopback_TexCoord4s);
-   SET_TexCoord1dv(dest, loopback_TexCoord1dv);
-   SET_TexCoord1iv(dest, loopback_TexCoord1iv);
-   SET_TexCoord1sv(dest, loopback_TexCoord1sv);
-   SET_TexCoord2dv(dest, loopback_TexCoord2dv);
-   SET_TexCoord2iv(dest, loopback_TexCoord2iv);
-   SET_TexCoord2sv(dest, loopback_TexCoord2sv);
-   SET_TexCoord3dv(dest, loopback_TexCoord3dv);
-   SET_TexCoord3iv(dest, loopback_TexCoord3iv);
-   SET_TexCoord3sv(dest, loopback_TexCoord3sv);
-   SET_TexCoord4dv(dest, loopback_TexCoord4dv);
-   SET_TexCoord4iv(dest, loopback_TexCoord4iv);
-   SET_TexCoord4sv(dest, loopback_TexCoord4sv);
-   SET_Vertex2d(dest, loopback_Vertex2d);
-   SET_Vertex2i(dest, loopback_Vertex2i);
-   SET_Vertex2s(dest, loopback_Vertex2s);
-   SET_Vertex3d(dest, loopback_Vertex3d);
-   SET_Vertex3i(dest, loopback_Vertex3i);
-   SET_Vertex3s(dest, loopback_Vertex3s);
-   SET_Vertex4d(dest, loopback_Vertex4d);
-   SET_Vertex4i(dest, loopback_Vertex4i);
-   SET_Vertex4s(dest, loopback_Vertex4s);
-   SET_Vertex2dv(dest, loopback_Vertex2dv);
-   SET_Vertex2iv(dest, loopback_Vertex2iv);
-   SET_Vertex2sv(dest, loopback_Vertex2sv);
-   SET_Vertex3dv(dest, loopback_Vertex3dv);
-   SET_Vertex3iv(dest, loopback_Vertex3iv);
-   SET_Vertex3sv(dest, loopback_Vertex3sv);
-   SET_Vertex4dv(dest, loopback_Vertex4dv);
-   SET_Vertex4iv(dest, loopback_Vertex4iv);
-   SET_Vertex4sv(dest, loopback_Vertex4sv);
-   SET_MultiTexCoord1dARB(dest, loopback_MultiTexCoord1dARB);
-   SET_MultiTexCoord1dvARB(dest, loopback_MultiTexCoord1dvARB);
-   SET_MultiTexCoord1iARB(dest, loopback_MultiTexCoord1iARB);
-   SET_MultiTexCoord1ivARB(dest, loopback_MultiTexCoord1ivARB);
-   SET_MultiTexCoord1sARB(dest, loopback_MultiTexCoord1sARB);
-   SET_MultiTexCoord1svARB(dest, loopback_MultiTexCoord1svARB);
-   SET_MultiTexCoord2dARB(dest, loopback_MultiTexCoord2dARB);
-   SET_MultiTexCoord2dvARB(dest, loopback_MultiTexCoord2dvARB);
-   SET_MultiTexCoord2iARB(dest, loopback_MultiTexCoord2iARB);
-   SET_MultiTexCoord2ivARB(dest, loopback_MultiTexCoord2ivARB);
-   SET_MultiTexCoord2sARB(dest, loopback_MultiTexCoord2sARB);
-   SET_MultiTexCoord2svARB(dest, loopback_MultiTexCoord2svARB);
-   SET_MultiTexCoord3dARB(dest, loopback_MultiTexCoord3dARB);
-   SET_MultiTexCoord3dvARB(dest, loopback_MultiTexCoord3dvARB);
-   SET_MultiTexCoord3iARB(dest, loopback_MultiTexCoord3iARB);
-   SET_MultiTexCoord3ivARB(dest, loopback_MultiTexCoord3ivARB);
-   SET_MultiTexCoord3sARB(dest, loopback_MultiTexCoord3sARB);
-   SET_MultiTexCoord3svARB(dest, loopback_MultiTexCoord3svARB);
-   SET_MultiTexCoord4dARB(dest, loopback_MultiTexCoord4dARB);
-   SET_MultiTexCoord4dvARB(dest, loopback_MultiTexCoord4dvARB);
-   SET_MultiTexCoord4iARB(dest, loopback_MultiTexCoord4iARB);
-   SET_MultiTexCoord4ivARB(dest, loopback_MultiTexCoord4ivARB);
-   SET_MultiTexCoord4sARB(dest, loopback_MultiTexCoord4sARB);
-   SET_MultiTexCoord4svARB(dest, loopback_MultiTexCoord4svARB);
-   SET_EvalCoord2dv(dest, loopback_EvalCoord2dv);
-   SET_EvalCoord2fv(dest, loopback_EvalCoord2fv);
-   SET_EvalCoord2d(dest, loopback_EvalCoord2d);
-   SET_EvalCoord1dv(dest, loopback_EvalCoord1dv);
-   SET_EvalCoord1fv(dest, loopback_EvalCoord1fv);
-   SET_EvalCoord1d(dest, loopback_EvalCoord1d);
-   SET_Materialf(dest, loopback_Materialf);
-   SET_Materiali(dest, loopback_Materiali);
-   SET_Materialiv(dest, loopback_Materialiv);
-   SET_Rectd(dest, loopback_Rectd);
-   SET_Rectdv(dest, loopback_Rectdv);
-   SET_Rectfv(dest, loopback_Rectfv);
-   SET_Recti(dest, loopback_Recti);
-   SET_Rectiv(dest, loopback_Rectiv);
-   SET_Rects(dest, loopback_Rects);
-   SET_Rectsv(dest, loopback_Rectsv);
-   SET_FogCoorddEXT(dest, loopback_FogCoorddEXT);
-   SET_FogCoorddvEXT(dest, loopback_FogCoorddvEXT);
-
-   SET_VertexAttrib1sNV(dest, loopback_VertexAttrib1sNV);
-   SET_VertexAttrib1dNV(dest, loopback_VertexAttrib1dNV);
-   SET_VertexAttrib2sNV(dest, loopback_VertexAttrib2sNV);
-   SET_VertexAttrib2dNV(dest, loopback_VertexAttrib2dNV);
-   SET_VertexAttrib3sNV(dest, loopback_VertexAttrib3sNV);
-   SET_VertexAttrib3dNV(dest, loopback_VertexAttrib3dNV);
-   SET_VertexAttrib4sNV(dest, loopback_VertexAttrib4sNV);
-   SET_VertexAttrib4dNV(dest, loopback_VertexAttrib4dNV);
-   SET_VertexAttrib4ubNV(dest, loopback_VertexAttrib4ubNV);
-   SET_VertexAttrib1svNV(dest, loopback_VertexAttrib1svNV);
-   SET_VertexAttrib1dvNV(dest, loopback_VertexAttrib1dvNV);
-   SET_VertexAttrib2svNV(dest, loopback_VertexAttrib2svNV);
-   SET_VertexAttrib2dvNV(dest, loopback_VertexAttrib2dvNV);
-   SET_VertexAttrib3svNV(dest, loopback_VertexAttrib3svNV);
-   SET_VertexAttrib3dvNV(dest, loopback_VertexAttrib3dvNV);
-   SET_VertexAttrib4svNV(dest, loopback_VertexAttrib4svNV);
-   SET_VertexAttrib4dvNV(dest, loopback_VertexAttrib4dvNV);
-   SET_VertexAttrib4ubvNV(dest, loopback_VertexAttrib4ubvNV);
-   SET_VertexAttribs1svNV(dest, loopback_VertexAttribs1svNV);
-   SET_VertexAttribs1fvNV(dest, loopback_VertexAttribs1fvNV);
-   SET_VertexAttribs1dvNV(dest, loopback_VertexAttribs1dvNV);
-   SET_VertexAttribs2svNV(dest, loopback_VertexAttribs2svNV);
-   SET_VertexAttribs2fvNV(dest, loopback_VertexAttribs2fvNV);
-   SET_VertexAttribs2dvNV(dest, loopback_VertexAttribs2dvNV);
-   SET_VertexAttribs3svNV(dest, loopback_VertexAttribs3svNV);
-   SET_VertexAttribs3fvNV(dest, loopback_VertexAttribs3fvNV);
-   SET_VertexAttribs3dvNV(dest, loopback_VertexAttribs3dvNV);
-   SET_VertexAttribs4svNV(dest, loopback_VertexAttribs4svNV);
-   SET_VertexAttribs4fvNV(dest, loopback_VertexAttribs4fvNV);
-   SET_VertexAttribs4dvNV(dest, loopback_VertexAttribs4dvNV);
-   SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV);
-
-   SET_VertexAttrib1sARB(dest, loopback_VertexAttrib1sARB);
-   SET_VertexAttrib1dARB(dest, loopback_VertexAttrib1dARB);
-   SET_VertexAttrib2sARB(dest, loopback_VertexAttrib2sARB);
-   SET_VertexAttrib2dARB(dest, loopback_VertexAttrib2dARB);
-   SET_VertexAttrib3sARB(dest, loopback_VertexAttrib3sARB);
-   SET_VertexAttrib3dARB(dest, loopback_VertexAttrib3dARB);
-   SET_VertexAttrib4sARB(dest, loopback_VertexAttrib4sARB);
-   SET_VertexAttrib4dARB(dest, loopback_VertexAttrib4dARB);
-   SET_VertexAttrib1svARB(dest, loopback_VertexAttrib1svARB);
-   SET_VertexAttrib1dvARB(dest, loopback_VertexAttrib1dvARB);
-   SET_VertexAttrib2svARB(dest, loopback_VertexAttrib2svARB);
-   SET_VertexAttrib2dvARB(dest, loopback_VertexAttrib2dvARB);
-   SET_VertexAttrib3svARB(dest, loopback_VertexAttrib3svARB);
-   SET_VertexAttrib3dvARB(dest, loopback_VertexAttrib3dvARB);
-   SET_VertexAttrib4svARB(dest, loopback_VertexAttrib4svARB);
-   SET_VertexAttrib4dvARB(dest, loopback_VertexAttrib4dvARB);
-   SET_VertexAttrib4NubARB(dest, loopback_VertexAttrib4NubARB);
-   SET_VertexAttrib4NubvARB(dest, loopback_VertexAttrib4NubvARB);
-   SET_VertexAttrib4bvARB(dest, loopback_VertexAttrib4bvARB);
-   SET_VertexAttrib4ivARB(dest, loopback_VertexAttrib4ivARB);
-   SET_VertexAttrib4ubvARB(dest, loopback_VertexAttrib4ubvARB);
-   SET_VertexAttrib4usvARB(dest, loopback_VertexAttrib4usvARB);
-   SET_VertexAttrib4uivARB(dest, loopback_VertexAttrib4uivARB);
-   SET_VertexAttrib4NbvARB(dest, loopback_VertexAttrib4NbvARB);
-   SET_VertexAttrib4NsvARB(dest, loopback_VertexAttrib4NsvARB);
-   SET_VertexAttrib4NivARB(dest, loopback_VertexAttrib4NivARB);
-   SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
-   SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
-
-   /* GL_EXT_gpu_shader4, GL 3.0 */
-   SET_VertexAttribI1ivEXT(dest, loopback_VertexAttribI1iv);
-   SET_VertexAttribI1uivEXT(dest, loopback_VertexAttribI1uiv);
-   SET_VertexAttribI4bvEXT(dest, loopback_VertexAttribI4bv);
-   SET_VertexAttribI4svEXT(dest, loopback_VertexAttribI4sv);
-   SET_VertexAttribI4ubvEXT(dest, loopback_VertexAttribI4ubv);
-   SET_VertexAttribI4usvEXT(dest, loopback_VertexAttribI4usv);
+      SET_EdgeFlagv(dest, loopback_EdgeFlagv);
+
+      SET_Indexd(dest, loopback_Indexd);
+      SET_Indexi(dest, loopback_Indexi);
+      SET_Indexs(dest, loopback_Indexs);
+      SET_Indexub(dest, loopback_Indexub);
+      SET_Indexdv(dest, loopback_Indexdv);
+      SET_Indexiv(dest, loopback_Indexiv);
+      SET_Indexsv(dest, loopback_Indexsv);
+      SET_Indexubv(dest, loopback_Indexubv);
+      SET_Normal3b(dest, loopback_Normal3b);
+      SET_Normal3d(dest, loopback_Normal3d);
+      SET_Normal3i(dest, loopback_Normal3i);
+      SET_Normal3s(dest, loopback_Normal3s);
+      SET_Normal3bv(dest, loopback_Normal3bv);
+      SET_Normal3dv(dest, loopback_Normal3dv);
+      SET_Normal3iv(dest, loopback_Normal3iv);
+      SET_Normal3sv(dest, loopback_Normal3sv);
+      SET_TexCoord1d(dest, loopback_TexCoord1d);
+      SET_TexCoord1i(dest, loopback_TexCoord1i);
+      SET_TexCoord1s(dest, loopback_TexCoord1s);
+      SET_TexCoord2d(dest, loopback_TexCoord2d);
+      SET_TexCoord2s(dest, loopback_TexCoord2s);
+      SET_TexCoord2i(dest, loopback_TexCoord2i);
+      SET_TexCoord3d(dest, loopback_TexCoord3d);
+      SET_TexCoord3i(dest, loopback_TexCoord3i);
+      SET_TexCoord3s(dest, loopback_TexCoord3s);
+      SET_TexCoord4d(dest, loopback_TexCoord4d);
+      SET_TexCoord4i(dest, loopback_TexCoord4i);
+      SET_TexCoord4s(dest, loopback_TexCoord4s);
+      SET_TexCoord1dv(dest, loopback_TexCoord1dv);
+      SET_TexCoord1iv(dest, loopback_TexCoord1iv);
+      SET_TexCoord1sv(dest, loopback_TexCoord1sv);
+      SET_TexCoord2dv(dest, loopback_TexCoord2dv);
+      SET_TexCoord2iv(dest, loopback_TexCoord2iv);
+      SET_TexCoord2sv(dest, loopback_TexCoord2sv);
+      SET_TexCoord3dv(dest, loopback_TexCoord3dv);
+      SET_TexCoord3iv(dest, loopback_TexCoord3iv);
+      SET_TexCoord3sv(dest, loopback_TexCoord3sv);
+      SET_TexCoord4dv(dest, loopback_TexCoord4dv);
+      SET_TexCoord4iv(dest, loopback_TexCoord4iv);
+      SET_TexCoord4sv(dest, loopback_TexCoord4sv);
+      SET_Vertex2d(dest, loopback_Vertex2d);
+      SET_Vertex2i(dest, loopback_Vertex2i);
+      SET_Vertex2s(dest, loopback_Vertex2s);
+      SET_Vertex3d(dest, loopback_Vertex3d);
+      SET_Vertex3i(dest, loopback_Vertex3i);
+      SET_Vertex3s(dest, loopback_Vertex3s);
+      SET_Vertex4d(dest, loopback_Vertex4d);
+      SET_Vertex4i(dest, loopback_Vertex4i);
+      SET_Vertex4s(dest, loopback_Vertex4s);
+      SET_Vertex2dv(dest, loopback_Vertex2dv);
+      SET_Vertex2iv(dest, loopback_Vertex2iv);
+      SET_Vertex2sv(dest, loopback_Vertex2sv);
+      SET_Vertex3dv(dest, loopback_Vertex3dv);
+      SET_Vertex3iv(dest, loopback_Vertex3iv);
+      SET_Vertex3sv(dest, loopback_Vertex3sv);
+      SET_Vertex4dv(dest, loopback_Vertex4dv);
+      SET_Vertex4iv(dest, loopback_Vertex4iv);
+      SET_Vertex4sv(dest, loopback_Vertex4sv);
+      SET_MultiTexCoord1dARB(dest, loopback_MultiTexCoord1dARB);
+      SET_MultiTexCoord1dvARB(dest, loopback_MultiTexCoord1dvARB);
+      SET_MultiTexCoord1iARB(dest, loopback_MultiTexCoord1iARB);
+      SET_MultiTexCoord1ivARB(dest, loopback_MultiTexCoord1ivARB);
+      SET_MultiTexCoord1sARB(dest, loopback_MultiTexCoord1sARB);
+      SET_MultiTexCoord1svARB(dest, loopback_MultiTexCoord1svARB);
+      SET_MultiTexCoord2dARB(dest, loopback_MultiTexCoord2dARB);
+      SET_MultiTexCoord2dvARB(dest, loopback_MultiTexCoord2dvARB);
+      SET_MultiTexCoord2iARB(dest, loopback_MultiTexCoord2iARB);
+      SET_MultiTexCoord2ivARB(dest, loopback_MultiTexCoord2ivARB);
+      SET_MultiTexCoord2sARB(dest, loopback_MultiTexCoord2sARB);
+      SET_MultiTexCoord2svARB(dest, loopback_MultiTexCoord2svARB);
+      SET_MultiTexCoord3dARB(dest, loopback_MultiTexCoord3dARB);
+      SET_MultiTexCoord3dvARB(dest, loopback_MultiTexCoord3dvARB);
+      SET_MultiTexCoord3iARB(dest, loopback_MultiTexCoord3iARB);
+      SET_MultiTexCoord3ivARB(dest, loopback_MultiTexCoord3ivARB);
+      SET_MultiTexCoord3sARB(dest, loopback_MultiTexCoord3sARB);
+      SET_MultiTexCoord3svARB(dest, loopback_MultiTexCoord3svARB);
+      SET_MultiTexCoord4dARB(dest, loopback_MultiTexCoord4dARB);
+      SET_MultiTexCoord4dvARB(dest, loopback_MultiTexCoord4dvARB);
+      SET_MultiTexCoord4iARB(dest, loopback_MultiTexCoord4iARB);
+      SET_MultiTexCoord4ivARB(dest, loopback_MultiTexCoord4ivARB);
+      SET_MultiTexCoord4sARB(dest, loopback_MultiTexCoord4sARB);
+      SET_MultiTexCoord4svARB(dest, loopback_MultiTexCoord4svARB);
+      SET_EvalCoord2dv(dest, loopback_EvalCoord2dv);
+      SET_EvalCoord2fv(dest, loopback_EvalCoord2fv);
+      SET_EvalCoord2d(dest, loopback_EvalCoord2d);
+      SET_EvalCoord1dv(dest, loopback_EvalCoord1dv);
+      SET_EvalCoord1fv(dest, loopback_EvalCoord1fv);
+      SET_EvalCoord1d(dest, loopback_EvalCoord1d);
+      SET_Materialf(dest, loopback_Materialf);
+      SET_Materiali(dest, loopback_Materiali);
+      SET_Materialiv(dest, loopback_Materialiv);
+      SET_Rectd(dest, loopback_Rectd);
+      SET_Rectdv(dest, loopback_Rectdv);
+      SET_Rectfv(dest, loopback_Rectfv);
+      SET_Recti(dest, loopback_Recti);
+      SET_Rectiv(dest, loopback_Rectiv);
+      SET_Rects(dest, loopback_Rects);
+      SET_Rectsv(dest, loopback_Rectsv);
+      SET_FogCoorddEXT(dest, loopback_FogCoorddEXT);
+      SET_FogCoorddvEXT(dest, loopback_FogCoorddvEXT);
+   }
+
+   if (ctx->API == API_OPENGL) {
+      SET_VertexAttrib1sNV(dest, loopback_VertexAttrib1sNV);
+      SET_VertexAttrib1dNV(dest, loopback_VertexAttrib1dNV);
+      SET_VertexAttrib2sNV(dest, loopback_VertexAttrib2sNV);
+      SET_VertexAttrib2dNV(dest, loopback_VertexAttrib2dNV);
+      SET_VertexAttrib3sNV(dest, loopback_VertexAttrib3sNV);
+      SET_VertexAttrib3dNV(dest, loopback_VertexAttrib3dNV);
+      SET_VertexAttrib4sNV(dest, loopback_VertexAttrib4sNV);
+      SET_VertexAttrib4dNV(dest, loopback_VertexAttrib4dNV);
+      SET_VertexAttrib4ubNV(dest, loopback_VertexAttrib4ubNV);
+      SET_VertexAttrib1svNV(dest, loopback_VertexAttrib1svNV);
+      SET_VertexAttrib1dvNV(dest, loopback_VertexAttrib1dvNV);
+      SET_VertexAttrib2svNV(dest, loopback_VertexAttrib2svNV);
+      SET_VertexAttrib2dvNV(dest, loopback_VertexAttrib2dvNV);
+      SET_VertexAttrib3svNV(dest, loopback_VertexAttrib3svNV);
+      SET_VertexAttrib3dvNV(dest, loopback_VertexAttrib3dvNV);
+      SET_VertexAttrib4svNV(dest, loopback_VertexAttrib4svNV);
+      SET_VertexAttrib4dvNV(dest, loopback_VertexAttrib4dvNV);
+      SET_VertexAttrib4ubvNV(dest, loopback_VertexAttrib4ubvNV);
+      SET_VertexAttribs1svNV(dest, loopback_VertexAttribs1svNV);
+      SET_VertexAttribs1fvNV(dest, loopback_VertexAttribs1fvNV);
+      SET_VertexAttribs1dvNV(dest, loopback_VertexAttribs1dvNV);
+      SET_VertexAttribs2svNV(dest, loopback_VertexAttribs2svNV);
+      SET_VertexAttribs2fvNV(dest, loopback_VertexAttribs2fvNV);
+      SET_VertexAttribs2dvNV(dest, loopback_VertexAttribs2dvNV);
+      SET_VertexAttribs3svNV(dest, loopback_VertexAttribs3svNV);
+      SET_VertexAttribs3fvNV(dest, loopback_VertexAttribs3fvNV);
+      SET_VertexAttribs3dvNV(dest, loopback_VertexAttribs3dvNV);
+      SET_VertexAttribs4svNV(dest, loopback_VertexAttribs4svNV);
+      SET_VertexAttribs4fvNV(dest, loopback_VertexAttribs4fvNV);
+      SET_VertexAttribs4dvNV(dest, loopback_VertexAttribs4dvNV);
+      SET_VertexAttribs4ubvNV(dest, loopback_VertexAttribs4ubvNV);
+   }
+
+   if (ctx->API != API_OPENGLES2) {
+      SET_VertexAttrib1sARB(dest, loopback_VertexAttrib1sARB);
+      SET_VertexAttrib1dARB(dest, loopback_VertexAttrib1dARB);
+      SET_VertexAttrib2sARB(dest, loopback_VertexAttrib2sARB);
+      SET_VertexAttrib2dARB(dest, loopback_VertexAttrib2dARB);
+      SET_VertexAttrib3sARB(dest, loopback_VertexAttrib3sARB);
+      SET_VertexAttrib3dARB(dest, loopback_VertexAttrib3dARB);
+      SET_VertexAttrib4sARB(dest, loopback_VertexAttrib4sARB);
+      SET_VertexAttrib4dARB(dest, loopback_VertexAttrib4dARB);
+      SET_VertexAttrib1svARB(dest, loopback_VertexAttrib1svARB);
+      SET_VertexAttrib1dvARB(dest, loopback_VertexAttrib1dvARB);
+      SET_VertexAttrib2svARB(dest, loopback_VertexAttrib2svARB);
+      SET_VertexAttrib2dvARB(dest, loopback_VertexAttrib2dvARB);
+      SET_VertexAttrib3svARB(dest, loopback_VertexAttrib3svARB);
+      SET_VertexAttrib3dvARB(dest, loopback_VertexAttrib3dvARB);
+      SET_VertexAttrib4svARB(dest, loopback_VertexAttrib4svARB);
+      SET_VertexAttrib4dvARB(dest, loopback_VertexAttrib4dvARB);
+      SET_VertexAttrib4NubARB(dest, loopback_VertexAttrib4NubARB);
+      SET_VertexAttrib4NubvARB(dest, loopback_VertexAttrib4NubvARB);
+      SET_VertexAttrib4bvARB(dest, loopback_VertexAttrib4bvARB);
+      SET_VertexAttrib4ivARB(dest, loopback_VertexAttrib4ivARB);
+      SET_VertexAttrib4ubvARB(dest, loopback_VertexAttrib4ubvARB);
+      SET_VertexAttrib4usvARB(dest, loopback_VertexAttrib4usvARB);
+      SET_VertexAttrib4uivARB(dest, loopback_VertexAttrib4uivARB);
+      SET_VertexAttrib4NbvARB(dest, loopback_VertexAttrib4NbvARB);
+      SET_VertexAttrib4NsvARB(dest, loopback_VertexAttrib4NsvARB);
+      SET_VertexAttrib4NusvARB(dest, loopback_VertexAttrib4NusvARB);
+      SET_VertexAttrib4NivARB(dest, loopback_VertexAttrib4NivARB);
+      SET_VertexAttrib4NuivARB(dest, loopback_VertexAttrib4NuivARB);
+
+      /* GL_EXT_gpu_shader4, GL 3.0 */
+      SET_VertexAttribI1ivEXT(dest, loopback_VertexAttribI1iv);
+      SET_VertexAttribI1uivEXT(dest, loopback_VertexAttribI1uiv);
+      SET_VertexAttribI4bvEXT(dest, loopback_VertexAttribI4bv);
+      SET_VertexAttribI4svEXT(dest, loopback_VertexAttribI4sv);
+      SET_VertexAttribI4ubvEXT(dest, loopback_VertexAttribI4ubv);
+      SET_VertexAttribI4usvEXT(dest, loopback_VertexAttribI4usv);
+   }
 }
 
 
diff --git a/src/mesa/main/api_loopback.h b/src/mesa/main/api_loopback.h
index f53b902..7d6a3db 100644
--- a/src/mesa/main/api_loopback.h
+++ b/src/mesa/main/api_loopback.h
@@ -34,7 +34,9 @@ struct _glapi_table;
 
 #if FEATURE_beginend
 
-extern void _mesa_loopback_init_api_table( struct _glapi_table *dest );
+extern void
+_mesa_loopback_init_api_table(const struct gl_context *ctx,
+                              struct _glapi_table *dest);
 
 #else /* FEATURE_beginend */
 
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 0d94f39..4e0de7c 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -9941,7 +9941,7 @@ _mesa_create_save_table(const struct gl_context *ctx)
    if (table == NULL)
       return NULL;
 
-   _mesa_loopback_init_api_table(table);
+   _mesa_loopback_init_api_table(ctx, table);
 
    /* GL 1.0 */
    SET_Accum(table, save_Accum);
-- 
1.7.11.4



More information about the mesa-dev mailing list