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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19286>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user