Skip to content

freedreno/a6xx: LRZ rework and early-lrz-late-z mode

Rob Clark requested to merge robclark/mesa:wip/lrz-flags into master

Updates the *_DEPTH_PLANE_CNTL regs with a new depth-test mode I discovered, and enables it by:

  1. rework LRZ to track direction once we start doing LRZ writes, and invalidate one direction switch
  2. don't invalidate lrz simply due to blend/alpha-test/stencil-test, we only need to disable writes. Invalidating in these cases was just papering over bugs due to not invalidating on direction switch
  3. use new DEPTH_PLANE_CNTL mode to preserve early-lrz test when FS has kill. This is the part that is worth most of the perf win in gfxbench, and matches what blob does. But setting this mode when we don't have lrz causes GPU hangs, so these two registers move into the lrz stategroup.

Overall seem to be worth more than +10% for mh/trex and +40% for mh31.

Edited by Rob Clark

Merge request reports

Loading