[Mesa-dev] [PATCH 1/3] st/mesa: check state->mesa in early return check in st_validate_state()
Jose Fonseca
jfonseca at vmware.com
Wed Jan 6 13:32:09 PST 2016
On 06/01/16 16:50, Brian Paul wrote:
> 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 at lists.freedesktop.org
> ---
> src/mesa/state_tracker/st_atom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/mesa/state_tracker/st_atom.c b/src/mesa/state_tracker/st_atom.c
> index 43dbadd..c1a9d00 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);*/
>
Good stuff.
Series looks good to me.
Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
Jose
More information about the mesa-dev
mailing list