aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/vtxfmt.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-07-31 10:00:43 +0200
committermarha <marha@users.sourceforge.net>2012-07-31 10:00:43 +0200
commitbd27b3d008b0abf9ae2edcb127302728808533e4 (patch)
treea73a74f04a31a0f44465ed82bcf58b180ca53dbd /mesalib/src/mesa/main/vtxfmt.c
parent2ff5448bcca8cba4b62026d5493cb08aaf2838d8 (diff)
downloadvcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.tar.gz
vcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.tar.bz2
vcxsrv-bd27b3d008b0abf9ae2edcb127302728808533e4.zip
fontconfig libXext mesa xserver pixman git update 31 Jul 2012
Diffstat (limited to 'mesalib/src/mesa/main/vtxfmt.c')
-rw-r--r--mesalib/src/mesa/main/vtxfmt.c171
1 files changed, 90 insertions, 81 deletions
diff --git a/mesalib/src/mesa/main/vtxfmt.c b/mesalib/src/mesa/main/vtxfmt.c
index bf7a54c0a..ce490ed9e 100644
--- a/mesalib/src/mesa/main/vtxfmt.c
+++ b/mesalib/src/mesa/main/vtxfmt.c
@@ -45,57 +45,64 @@
* API dispatch table.
*/
static void
-install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
+install_vtxfmt(struct gl_context *ctx, struct _glapi_table *tab,
+ const GLvertexformat *vfmt)
{
_mesa_install_arrayelt_vtxfmt(tab, vfmt);
- SET_Color3f(tab, vfmt->Color3f);
- SET_Color3fv(tab, vfmt->Color3fv);
- SET_Color4f(tab, vfmt->Color4f);
- SET_Color4fv(tab, vfmt->Color4fv);
- SET_EdgeFlag(tab, vfmt->EdgeFlag);
+ if (ctx->API != API_OPENGL_CORE) {
+ SET_Color3f(tab, vfmt->Color3f);
+ SET_Color3fv(tab, vfmt->Color3fv);
+ SET_Color4f(tab, vfmt->Color4f);
+ SET_Color4fv(tab, vfmt->Color4fv);
+ SET_EdgeFlag(tab, vfmt->EdgeFlag);
+ }
_mesa_install_eval_vtxfmt(tab, vfmt);
- SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT);
- SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT);
- SET_Indexf(tab, vfmt->Indexf);
- SET_Indexfv(tab, vfmt->Indexfv);
- SET_Materialfv(tab, vfmt->Materialfv);
- SET_MultiTexCoord1fARB(tab, vfmt->MultiTexCoord1fARB);
- SET_MultiTexCoord1fvARB(tab, vfmt->MultiTexCoord1fvARB);
- SET_MultiTexCoord2fARB(tab, vfmt->MultiTexCoord2fARB);
- SET_MultiTexCoord2fvARB(tab, vfmt->MultiTexCoord2fvARB);
- SET_MultiTexCoord3fARB(tab, vfmt->MultiTexCoord3fARB);
- SET_MultiTexCoord3fvARB(tab, vfmt->MultiTexCoord3fvARB);
- SET_MultiTexCoord4fARB(tab, vfmt->MultiTexCoord4fARB);
- SET_MultiTexCoord4fvARB(tab, vfmt->MultiTexCoord4fvARB);
- SET_Normal3f(tab, vfmt->Normal3f);
- SET_Normal3fv(tab, vfmt->Normal3fv);
- SET_SecondaryColor3fEXT(tab, vfmt->SecondaryColor3fEXT);
- SET_SecondaryColor3fvEXT(tab, vfmt->SecondaryColor3fvEXT);
- SET_TexCoord1f(tab, vfmt->TexCoord1f);
- SET_TexCoord1fv(tab, vfmt->TexCoord1fv);
- SET_TexCoord2f(tab, vfmt->TexCoord2f);
- SET_TexCoord2fv(tab, vfmt->TexCoord2fv);
- SET_TexCoord3f(tab, vfmt->TexCoord3f);
- SET_TexCoord3fv(tab, vfmt->TexCoord3fv);
- SET_TexCoord4f(tab, vfmt->TexCoord4f);
- SET_TexCoord4fv(tab, vfmt->TexCoord4fv);
- SET_Vertex2f(tab, vfmt->Vertex2f);
- SET_Vertex2fv(tab, vfmt->Vertex2fv);
- SET_Vertex3f(tab, vfmt->Vertex3f);
- SET_Vertex3fv(tab, vfmt->Vertex3fv);
- SET_Vertex4f(tab, vfmt->Vertex4f);
- SET_Vertex4fv(tab, vfmt->Vertex4fv);
+ if (ctx->API != API_OPENGL_CORE) {
+ SET_FogCoordfEXT(tab, vfmt->FogCoordfEXT);
+ SET_FogCoordfvEXT(tab, vfmt->FogCoordfvEXT);
+ SET_Indexf(tab, vfmt->Indexf);
+ SET_Indexfv(tab, vfmt->Indexfv);
+ SET_Materialfv(tab, vfmt->Materialfv);
+ SET_MultiTexCoord1fARB(tab, vfmt->MultiTexCoord1fARB);
+ SET_MultiTexCoord1fvARB(tab, vfmt->MultiTexCoord1fvARB);
+ SET_MultiTexCoord2fARB(tab, vfmt->MultiTexCoord2fARB);
+ SET_MultiTexCoord2fvARB(tab, vfmt->MultiTexCoord2fvARB);
+ SET_MultiTexCoord3fARB(tab, vfmt->MultiTexCoord3fARB);
+ SET_MultiTexCoord3fvARB(tab, vfmt->MultiTexCoord3fvARB);
+ SET_MultiTexCoord4fARB(tab, vfmt->MultiTexCoord4fARB);
+ SET_MultiTexCoord4fvARB(tab, vfmt->MultiTexCoord4fvARB);
+ SET_Normal3f(tab, vfmt->Normal3f);
+ SET_Normal3fv(tab, vfmt->Normal3fv);
+ SET_SecondaryColor3fEXT(tab, vfmt->SecondaryColor3fEXT);
+ SET_SecondaryColor3fvEXT(tab, vfmt->SecondaryColor3fvEXT);
+ SET_TexCoord1f(tab, vfmt->TexCoord1f);
+ SET_TexCoord1fv(tab, vfmt->TexCoord1fv);
+ SET_TexCoord2f(tab, vfmt->TexCoord2f);
+ SET_TexCoord2fv(tab, vfmt->TexCoord2fv);
+ SET_TexCoord3f(tab, vfmt->TexCoord3f);
+ SET_TexCoord3fv(tab, vfmt->TexCoord3fv);
+ SET_TexCoord4f(tab, vfmt->TexCoord4f);
+ SET_TexCoord4fv(tab, vfmt->TexCoord4fv);
+ SET_Vertex2f(tab, vfmt->Vertex2f);
+ SET_Vertex2fv(tab, vfmt->Vertex2fv);
+ SET_Vertex3f(tab, vfmt->Vertex3f);
+ SET_Vertex3fv(tab, vfmt->Vertex3fv);
+ SET_Vertex4f(tab, vfmt->Vertex4f);
+ SET_Vertex4fv(tab, vfmt->Vertex4fv);
+ }
_mesa_install_dlist_vtxfmt(tab, vfmt); /* glCallList / glCallLists */
- SET_Begin(tab, vfmt->Begin);
- SET_End(tab, vfmt->End);
- SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV);
+ if (ctx->API != API_OPENGL_CORE) {
+ SET_Begin(tab, vfmt->Begin);
+ SET_End(tab, vfmt->End);
+ SET_PrimitiveRestartNV(tab, vfmt->PrimitiveRestartNV);
- SET_Rectf(tab, vfmt->Rectf);
+ SET_Rectf(tab, vfmt->Rectf);
+ }
SET_DrawArrays(tab, vfmt->DrawArrays);
SET_DrawElements(tab, vfmt->DrawElements);
@@ -154,42 +161,44 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
SET_VertexAttribI3uivEXT(tab, vfmt->VertexAttribI3uiv);
SET_VertexAttribI4uivEXT(tab, vfmt->VertexAttribI4uiv);
- /* GL_ARB_vertex_type_10_10_10_2_rev / GL 3.3 */
- SET_VertexP2ui(tab, vfmt->VertexP2ui);
- SET_VertexP2uiv(tab, vfmt->VertexP2uiv);
- SET_VertexP3ui(tab, vfmt->VertexP3ui);
- SET_VertexP3uiv(tab, vfmt->VertexP3uiv);
- SET_VertexP4ui(tab, vfmt->VertexP4ui);
- SET_VertexP4uiv(tab, vfmt->VertexP4uiv);
-
- SET_TexCoordP1ui(tab, vfmt->TexCoordP1ui);
- SET_TexCoordP1uiv(tab, vfmt->TexCoordP1uiv);
- SET_TexCoordP2ui(tab, vfmt->TexCoordP2ui);
- SET_TexCoordP2uiv(tab, vfmt->TexCoordP2uiv);
- SET_TexCoordP3ui(tab, vfmt->TexCoordP3ui);
- SET_TexCoordP3uiv(tab, vfmt->TexCoordP3uiv);
- SET_TexCoordP4ui(tab, vfmt->TexCoordP4ui);
- SET_TexCoordP4uiv(tab, vfmt->TexCoordP4uiv);
-
- SET_MultiTexCoordP1ui(tab, vfmt->MultiTexCoordP1ui);
- SET_MultiTexCoordP2ui(tab, vfmt->MultiTexCoordP2ui);
- SET_MultiTexCoordP3ui(tab, vfmt->MultiTexCoordP3ui);
- SET_MultiTexCoordP4ui(tab, vfmt->MultiTexCoordP4ui);
- SET_MultiTexCoordP1uiv(tab, vfmt->MultiTexCoordP1uiv);
- SET_MultiTexCoordP2uiv(tab, vfmt->MultiTexCoordP2uiv);
- SET_MultiTexCoordP3uiv(tab, vfmt->MultiTexCoordP3uiv);
- SET_MultiTexCoordP4uiv(tab, vfmt->MultiTexCoordP4uiv);
-
- SET_NormalP3ui(tab, vfmt->NormalP3ui);
- SET_NormalP3uiv(tab, vfmt->NormalP3uiv);
-
- SET_ColorP3ui(tab, vfmt->ColorP3ui);
- SET_ColorP4ui(tab, vfmt->ColorP4ui);
- SET_ColorP3uiv(tab, vfmt->ColorP3uiv);
- SET_ColorP4uiv(tab, vfmt->ColorP4uiv);
-
- SET_SecondaryColorP3ui(tab, vfmt->SecondaryColorP3ui);
- SET_SecondaryColorP3uiv(tab, vfmt->SecondaryColorP3uiv);
+ if (ctx->API != API_OPENGL_CORE) {
+ /* GL_ARB_vertex_type_10_10_10_2_rev / GL 3.3 */
+ SET_VertexP2ui(tab, vfmt->VertexP2ui);
+ SET_VertexP2uiv(tab, vfmt->VertexP2uiv);
+ SET_VertexP3ui(tab, vfmt->VertexP3ui);
+ SET_VertexP3uiv(tab, vfmt->VertexP3uiv);
+ SET_VertexP4ui(tab, vfmt->VertexP4ui);
+ SET_VertexP4uiv(tab, vfmt->VertexP4uiv);
+
+ SET_TexCoordP1ui(tab, vfmt->TexCoordP1ui);
+ SET_TexCoordP1uiv(tab, vfmt->TexCoordP1uiv);
+ SET_TexCoordP2ui(tab, vfmt->TexCoordP2ui);
+ SET_TexCoordP2uiv(tab, vfmt->TexCoordP2uiv);
+ SET_TexCoordP3ui(tab, vfmt->TexCoordP3ui);
+ SET_TexCoordP3uiv(tab, vfmt->TexCoordP3uiv);
+ SET_TexCoordP4ui(tab, vfmt->TexCoordP4ui);
+ SET_TexCoordP4uiv(tab, vfmt->TexCoordP4uiv);
+
+ SET_MultiTexCoordP1ui(tab, vfmt->MultiTexCoordP1ui);
+ SET_MultiTexCoordP2ui(tab, vfmt->MultiTexCoordP2ui);
+ SET_MultiTexCoordP3ui(tab, vfmt->MultiTexCoordP3ui);
+ SET_MultiTexCoordP4ui(tab, vfmt->MultiTexCoordP4ui);
+ SET_MultiTexCoordP1uiv(tab, vfmt->MultiTexCoordP1uiv);
+ SET_MultiTexCoordP2uiv(tab, vfmt->MultiTexCoordP2uiv);
+ SET_MultiTexCoordP3uiv(tab, vfmt->MultiTexCoordP3uiv);
+ SET_MultiTexCoordP4uiv(tab, vfmt->MultiTexCoordP4uiv);
+
+ SET_NormalP3ui(tab, vfmt->NormalP3ui);
+ SET_NormalP3uiv(tab, vfmt->NormalP3uiv);
+
+ SET_ColorP3ui(tab, vfmt->ColorP3ui);
+ SET_ColorP4ui(tab, vfmt->ColorP4ui);
+ SET_ColorP3uiv(tab, vfmt->ColorP3uiv);
+ SET_ColorP4uiv(tab, vfmt->ColorP4uiv);
+
+ SET_SecondaryColorP3ui(tab, vfmt->SecondaryColorP3ui);
+ SET_SecondaryColorP3uiv(tab, vfmt->SecondaryColorP3uiv);
+ }
SET_VertexAttribP1ui(tab, vfmt->VertexAttribP1ui);
SET_VertexAttribP2ui(tab, vfmt->VertexAttribP2ui);
@@ -209,8 +218,8 @@ install_vtxfmt( struct _glapi_table *tab, const GLvertexformat *vfmt )
void
_mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
- if (ctx->API == API_OPENGL)
- install_vtxfmt( ctx->Exec, vfmt );
+ if (_mesa_is_desktop_gl(ctx))
+ install_vtxfmt( ctx, ctx->Exec, vfmt );
}
@@ -221,8 +230,8 @@ _mesa_install_exec_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
void
_mesa_install_save_vtxfmt(struct gl_context *ctx, const GLvertexformat *vfmt)
{
- if (ctx->API == API_OPENGL)
- install_vtxfmt( ctx->Save, vfmt );
+ if (_mesa_is_desktop_gl(ctx))
+ install_vtxfmt( ctx, ctx->Save, vfmt );
}