turnip: Use the simplified stencil write flags for the LRZ-allowed check.
authorEmma Anholt <emma@anholt.net>
Mon, 19 Sep 2022 21:58:36 +0000 (14:58 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 21 Sep 2022 17:18:07 +0000 (17:18 +0000)
commit64d0e94d2c6fc3e5b12283a212e5752e698ebfe0
treee0025d0065b35f69a101002974eb7faa6da4e502
parentb9f9bfa5560a0d5e8a8bf71a146ffd11f1196173
turnip: Use the simplified stencil write flags for the LRZ-allowed check.

Traces of GLES games that ANGLE has taken frequently have no-op stencil
writes, which ANGLE and Zink both pass straight through.  Given that we
support dynamic stencil state updates via tu_CmdSetStencil*(), draw time
really is the time for deciding this state unfortunately.

Reuse the fancier stencil write enables check from "can we do early z?" in
"can we do LRZ?".  This gets one set of draws in among_us to have LRZ, but
I don't see a detectable performance difference.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18691>
src/freedreno/vulkan/tu_cmd_buffer.c
src/freedreno/vulkan/tu_cmd_buffer.h
src/freedreno/vulkan/tu_lrz.c