aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2020-01-28 17:25:40 -0500
committerMarek Olšák <[email protected]>2020-02-04 15:12:01 -0500
commit052e8f758e68061adaee7f6f95bdbb01ae8f519d (patch)
tree13fa6decf59fd8bd7b2c70054217914cbe148b40 /src
parent9ec5e96ec8297216bcab4036deaa6eb714ca4e67 (diff)
vbo: use the template for save GLvertexformat initialization
Reviewed-by: Kristian H. Kristensen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3611>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/vbo/vbo_save_api.c157
1 files changed, 6 insertions, 151 deletions
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index 29684188127..aff90bf8023 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1559,157 +1559,12 @@ vtxfmt_init(struct gl_context *ctx)
struct vbo_save_context *save = &vbo_context(ctx)->save;
GLvertexformat *vfmt = &save->vtxfmt;
- vfmt->ArrayElement = _ae_ArrayElement;
-
- vfmt->Color3f = _save_Color3f;
- vfmt->Color3fv = _save_Color3fv;
- vfmt->Color4f = _save_Color4f;
- vfmt->Color4fv = _save_Color4fv;
- vfmt->EdgeFlag = _save_EdgeFlag;
- vfmt->End = _save_End;
- vfmt->PrimitiveRestartNV = _save_PrimitiveRestartNV;
- vfmt->FogCoordfEXT = _save_FogCoordfEXT;
- vfmt->FogCoordfvEXT = _save_FogCoordfvEXT;
- vfmt->Indexf = _save_Indexf;
- vfmt->Indexfv = _save_Indexfv;
- vfmt->Materialfv = _save_Materialfv;
- vfmt->MultiTexCoord1fARB = _save_MultiTexCoord1f;
- vfmt->MultiTexCoord1fvARB = _save_MultiTexCoord1fv;
- vfmt->MultiTexCoord2fARB = _save_MultiTexCoord2f;
- vfmt->MultiTexCoord2fvARB = _save_MultiTexCoord2fv;
- vfmt->MultiTexCoord3fARB = _save_MultiTexCoord3f;
- vfmt->MultiTexCoord3fvARB = _save_MultiTexCoord3fv;
- vfmt->MultiTexCoord4fARB = _save_MultiTexCoord4f;
- vfmt->MultiTexCoord4fvARB = _save_MultiTexCoord4fv;
- vfmt->Normal3f = _save_Normal3f;
- vfmt->Normal3fv = _save_Normal3fv;
- vfmt->SecondaryColor3fEXT = _save_SecondaryColor3fEXT;
- vfmt->SecondaryColor3fvEXT = _save_SecondaryColor3fvEXT;
- vfmt->TexCoord1f = _save_TexCoord1f;
- vfmt->TexCoord1fv = _save_TexCoord1fv;
- vfmt->TexCoord2f = _save_TexCoord2f;
- vfmt->TexCoord2fv = _save_TexCoord2fv;
- vfmt->TexCoord3f = _save_TexCoord3f;
- vfmt->TexCoord3fv = _save_TexCoord3fv;
- vfmt->TexCoord4f = _save_TexCoord4f;
- vfmt->TexCoord4fv = _save_TexCoord4fv;
- vfmt->Vertex2f = _save_Vertex2f;
- vfmt->Vertex2fv = _save_Vertex2fv;
- vfmt->Vertex3f = _save_Vertex3f;
- vfmt->Vertex3fv = _save_Vertex3fv;
- vfmt->Vertex4f = _save_Vertex4f;
- vfmt->Vertex4fv = _save_Vertex4fv;
- vfmt->VertexAttrib1fARB = _save_VertexAttrib1fARB;
- vfmt->VertexAttrib1fvARB = _save_VertexAttrib1fvARB;
- vfmt->VertexAttrib2fARB = _save_VertexAttrib2fARB;
- vfmt->VertexAttrib2fvARB = _save_VertexAttrib2fvARB;
- vfmt->VertexAttrib3fARB = _save_VertexAttrib3fARB;
- vfmt->VertexAttrib3fvARB = _save_VertexAttrib3fvARB;
- vfmt->VertexAttrib4fARB = _save_VertexAttrib4fARB;
- vfmt->VertexAttrib4fvARB = _save_VertexAttrib4fvARB;
-
- vfmt->VertexAttrib1fNV = _save_VertexAttrib1fNV;
- vfmt->VertexAttrib1fvNV = _save_VertexAttrib1fvNV;
- vfmt->VertexAttrib2fNV = _save_VertexAttrib2fNV;
- vfmt->VertexAttrib2fvNV = _save_VertexAttrib2fvNV;
- vfmt->VertexAttrib3fNV = _save_VertexAttrib3fNV;
- vfmt->VertexAttrib3fvNV = _save_VertexAttrib3fvNV;
- vfmt->VertexAttrib4fNV = _save_VertexAttrib4fNV;
- vfmt->VertexAttrib4fvNV = _save_VertexAttrib4fvNV;
-
- /* integer-valued */
- vfmt->VertexAttribI1i = _save_VertexAttribI1i;
- vfmt->VertexAttribI2i = _save_VertexAttribI2i;
- vfmt->VertexAttribI3i = _save_VertexAttribI3i;
- vfmt->VertexAttribI4i = _save_VertexAttribI4i;
- vfmt->VertexAttribI2iv = _save_VertexAttribI2iv;
- vfmt->VertexAttribI3iv = _save_VertexAttribI3iv;
- vfmt->VertexAttribI4iv = _save_VertexAttribI4iv;
-
- /* unsigned integer-valued */
- vfmt->VertexAttribI1ui = _save_VertexAttribI1ui;
- vfmt->VertexAttribI2ui = _save_VertexAttribI2ui;
- vfmt->VertexAttribI3ui = _save_VertexAttribI3ui;
- vfmt->VertexAttribI4ui = _save_VertexAttribI4ui;
- vfmt->VertexAttribI2uiv = _save_VertexAttribI2uiv;
- vfmt->VertexAttribI3uiv = _save_VertexAttribI3uiv;
- vfmt->VertexAttribI4uiv = _save_VertexAttribI4uiv;
-
- vfmt->VertexP2ui = _save_VertexP2ui;
- vfmt->VertexP3ui = _save_VertexP3ui;
- vfmt->VertexP4ui = _save_VertexP4ui;
- vfmt->VertexP2uiv = _save_VertexP2uiv;
- vfmt->VertexP3uiv = _save_VertexP3uiv;
- vfmt->VertexP4uiv = _save_VertexP4uiv;
-
- vfmt->TexCoordP1ui = _save_TexCoordP1ui;
- vfmt->TexCoordP2ui = _save_TexCoordP2ui;
- vfmt->TexCoordP3ui = _save_TexCoordP3ui;
- vfmt->TexCoordP4ui = _save_TexCoordP4ui;
- vfmt->TexCoordP1uiv = _save_TexCoordP1uiv;
- vfmt->TexCoordP2uiv = _save_TexCoordP2uiv;
- vfmt->TexCoordP3uiv = _save_TexCoordP3uiv;
- vfmt->TexCoordP4uiv = _save_TexCoordP4uiv;
-
- vfmt->MultiTexCoordP1ui = _save_MultiTexCoordP1ui;
- vfmt->MultiTexCoordP2ui = _save_MultiTexCoordP2ui;
- vfmt->MultiTexCoordP3ui = _save_MultiTexCoordP3ui;
- vfmt->MultiTexCoordP4ui = _save_MultiTexCoordP4ui;
- vfmt->MultiTexCoordP1uiv = _save_MultiTexCoordP1uiv;
- vfmt->MultiTexCoordP2uiv = _save_MultiTexCoordP2uiv;
- vfmt->MultiTexCoordP3uiv = _save_MultiTexCoordP3uiv;
- vfmt->MultiTexCoordP4uiv = _save_MultiTexCoordP4uiv;
-
- vfmt->NormalP3ui = _save_NormalP3ui;
- vfmt->NormalP3uiv = _save_NormalP3uiv;
-
- vfmt->ColorP3ui = _save_ColorP3ui;
- vfmt->ColorP4ui = _save_ColorP4ui;
- vfmt->ColorP3uiv = _save_ColorP3uiv;
- vfmt->ColorP4uiv = _save_ColorP4uiv;
-
- vfmt->SecondaryColorP3ui = _save_SecondaryColorP3ui;
- vfmt->SecondaryColorP3uiv = _save_SecondaryColorP3uiv;
-
- vfmt->VertexAttribP1ui = _save_VertexAttribP1ui;
- vfmt->VertexAttribP2ui = _save_VertexAttribP2ui;
- vfmt->VertexAttribP3ui = _save_VertexAttribP3ui;
- vfmt->VertexAttribP4ui = _save_VertexAttribP4ui;
-
- vfmt->VertexAttribP1uiv = _save_VertexAttribP1uiv;
- vfmt->VertexAttribP2uiv = _save_VertexAttribP2uiv;
- vfmt->VertexAttribP3uiv = _save_VertexAttribP3uiv;
- vfmt->VertexAttribP4uiv = _save_VertexAttribP4uiv;
-
- vfmt->VertexAttribL1d = _save_VertexAttribL1d;
- vfmt->VertexAttribL2d = _save_VertexAttribL2d;
- vfmt->VertexAttribL3d = _save_VertexAttribL3d;
- vfmt->VertexAttribL4d = _save_VertexAttribL4d;
-
- vfmt->VertexAttribL1dv = _save_VertexAttribL1dv;
- vfmt->VertexAttribL2dv = _save_VertexAttribL2dv;
- vfmt->VertexAttribL3dv = _save_VertexAttribL3dv;
- vfmt->VertexAttribL4dv = _save_VertexAttribL4dv;
-
- vfmt->VertexAttribL1ui64ARB = _save_VertexAttribL1ui64ARB;
- vfmt->VertexAttribL1ui64vARB = _save_VertexAttribL1ui64vARB;
-
- /* This will all require us to fallback to saving the list as opcodes:
- */
- vfmt->CallList = _save_CallList;
- vfmt->CallLists = _save_CallLists;
-
- vfmt->EvalCoord1f = _save_EvalCoord1f;
- vfmt->EvalCoord1fv = _save_EvalCoord1fv;
- vfmt->EvalCoord2f = _save_EvalCoord2f;
- vfmt->EvalCoord2fv = _save_EvalCoord2fv;
- vfmt->EvalPoint1 = _save_EvalPoint1;
- vfmt->EvalPoint2 = _save_EvalPoint2;
-
- /* These calls all generate GL_INVALID_OPERATION since this vtxfmt is
- * only used when we're inside a glBegin/End pair.
- */
- vfmt->Begin = _save_Begin;
+#define NAME_AE(x) _ae_##x
+#define NAME_CALLLIST(x) _save_##x
+#define NAME(x) _save_##x
+#define NAME_ES(x) _save_##x##ARB
+
+#include "vbo_init_tmp.h"
}