tu/shader: Allow LRZ when write pos with explicit early frag test
This is an exceptional case where any writes to gl_Depth should be ignored, it means we can use LRZ in this case and don't need to disable it. Signed-off-by: Mark Collins <mark@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29453>
This commit is contained in:
@@ -2539,7 +2539,7 @@ tu_shader_create(struct tu_device *dev,
|
||||
shader->fs.has_fdm = key->fragment_density_map;
|
||||
if (fs->has_kill)
|
||||
shader->fs.lrz.status |= TU_LRZ_FORCE_DISABLE_WRITE;
|
||||
if (fs->no_earlyz || fs->writes_pos)
|
||||
if (fs->no_earlyz || (fs->writes_pos && !fs->fs.early_fragment_tests))
|
||||
shader->fs.lrz.status = TU_LRZ_FORCE_DISABLE_LRZ;
|
||||
/* FDM isn't compatible with LRZ, because the LRZ image uses the original
|
||||
* resolution and we would need to use the low resolution.
|
||||
|
||||
Reference in New Issue
Block a user