radv: only mark DCC as compressed when drawing if layout allows it

Just having DCC enabled on the base level doesn't mean we are
using compressed rendering.

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:18:40 +02:00 committed by Marge Bot
parent 75d7c752af
commit ff38e3aadd

View file

@ -1739,7 +1739,7 @@ radv_emit_fb_color_state(struct radv_cmd_buffer *cmd_buffer, int index,
}
}
if (radv_dcc_enabled(image, iview->base_mip)) {
if (G_028C70_DCC_ENABLE(cb_color_info)) {
/* Drawing with DCC enabled also compresses colorbuffers. */
VkImageSubresourceRange range = {
.aspectMask = iview->aspect_mask,