aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-04-09 16:48:40 +0200
committerMarek Olšák <[email protected]>2017-04-20 20:11:35 +0200
commit86f99c1e4c9aec6433ae1c6a68f8f9d395cbfac6 (patch)
tree4f61fd96b1dcb0bd1f84044178269a7173586c32 /src/mesa/state_tracker
parent1fb5bc83f19cc87767f902b99e77b330258a69dd (diff)
st/mesa: check in advance in st_draw_vbo whether the bitmap cache is empty
Reviewed-by: Ilia Mirkin <[email protected]> Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_draw.c4
1 files changed, 3 insertions, 1 deletions
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. */