st/mesa: Only enable depth writes if the function isn't EQUAL.
authorKenneth Graunke <kenneth@whitecape.org>
Thu, 5 Jul 2018 09:55:57 +0000 (02:55 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 11 Jul 2018 18:23:20 +0000 (11:23 -0700)
commitc0874947f17b22af49e77f2fb15491c98e8cfd56
tree3e86ab3212fa64702d13023e3ac013e2507542b9
parentbe5fc0d7f114250d37597b38ef53711f2f66bc4f
st/mesa: Only enable depth writes if the function isn't EQUAL.

If the depth function is EQUAL, then we'll only write the depth value
when it already matches what's in the buffer, which is pointless.
Skipping these writes can save bandwidth.

The state tracker can easily take care of this, so all drivers benefit.

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_atom_depth.c