mesa: check for no matrix change in _mesa_LoadMatrixf()
authorBrian Paul <brianp@vmware.com>
Wed, 14 Sep 2016 18:16:18 +0000 (12:16 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 15 Sep 2016 18:00:12 +0000 (12:00 -0600)
commit0d2eb8c14d8c791603cb60cb56ed468ee49543ad
treeb8c63b96bba7e7d8e048bdd1f35c5f523735802c
parent533b3530c1292a39ea12437d1376c77bc7e584b9
mesa: check for no matrix change in _mesa_LoadMatrixf()

Some apps issue redundant glLoadMatrixf() calls with the same matrix.
Try to avoid setting dirty state in that situation.

This reduces the number of constant buffer updates by about half in
ET Quake Wars.

Tested with Piglit, ETQW, Sauerbraten, Google Earth, etc.

Reviewed-by: Charmaine Lee <charmainel@vmware.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/main/matrix.c