From 1ac42912cc68fbb05a2687efe2048bae07a570c5 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Mon, 24 Oct 2022 17:05:03 -0700 Subject: [PATCH] turnip: Enable LRZ testing (not writing) in the presence of discards. We can LRZ test to not rasterize maybe-discarded pixels, as long as we don't LRZ write a Z that may be discarded. We can drop this check, because LRZ writes are already disabled by TU_LRZ_FORCE_DISABLE_WRITE, and tu_6_build_depth_plane_z_mode() uses has_kill to choose EARLY_LRZ_LATE_Z (or just LATE_Z if LRZ isn't enabled). gfxbench aztec ruins: +7.93104% +/- 0.117845% (n=4) ANGLE trex_200: +11.7208% +/- 0.476166% (n=3) ANGLE aztec_ruins_high: +11.9138% +/- 0.147586% (n=3) Fixes: #6327 (now vk-5-normal is +0.712724% +/- 0.0655751% to gl-5-normal) Part-of: --- src/freedreno/vulkan/tu_pipeline.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c index bc5d61ee95d..a2a44246e2d 100644 --- a/src/freedreno/vulkan/tu_pipeline.c +++ b/src/freedreno/vulkan/tu_pipeline.c @@ -1680,7 +1680,7 @@ tu6_emit_fs_outputs(struct tu_cs *cs, pipeline->lrz.fs.early_fragment_tests = fs->fs.early_fragment_tests; if (!fs->fs.early_fragment_tests && - (fs->no_earlyz || fs->has_kill || fs->writes_pos || fs->writes_stencilref || fs->writes_smask)) { + (fs->no_earlyz || fs->writes_pos || fs->writes_stencilref || fs->writes_smask)) { pipeline->lrz.force_late_z = true; }