mesa: short-cut new_state == _NEW_LINE in _mesa_update_state_locked()
authorBrian Paul <brianp@vmware.com>
Wed, 14 Oct 2015 15:10:19 +0000 (09:10 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 15 Oct 2015 13:21:07 +0000 (07:21 -0600)
commit083b3f5cb4c5bd701d6a371282d7dc8c4f5fcaa8
treecd0f1d4b1c522fbd3aba99c349a4703542ed52c6
parent0de5e0f3fb0f3671a3ecec6ab4473f9131ecd0ae
mesa: short-cut new_state == _NEW_LINE in _mesa_update_state_locked()

We can skip to the end of _mesa_update_state_locked() if only the
_NEW_LINE flag is set since none of the derived state depends on it
(just like _NEW_CURRENT_ATTRIB).  Note that we still call the
ctx->Driver.UpdateState() function, of course.

v2: use bitmask-based test, per Eric.

Reviewed-by: Eric Anholt <eric@anholt.net>
src/mesa/main/state.c