diff options
Diffstat (limited to 'src/mesa/pipe/draw/draw_vertex_cache.c')
-rw-r--r-- | src/mesa/pipe/draw/draw_vertex_cache.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/mesa/pipe/draw/draw_vertex_cache.c b/src/mesa/pipe/draw/draw_vertex_cache.c index 6689907ddf..29993f14d2 100644 --- a/src/mesa/pipe/draw/draw_vertex_cache.c +++ b/src/mesa/pipe/draw/draw_vertex_cache.c @@ -51,8 +51,15 @@ void draw_vertex_cache_invalidate( struct draw_context *draw ) } -/* Check if vertex is in cache, otherwise add it. It won't go through +/** + * Check if vertex is in cache, otherwise add it. It won't go through * VS yet, not until there is a flush operation or the VS queue fills up. + * + * Note that cache entries are basically just two pointers: the first + * an index into the user's vertex arrays, the second a location in + * the vertex shader cache for the post-transformed vertex. + * + * \return pointer to location of (post-transformed) vertex header in the cache */ static struct vertex_header *get_vertex( struct draw_context *draw, unsigned i ) @@ -104,7 +111,7 @@ static struct vertex_header *get_vertex( struct draw_context *draw, static struct vertex_header *get_uint_elt_vertex( struct draw_context *draw, unsigned i ) { - const unsigned *elts = (const unsigned *) draw->mapped_elts; + const unsigned *elts = (const unsigned *) draw->user.elts; return get_vertex( draw, elts[i] ); } @@ -112,7 +119,7 @@ static struct vertex_header *get_uint_elt_vertex( struct draw_context *draw, static struct vertex_header *get_ushort_elt_vertex( struct draw_context *draw, unsigned i ) { - const ushort *elts = (const ushort *) draw->mapped_elts; + const ushort *elts = (const ushort *) draw->user.elts; return get_vertex( draw, elts[i] ); } @@ -120,7 +127,7 @@ static struct vertex_header *get_ushort_elt_vertex( struct draw_context *draw, static struct vertex_header *get_ubyte_elt_vertex( struct draw_context *draw, unsigned i ) { - const ubyte *elts = (const ubyte *) draw->mapped_elts; + const ubyte *elts = (const ubyte *) draw->user.elts; return get_vertex( draw, elts[i] ); } @@ -189,7 +196,7 @@ draw_set_mapped_element_buffer( struct draw_context *draw, default: assert(0); } - draw->mapped_elts = elements; - draw->eltSize = eltSize; + draw->user.elts = elements; + draw->user.eltSize = eltSize; } |