From: David Airlie Date: Tue, 15 Aug 2017 04:02:54 +0000 (+1000) Subject: radv/gfx9: handle GFX9 opaque metadata X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e43cc3e3afc98783310f81f8c0151a8314044739;p=mesa.git 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 --- 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