From e43cc3e3afc98783310f81f8c0151a8314044739 Mon Sep 17 00:00:00 2001 From: David Airlie Date: Tue, 15 Aug 2017 14:02:54 +1000 Subject: [PATCH] radv/gfx9: handle GFX9 opaque metadata port the opaque metadata changes from radeonsi for gfx9. Reviewed-by: Bas Nieuwenhuizen Cc: "17.2" Signed-off-by: Dave Airlie --- src/amd/vulkan/radv_image.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/amd/vulkan/radv_image.c b/src/amd/vulkan/radv_image.c index 8d3ff1a515e..7a4b2d57a51 100644 --- a/src/amd/vulkan/radv_image.c +++ b/src/amd/vulkan/radv_image.c @@ -555,10 +555,11 @@ radv_query_opaque_metadata(struct radv_device *device, memcpy(&md->metadata[2], desc, sizeof(desc)); /* Dwords [10:..] contain the mipmap level offsets. */ - for (i = 0; i <= image->info.levels - 1; i++) - md->metadata[10+i] = image->surface.u.legacy.level[i].offset >> 8; - - md->size_metadata = (11 + image->info.levels - 1) * 4; + if (device->physical_device->rad_info.chip_class <= VI) { + for (i = 0; i <= image->info.levels - 1; i++) + md->metadata[10+i] = image->surface.u.legacy.level[i].offset >> 8; + md->size_metadata = (11 + image->info.levels - 1) * 4; + } } void -- 2.30.2