Only install vtxfmt tables for OpenGL
authorKristian Høgsberg <krh@bitplanet.net>
Thu, 14 Oct 2010 18:57:47 +0000 (14:57 -0400)
committerKristian Høgsberg <krh@bitplanet.net>
Thu, 14 Oct 2010 19:00:22 +0000 (15:00 -0400)
GLES1 and GLES2 install their own exec pointers and don't need the
Save table.  Also, the SET_* macros use different indices for the different
APIs so the offsets used in vtxfmt.c are actually wrong for the ES APIs.

src/mesa/main/vtxfmt.c

index 887c7d9..13b1aa9 100644 (file)
@@ -127,13 +127,15 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
 
 void _mesa_install_exec_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
 {
-   install_vtxfmt( ctx->Exec, vfmt );
+   if (ctx->API == API_OPENGL)
+      install_vtxfmt( ctx->Exec, vfmt );
 }
 
 
 void _mesa_install_save_vtxfmt( struct gl_context *ctx, const GLvertexformat *vfmt )
 {
-   install_vtxfmt( ctx->Save, vfmt );
+   if (ctx->API == API_OPENGL)
+      install_vtxfmt( ctx->Save, vfmt );
 }