mesa: call _mesa_update_state() before validation
authorMarek Olšák <marek.olsak@amd.com>
Mon, 25 Jan 2021 16:14:09 +0000 (11:14 -0500)
committerMarge Bot <eric+marge@anholt.net>
Mon, 15 Feb 2021 19:29:09 +0000 (19:29 +0000)
commit7794305f0d7931691cf075f38cad8f1e68ea28c6
tree3e504dc767d3ce09b3f55e54f8481221fa340bd2
parent6daa113c39760fdf0178154a2cd4b53cebe24cd5
mesa: call _mesa_update_state() before validation

It's called in both the no_error path and the draw validation path, so we
might as well call it before the no_error conditional.

This decreases CPU overhead a lot, which I'm unable to explain. It seems
to be random gcc behavior, which I've seen quite a lot now.

Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8798>
src/mesa/main/draw.c
src/mesa/main/draw_validate.c
src/mesa/vbo/vbo_exec_api.c