diff options
author | Brian <brian.paul@tungstengraphics.com> | 2007-08-23 17:59:17 -0600 |
---|---|---|
committer | Brian <brian.paul@tungstengraphics.com> | 2007-08-23 17:59:17 -0600 |
commit | c998ce1df09f2d9dc834ebdf9484673d8084db34 (patch) | |
tree | 1ee465ea98554a929d9a402b07b2d132c499105b /src/mesa/pipe/draw/draw_prim.c | |
parent | 38091ef42a647b0be20e0462b065cb9d88f0784b (diff) |
minor improvement to get_vertex() in-use flag setting
Diffstat (limited to 'src/mesa/pipe/draw/draw_prim.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_prim.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mesa/pipe/draw/draw_prim.c b/src/mesa/pipe/draw/draw_prim.c index 509ab376aa..2ba3cb3eb5 100644 --- a/src/mesa/pipe/draw/draw_prim.c +++ b/src/mesa/pipe/draw/draw_prim.c @@ -421,6 +421,8 @@ static struct vertex_header *get_vertex( struct draw_context *draw, */ if (draw->vcache.referenced & (1 << slot)) slot = VCACHE_SIZE + draw->vcache.overflow++; + else + draw->vcache.referenced |= (1 << slot); /* slot now in use */ draw->vcache.idx[slot] = i; @@ -436,10 +438,6 @@ static struct vertex_header *get_vertex( struct draw_context *draw, draw->vcache.vertex[slot]->edgeflag = 1; /*XXX use user's edge flag! */ } - /* Mark slot as in-use: - */ - if (slot < VCACHE_SIZE) - draw->vcache.referenced |= (1 << slot); return draw->vcache.vertex[slot]; } |