summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_device.c
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2019-06-18 11:51:31 +0200
committerSamuel Pitoiset <[email protected]>2019-06-18 12:24:26 +0200
commitc16bf48bfc571a196c3a652e734a4cc472c2d6c4 (patch)
tree99c66f46101605f0f31c44093891fdef234047e3 /src/amd/vulkan/radv_device.c
parent6ee40efd020e75fcd414b3e5d0a76d1d2d422ded (diff)
radv: adjust the DCC base VA for mipmapped color attachments
Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_device.c')
-rw-r--r--src/amd/vulkan/radv_device.c5
1 files changed, 5 insertions, 0 deletions
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;