From: Marek Olšák Date: Sun, 9 Apr 2017 14:48:40 +0000 (+0200) Subject: st/mesa: check in advance in st_draw_vbo whether the bitmap cache is empty X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86f99c1e4c9aec6433ae1c6a68f8f9d395cbfac6;p=mesa.git st/mesa: check in advance in st_draw_vbo whether the bitmap cache is empty Reviewed-by: Ilia Mirkin Reviewed-by: Brian Paul --- diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 8069f107880..d16160b656b 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -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. */