[Mesa-dev] [PATCH 3/4] mesa/vbo: add ARB_vertex_type_2_10_10_10_rev APIs.

Dave Airlie airlied at gmail.com
Sun Sep 4 07:05:04 PDT 2011


From: Dave Airlie <airlied at redhat.com>

This adds the vertex processing paths for the 2101010 types. It converts
the attributes to floats for all the immediate entry points, some entrypoints
are normalised and the attrib APIs take a normalized parameter.

There are four main paths,
ui10 -> float unnormalized
i10 -> float unnormalized
ui10 -> float normalized
i10 -> float normalized
along with the ui2/i2 equivs.

Signed-off-by: Dave Airlie <airlied at redhat.com>
---
 src/mesa/vbo/vbo_attrib_tmp.h |  401 ++++++++++++++++++++++++++++++++++++++++-
 src/mesa/vbo/vbo_exec_api.c   |   45 +++++
 src/mesa/vbo/vbo_save_api.c   |   46 +++++
 3 files changed, 490 insertions(+), 2 deletions(-)

diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index c793ce0..4283154 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -1,7 +1,7 @@
 /**************************************************************************
 
 Copyright 2002 Tungsten Graphics Inc., Cedar Park, Texas.
-
+Copyright 2011 Dave Airlie (ARB_vertex_type_2_10_10_10_rev support)
 All Rights Reserved.
 
 Permission is hereby granted, free of charge, to any person obtaining a
@@ -59,7 +59,120 @@ USE OR OTHER DEALINGS IN THE SOFTWARE.
 
 #define MAT_ATTR( A, N, V ) ATTR( A, N, (V)[0], (V)[1], (V)[2], (V)[3] )
 
-
+static inline float conv_ui10_to_norm_float(unsigned ui10)
+{
+   return (float)(ui10) / 1023.0;
+}
+
+static inline float conv_ui2_to_norm_float(unsigned ui2)
+{
+   return (float)(ui2) / 3.0;
+}
+
+#define ATTRUI10_1( A, UI ) ATTR( A, 1, (UI) & 0x3ff, 0, 0, 1 )
+#define ATTRUI10_2( A, UI ) ATTR( A, 2, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, 0, 1 )
+#define ATTRUI10_3( A, UI ) ATTR( A, 3, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, ((UI) >> 20) & 0x3ff, 1 )
+#define ATTRUI10_4( A, UI ) ATTR( A, 4, (UI) & 0x3ff, ((UI) >> 10) & 0x3ff, ((UI) >> 20) & 0x3ff, ((UI) >> 30) & 0x3 )
+
+#define ATTRUI10N_1( A, UI ) ATTR( A, 1, conv_ui10_to_norm_float((UI) & 0x3ff), 0, 0, 1 )
+#define ATTRUI10N_2( A, UI ) ATTR( A, 2, \
+				   conv_ui10_to_norm_float((UI) & 0x3ff), \
+				   conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), 0, 1 )
+#define ATTRUI10N_3( A, UI ) ATTR( A, 3, \
+				   conv_ui10_to_norm_float((UI) & 0x3ff), \
+				   conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), \
+				   conv_ui10_to_norm_float(((UI) >> 20) & 0x3ff), 1 )
+#define ATTRUI10N_4( A, UI ) ATTR( A, 4, \
+				   conv_ui10_to_norm_float((UI) & 0x3ff), \
+				   conv_ui10_to_norm_float(((UI) >> 10) & 0x3ff), \
+				   conv_ui10_to_norm_float(((UI) >> 20) & 0x3ff), \
+				   conv_ui2_to_norm_float(((UI) >> 30) & 0x3) )
+
+struct attr_bits_10 {signed int x:10;};
+struct attr_bits_2 {signed int x:2;};
+
+static inline float conv_i10_to_i(int i10)
+{
+   struct attr_bits_10 val;
+   val.x = i10;
+   return (float)val.x;
+}
+
+static inline float conv_i2_to_i(int i2)
+{
+   struct attr_bits_2 val;
+   val.x = i2;
+   return (float)val.x;
+}
+
+static inline float conv_i10_to_norm_float(int i10)
+{
+   struct attr_bits_10 val;
+   val.x = i10;
+   return (2.0F * (float)val.x + 1.0F) * (1.0F  / 511.0F);
+}
+
+static inline float conv_i2_to_norm_float(int i2)
+{
+   struct attr_bits_2 val;
+   val.x = i2;
+   return (float)val.x;
+}
+
+#define ATTRI10_1( A, I10 ) ATTR( A, 1, conv_i10_to_i((I10) & 0x3ff), 0, 0, 1 )
+#define ATTRI10_2( A, I10 ) ATTR( A, 2, \
+				conv_i10_to_i((I10) & 0x3ff),		\
+				conv_i10_to_i(((I10) >> 10) & 0x3ff), 0, 1 )
+#define ATTRI10_3( A, I10 ) ATTR( A, 3, \
+				conv_i10_to_i((I10) & 0x3ff),	    \
+				conv_i10_to_i(((I10) >> 10) & 0x3ff), \
+				conv_i10_to_i(((I10) >> 20) & 0x3ff), 1 )
+#define ATTRI10_4( A, I10 ) ATTR( A, 4, \
+				conv_i10_to_i((I10) & 0x3ff),		\
+				conv_i10_to_i(((I10) >> 10) & 0x3ff), \
+				conv_i10_to_i(((I10) >> 20) & 0x3ff), \
+				conv_i2_to_i(((I10) >> 30) & 0x3))
+
+
+#define ATTRI10N_1( A, I10 ) ATTR( A, 1, conv_i10_to_norm_float((I10) & 0x3ff), 0, 0, 1 )
+#define ATTRI10N_2( A, I10 ) ATTR( A, 2, \
+				conv_i10_to_norm_float((I10) & 0x3ff),		\
+				conv_i10_to_norm_float(((I10) >> 10) & 0x3ff), 0, 1 )
+#define ATTRI10N_3( A, I10 ) ATTR( A, 3, \
+				conv_i10_to_norm_float((I10) & 0x3ff),	    \
+				conv_i10_to_norm_float(((I10) >> 10) & 0x3ff), \
+				conv_i10_to_norm_float(((I10) >> 20) & 0x3ff), 1 )
+#define ATTRI10N_4( A, I10 ) ATTR( A, 4, \
+				conv_i10_to_norm_float((I10) & 0x3ff),		\
+				conv_i10_to_norm_float(((I10) >> 10) & 0x3ff), \
+				conv_i10_to_norm_float(((I10) >> 20) & 0x3ff), \
+				conv_i2_to_norm_float(((I10) >> 30) & 0x3))
+
+#define ATTR_UI(val, type, normalized, attr, arg) do {		\
+   if ((type) == GL_UNSIGNED_INT_2_10_10_10_REV) {		\
+      if (normalized) {						\
+	 ATTRUI10N_##val((attr), (arg));			\
+      } else {							\
+	 ATTRUI10_##val((attr), (arg));				\
+      }								\
+   }   else if ((type) == GL_INT_2_10_10_10_REV) {		\
+      if (normalized) {						\
+	 ATTRI10N_##val((attr), (arg));				\
+      } else {							\
+	 ATTRI10_##val((attr), (arg));				\
+      }								\
+   } else							\
+      ERROR(GL_INVALID_VALUE);					\
+   } while(0)
+
+#define ATTR_UI_INDEX(val, type, normalized, index, arg) do {	\
+      if ((index) == 0) {					\
+	 ATTR_UI(val, (type), normalized, 0, (arg));			\
+      } else if ((index) < MAX_VERTEX_GENERIC_ATTRIBS) {		\
+	 ATTR_UI(val, (type), normalized, VBO_ATTRIB_GENERIC0 + (index), (arg)); \
+      } else								\
+	 ERROR(GL_INVALID_VALUE);					\
+   } while(0)
 
 static void GLAPIENTRY
 TAG(Vertex2f)(GLfloat x, GLfloat y)
@@ -725,6 +838,288 @@ TAG(Materialfv)(GLenum face, GLenum pname,
    }
 }
 
+static void GLAPIENTRY
+TAG(VertexP2ui)(GLenum type, GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(2, type, 0, VBO_ATTRIB_POS, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexP2uiv)(GLenum type, const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(2, type, 0, VBO_ATTRIB_POS, value[0]);
+}
+
+static void GLAPIENTRY
+TAG(VertexP3ui)(GLenum type, GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 0, VBO_ATTRIB_POS, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexP3uiv)(GLenum type, const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 0, VBO_ATTRIB_POS, value[0]);
+}
+
+static void GLAPIENTRY
+TAG(VertexP4ui)(GLenum type, GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(4, type, 0, VBO_ATTRIB_POS, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexP4uiv)(GLenum type, const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(4, type, 0, VBO_ATTRIB_POS, value[0]);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP1ui)(GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(1, type, 0, VBO_ATTRIB_TEX0, coords);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP1uiv)(GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(1, type, 0, VBO_ATTRIB_TEX0, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP2ui)(GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(2, type, 0, VBO_ATTRIB_TEX0, coords);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP2uiv)(GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(2, type, 0, VBO_ATTRIB_TEX0, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP3ui)(GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 0, VBO_ATTRIB_TEX0, coords);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP3uiv)(GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 0, VBO_ATTRIB_TEX0, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP4ui)(GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(4, type, 0, VBO_ATTRIB_TEX0, coords);
+}
+
+static void GLAPIENTRY
+TAG(TexCoordP4uiv)(GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(4, type, 0, VBO_ATTRIB_TEX0, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP1ui)(GLenum target, GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(1, type, 0, attr, coords);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP1uiv)(GLenum target, GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(1, type, 0, attr, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP2ui)(GLenum target, GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(2, type, 0, attr, coords);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP2uiv)(GLenum target, GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(2, type, 0, attr, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP3ui)(GLenum target, GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(3, type, 0, attr, coords);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP3uiv)(GLenum target, GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(3, type, 0, attr, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP4ui)(GLenum target, GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+   ATTR_UI(4, type, 0, attr, coords);
+}
+
+static void GLAPIENTRY
+TAG(MultiTexCoordP4uiv)(GLenum target, GLenum type, const GLuint *coords)
+{
+    GET_CURRENT_CONTEXT(ctx);
+    GLuint attr = (target & 0x7) + VBO_ATTRIB_TEX0;
+    ATTR_UI(4, type, 0, attr, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(NormalP3ui)(GLenum type, GLuint coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 1, VBO_ATTRIB_NORMAL, coords);
+}
+
+static void GLAPIENTRY
+TAG(NormalP3uiv)(GLenum type, const GLuint *coords)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 1, VBO_ATTRIB_NORMAL, coords[0]);
+}
+
+static void GLAPIENTRY
+TAG(ColorP3ui)(GLenum type, GLuint color)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 1, VBO_ATTRIB_COLOR0, color);
+}
+
+static void GLAPIENTRY
+TAG(ColorP3uiv)(GLenum type, const GLuint *color)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 1, VBO_ATTRIB_COLOR0, color[0]);
+}
+
+static void GLAPIENTRY
+TAG(ColorP4ui)(GLenum type, GLuint color)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(4, type, 1, VBO_ATTRIB_COLOR0, color);
+}
+
+static void GLAPIENTRY
+TAG(ColorP4uiv)(GLenum type, const GLuint *color)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(4, type, 1, VBO_ATTRIB_COLOR0, color[0]);
+}
+
+static void GLAPIENTRY
+TAG(SecondaryColorP3ui)(GLenum type, GLuint color)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 1, VBO_ATTRIB_COLOR1, color);
+}
+
+static void GLAPIENTRY
+TAG(SecondaryColorP3uiv)(GLenum type, const GLuint *color)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI(3, type, 1, VBO_ATTRIB_COLOR1, color[0]);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP1ui)(GLuint index, GLenum type, GLboolean normalized,
+		      GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(1, type, normalized, index, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP2ui)(GLuint index, GLenum type, GLboolean normalized,
+		      GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(2, type, normalized, index, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP3ui)(GLuint index, GLenum type, GLboolean normalized,
+		      GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(3, type, normalized, index, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP4ui)(GLuint index, GLenum type, GLboolean normalized,
+		      GLuint value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(4, type, normalized, index, value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP1uiv)(GLuint index, GLenum type, GLboolean normalized,
+		       const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(1, type, normalized, index, *value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP2uiv)(GLuint index, GLenum type, GLboolean normalized,
+		       const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(2, type, normalized, index, *value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP3uiv)(GLuint index, GLenum type, GLboolean normalized,
+		       const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(3, type, normalized, index, *value);
+}
+
+static void GLAPIENTRY
+TAG(VertexAttribP4uiv)(GLuint index, GLenum type, GLboolean normalized,
+		      const GLuint *value)
+{
+   GET_CURRENT_CONTEXT(ctx);
+   ATTR_UI_INDEX(4, type, normalized, index, *value);
+}
+
 
 #undef ATTR1FV
 #undef ATTR2FV
@@ -736,5 +1131,7 @@ TAG(Materialfv)(GLenum face, GLenum pname,
 #undef ATTR3F
 #undef ATTR4F
 
+#undef ATTR_UI
+
 #undef MAT
 #undef MAT_ATTR
diff --git a/src/mesa/vbo/vbo_exec_api.c b/src/mesa/vbo/vbo_exec_api.c
index 8474c78..cad7c46 100644
--- a/src/mesa/vbo/vbo_exec_api.c
+++ b/src/mesa/vbo/vbo_exec_api.c
@@ -742,6 +742,51 @@ static void vbo_exec_vtxfmt_init( struct vbo_exec_context *exec )
    vfmt->Indexf = vbo_Indexf;
    vfmt->Indexfv = vbo_Indexfv;
 
+   /* ARB_vertex_type_2_10_10_10_rev */
+   vfmt->VertexP2ui = vbo_VertexP2ui;
+   vfmt->VertexP2uiv = vbo_VertexP2uiv;
+   vfmt->VertexP3ui = vbo_VertexP3ui;
+   vfmt->VertexP3uiv = vbo_VertexP3uiv;
+   vfmt->VertexP4ui = vbo_VertexP4ui;
+   vfmt->VertexP4uiv = vbo_VertexP4uiv;
+
+   vfmt->TexCoordP1ui = vbo_TexCoordP1ui;
+   vfmt->TexCoordP1uiv = vbo_TexCoordP1uiv;
+   vfmt->TexCoordP2ui = vbo_TexCoordP2ui;
+   vfmt->TexCoordP2uiv = vbo_TexCoordP2uiv;
+   vfmt->TexCoordP3ui = vbo_TexCoordP3ui;
+   vfmt->TexCoordP3uiv = vbo_TexCoordP3uiv;
+   vfmt->TexCoordP4ui = vbo_TexCoordP4ui;
+   vfmt->TexCoordP4uiv = vbo_TexCoordP4uiv;
+
+   vfmt->MultiTexCoordP1ui = vbo_MultiTexCoordP1ui;
+   vfmt->MultiTexCoordP1uiv = vbo_MultiTexCoordP1uiv;
+   vfmt->MultiTexCoordP2ui = vbo_MultiTexCoordP2ui;
+   vfmt->MultiTexCoordP2uiv = vbo_MultiTexCoordP2uiv;
+   vfmt->MultiTexCoordP3ui = vbo_MultiTexCoordP3ui;
+   vfmt->MultiTexCoordP3uiv = vbo_MultiTexCoordP3uiv;
+   vfmt->MultiTexCoordP4ui = vbo_MultiTexCoordP4ui;
+   vfmt->MultiTexCoordP4uiv = vbo_MultiTexCoordP4uiv;
+   
+   vfmt->NormalP3ui = vbo_NormalP3ui;
+   vfmt->NormalP3uiv = vbo_NormalP3uiv;
+
+   vfmt->ColorP3ui = vbo_ColorP3ui;
+   vfmt->ColorP3uiv = vbo_ColorP3uiv;
+   vfmt->ColorP4ui = vbo_ColorP4ui;
+   vfmt->ColorP4uiv = vbo_ColorP4uiv;
+
+   vfmt->SecondaryColorP3ui = vbo_SecondaryColorP3ui;
+   vfmt->SecondaryColorP3uiv = vbo_SecondaryColorP3uiv;
+
+   vfmt->VertexAttribP1ui = vbo_VertexAttribP1ui;
+   vfmt->VertexAttribP1uiv = vbo_VertexAttribP1uiv;
+   vfmt->VertexAttribP2ui = vbo_VertexAttribP2ui;
+   vfmt->VertexAttribP2uiv = vbo_VertexAttribP2uiv;
+   vfmt->VertexAttribP3ui = vbo_VertexAttribP3ui;
+   vfmt->VertexAttribP3uiv = vbo_VertexAttribP3uiv;
+   vfmt->VertexAttribP4ui = vbo_VertexAttribP4ui;
+   vfmt->VertexAttribP4uiv = vbo_VertexAttribP4uiv;
 }
 
 
diff --git a/src/mesa/vbo/vbo_save_api.c b/src/mesa/vbo/vbo_save_api.c
index ad36e93..87a52e8 100644
--- a/src/mesa/vbo/vbo_save_api.c
+++ b/src/mesa/vbo/vbo_save_api.c
@@ -1171,6 +1171,52 @@ _save_vtxfmt_init(struct gl_context *ctx)
    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;
+
    /* This will all require us to fallback to saving the list as opcodes:
     */
    _MESA_INIT_DLIST_VTXFMT(vfmt, _save_);       /* inside begin/end */
-- 
1.7.6



More information about the mesa-dev mailing list