diff options
Diffstat (limited to 'src/mesa/pipe/draw')
-rw-r--r-- | src/mesa/pipe/draw/draw_clip.c | 2 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_private.h | 6 | ||||
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_cache.c | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/pipe/draw/draw_clip.c b/src/mesa/pipe/draw/draw_clip.c index 222022d6c1..bc62d422a4 100644 --- a/src/mesa/pipe/draw/draw_clip.c +++ b/src/mesa/pipe/draw/draw_clip.c @@ -102,7 +102,7 @@ static void interp( const struct clipper *clip, dst->clipmask = 0; dst->edgeflag = 0; dst->pad = 0; - dst->vertex_id = 0; + dst->vertex_id = UNDEFINED_VERTEX_ID; } /* Clip coordinates: interpolate normally diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h index f52ff0bd44..bdc3a6b9e7 100644 --- a/src/mesa/pipe/draw/draw_private.h +++ b/src/mesa/pipe/draw/draw_private.h @@ -52,6 +52,7 @@ struct gallivm_prog; struct gallivm_cpu_engine; + /** * Basic vertex info. * Carry some useful information around with the vertices in the prim pipe. @@ -67,6 +68,9 @@ struct vertex_header { float data[][4]; /* Note variable size */ }; +/* NOTE: It should match vertex_id size above */ +#define UNDEFINED_VERTEX_ID 0xffff + /* XXX This is too large */ #define MAX_VERTEX_SIZE ((2 + PIPE_MAX_SHADER_OUTPUTS) * 4 * sizeof(float)) @@ -299,7 +303,7 @@ dup_vert( struct draw_stage *stage, { struct vertex_header *tmp = stage->tmp[idx]; memcpy(tmp, vert, stage->draw->vertex_info.size * sizeof(float) ); - tmp->vertex_id = ~0; + tmp->vertex_id = UNDEFINED_VERTEX_ID; return tmp; } diff --git a/src/mesa/pipe/draw/draw_vertex_cache.c b/src/mesa/pipe/draw/draw_vertex_cache.c index 511f371ac8..6689907ddf 100644 --- a/src/mesa/pipe/draw/draw_vertex_cache.c +++ b/src/mesa/pipe/draw/draw_vertex_cache.c @@ -88,7 +88,7 @@ static struct vertex_header *get_vertex( struct draw_context *draw, draw->vcache.vertex[slot]->clipmask = 0; draw->vcache.vertex[slot]->edgeflag = 1; /*XXX use user's edge flag! */ draw->vcache.vertex[slot]->pad = 0; - draw->vcache.vertex[slot]->vertex_id = ~0; + draw->vcache.vertex[slot]->vertex_id = UNDEFINED_VERTEX_ID; } @@ -130,7 +130,7 @@ void draw_vertex_cache_reset_vertex_ids( struct draw_context *draw ) unsigned i; for (i = 0; i < Elements(draw->vcache.vertex); i++) - draw->vcache.vertex[i]->vertex_id = ~0; + draw->vcache.vertex[i]->vertex_id = UNDEFINED_VERTEX_ID; } |