ac/surface: don't set is_displayable if displayable DCC is missing
[mesa.git] / src / amd / common / ac_surface.c
index 0e9604affef5d8693de21ff6f21ea1fb26072371..4ef72b1b3232799ef4ab6f282ecd798f408f869c 100644 (file)
@@ -1932,9 +1932,12 @@ static int gfx9_compute_surface(struct ac_addrlib *addrlib,
 
                /* Display needs unaligned DCC. */
                if (surf->num_dcc_levels &&
-                   !is_dcc_supported_by_DCN(info, config, surf,
-                                            surf->u.gfx9.dcc.rb_aligned,
-                                            surf->u.gfx9.dcc.pipe_aligned))
+                   (!is_dcc_supported_by_DCN(info, config, surf,
+                                             surf->u.gfx9.dcc.rb_aligned,
+                                             surf->u.gfx9.dcc.pipe_aligned) ||
+                    /* Don't set is_displayable if displayable DCC is missing. */
+                    (info->use_display_dcc_with_retile_blit &&
+                     !surf->u.gfx9.dcc_retile_num_elements)))
                        displayable = false;
        }
        surf->is_displayable = displayable;