radv: use radv_dcc_enabled() for the FB mip flush workaround

This has no effects because radv_image_has_CB_metadata() still
accounts for DCC which is incorrect. This should be changed.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10667>
This commit is contained in:
Samuel Pitoiset 2021-05-06 14:51:04 +02:00 committed by Marge Bot
parent 4631a52f8d
commit 9984ebf173

View file

@ -2311,7 +2311,9 @@ radv_emit_fb_mip_change_flush(struct radv_cmd_buffer *cmd_buffer)
struct radv_image_view *iview = cmd_buffer->state.attachments[idx].iview;
if ((radv_image_has_CB_metadata(iview->image) || radv_image_has_dcc(iview->image)) &&
if ((radv_image_has_CB_metadata(iview->image) ||
radv_dcc_enabled(iview->image, iview->base_mip) ||
radv_dcc_enabled(iview->image, cmd_buffer->state.cb_mip[i])) &&
cmd_buffer->state.cb_mip[i] != iview->base_mip)
color_mip_changed = true;