st/mesa: check in advance in st_draw_vbo whether the bitmap cache is empty

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
Marek Olšák 2017-04-09 16:48:40 +02:00
parent 1fb5bc83f1
commit 86f99c1e4c

View file

@ -182,7 +182,9 @@ st_draw_vbo(struct gl_context *ctx,
/* Mesa core state should have been validated already */
assert(ctx->NewState == 0x0);
st_flush_bitmap_cache(st);
if (unlikely(!st->bitmap.cache.empty))
st_flush_bitmap_cache(st);
st_invalidate_readpix_cache(st);
/* Validate state. */