tu: 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. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6876 Cc: mesa-stable Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18083>
This commit is contained in:

committed by
Marge Bot

parent
59dca6f6e1
commit
c45fded26b
@@ -3625,7 +3625,7 @@ tu_pipeline_builder_parse_depth_stencil(struct tu_pipeline_builder *builder,
|
||||
|
||||
if (builder->shaders->variants[MESA_SHADER_FRAGMENT]) {
|
||||
const struct ir3_shader_variant *fs = builder->shaders->variants[MESA_SHADER_FRAGMENT];
|
||||
if (fs->has_kill || fs->no_earlyz || fs->writes_pos) {
|
||||
if (fs->has_kill || builder->alpha_to_coverage) {
|
||||
pipeline->lrz.force_disable_mask |= TU_LRZ_FORCE_DISABLE_WRITE;
|
||||
}
|
||||
if (fs->no_earlyz || fs->writes_pos) {
|
||||
|
Reference in New Issue
Block a user