diff options
author | Marek Olšák <[email protected]> | 2017-04-09 16:48:40 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-04-20 20:11:35 +0200 |
commit | 86f99c1e4c9aec6433ae1c6a68f8f9d395cbfac6 (patch) | |
tree | 4f61fd96b1dcb0bd1f84044178269a7173586c32 | |
parent | 1fb5bc83f19cc87767f902b99e77b330258a69dd (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]>
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 4 |
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. */ |