diff options
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_post_vs.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_post_vs.c | 13 |
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]; |