radv: fixup DCC after color resolves using the compute path

If the dest image has DCC it should be re-initialized to the
uncompressed state.

Note that the driver always selects the graphics path if the dest
image has DCC, so this has no effect for now.

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/8326>
This commit is contained in:
Samuel Pitoiset 2021-01-05 09:26:36 +01:00 committed by Marge Bot
parent 1f548b7670
commit 3e781056b9

View file

@ -860,6 +860,23 @@ void radv_meta_resolve_compute_image(struct radv_cmd_buffer *cmd_buffer,
}
radv_meta_restore(&saved_state, cmd_buffer);
if (radv_layout_dcc_compressed(cmd_buffer->device, dest_image,
dest_image_layout, false, queue_mask)) {
cmd_buffer->state.flush_bits |= RADV_CMD_FLAG_CS_PARTIAL_FLUSH |
RADV_CMD_FLAG_INV_VCACHE;
VkImageSubresourceRange range = {
.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT,
.baseMipLevel = region->dstSubresource.mipLevel,
.levelCount = 1,
.baseArrayLayer = dest_base_layer,
.layerCount = region->dstSubresource.layerCount,
};
radv_initialize_dcc(cmd_buffer, dest_image, &range, 0xffffffff);
}
}
/**