summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_pt_post_vs.c
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2010-06-23 18:13:25 -0400
committerZack Rusin <zackr@vmware.com>2010-06-25 19:33:27 -0400
commit5cf1921e6d7ba36e6e882094d3280e3cd363df61 (patch)
tree3d0a3067a9b20840eca28f7009725b3c803f3481 /src/gallium/auxiliary/draw/draw_pt_post_vs.c
parent4ae530370d8b66092681b9e818012dcb205db518 (diff)
draw: initialize vertex header
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_post_vs.c')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_post_vs.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_post_vs.c b/src/gallium/auxiliary/draw/draw_pt_post_vs.c
index 112be50f9ae..fb92bd8d715 100644
--- a/src/gallium/auxiliary/draw/draw_pt_post_vs.c
+++ b/src/gallium/auxiliary/draw/draw_pt_post_vs.c
@@ -38,7 +38,14 @@ struct pt_post_vs {
struct draw_vertex_info *info );
};
-
+static INLINE void
+initialize_vertex_header(struct vertex_header *header)
+{
+ header->clipmask = 0;
+ header->edgeflag = 1;
+ header->pad = 0;
+ header->vertex_id = UNDEFINED_VERTEX_ID;
+}
static INLINE float
dot4(const float *a, const float *b)
@@ -49,8 +56,6 @@ dot4(const float *a, const float *b)
a[3]*b[3]);
}
-
-
static INLINE unsigned
compute_clipmask_gl(const float *clip, /*const*/ float plane[][4], unsigned nr)
{
@@ -103,6 +108,7 @@ static boolean post_vs_cliptest_viewport_gl( struct pt_post_vs *pvs,
for (j = 0; j < info->count; j++) {
float *position = out->data[pos];
+ initialize_vertex_header(out);
#if 0
debug_printf("%d) io = %p, data = %p = [%f, %f, %f, %f]\n",
j, out, position, position[0], position[1], position[2], position[3]);
@@ -192,6 +198,7 @@ static boolean post_vs_viewport( struct pt_post_vs *pvs,
for (j = 0; j < info->count; j++) {
float *position = out->data[pos];
+ initialize_vertex_header(out);
/* Viewport mapping only, no cliptest/rhw divide
*/
position[0] = position[0] * scale[0] + trans[0];