summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2016-01-05 17:10:12 -0700
committerEmil Velikov <emil.l.velikov@gmail.com>2016-01-08 12:05:27 +0200
commitfab2039588be1e5f6bbd53d8b1422776e213494a (patch)
tree85ce3ba09388b46f3d27d4f3c229ee0322ec1e15
parent536c8cbcd3326fc7207f8a2c166c380135924589 (diff)
downloadmesa-fab2039588be1e5f6bbd53d8b1422776e213494a.tar.gz
st/mesa: check state->mesa in early return check in st_validate_state()
We were checking the dirty->st flags but not the dirty->mesa flags. When we took the early return, we didn't clear the dirty->mesa flags so the next time we called st_validate_state() we'd often flush the glBitmap cache. And since st_validate_state() is called from st_Bitmap(), it meant we flushed the bitmap cache for every glBitmap() call. This change seems to recover most of the performance loss observed with the ipers demo on llvmpipe since commit commit 36c93a6fae27561. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: José Fonseca <jfonseca@vmware.com> (cherry picked from commit c28d72a3473ad0127c82c1244b6688dcc184e85e)
-rw-r--r--src/mesa/state_tracker/st_atom.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
index 43dbadd4a7e..c1a9d00969f 100644
--- a/src/mesa/state_tracker/st_atom.c
+++ b/src/mesa/state_tracker/st_atom.c
@@ -188,7 +188,7 @@ void st_validate_state( struct st_context *st )
st_manager_validate_framebuffers(st);
- if (state->st == 0)
+ if (state->st == 0 && state->mesa == 0)
return;
/*printf("%s %x/%x\n", __func__, state->mesa, state->st);*/