freedreno: Disable LRZ write when alpha-to-coverage is enabled

Alpha-to-coverage acts like discard and happens after FS ends,
so like with discard LRZ write should be disabled.
With discard we don't know at the moment of binning whether
fragment would be not discarded, so we cannot write its depth to LRZ.

Cc: mesa-stable

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18102>
This commit is contained in:
Danylo Piliaiev 2022-08-17 11:06:55 +03:00 committed by Marge Bot
parent dca04b04f7
commit 09676b5817

View file

@ -646,7 +646,8 @@ compute_lrz_state(struct fd6_emit *emit, bool binning_pass) assert_dt
lrz = zsa->lrz;
/* normalize lrz state: */
if (blend->reads_dest || fs->writes_pos || fs->no_earlyz || fs->has_kill) {
if (blend->reads_dest || fs->writes_pos || fs->no_earlyz || fs->has_kill ||
blend->base.alpha_to_coverage) {
lrz.write = false;
if (binning_pass)
lrz.enable = false;