From: Samuel Pitoiset Date: Tue, 18 Jun 2019 09:51:31 +0000 (+0200) Subject: radv: adjust the DCC base VA for mipmapped color attachments X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c16bf48bfc571a196c3a652e734a4cc472c2d6c4;p=mesa.git radv: adjust the DCC base VA for mipmapped color attachments Signed-off-by: Samuel Pitoiset Reviewed-by: Bas Nieuwenhuizen --- diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 1424eaef21d..1d59aaa0b03 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -4322,6 +4322,11 @@ radv_initialise_color_surface(struct radv_device *device, va = radv_buffer_get_va(iview->bo) + iview->image->offset; va += iview->image->dcc_offset; + + if (radv_dcc_enabled(iview->image, iview->base_mip) && + device->physical_device->rad_info.chip_class <= GFX8) + va += plane->surface.u.legacy.level[iview->base_mip].dcc_offset; + cb->cb_dcc_base = va >> 8; cb->cb_dcc_base |= surf->tile_swizzle;