[Mesa-dev] [PATCH 4/5] radv/gfx9: handle GFX9 opaque metadata
Dave Airlie
airlied at gmail.com
Tue Aug 15 05:26:02 UTC 2017
From: David Airlie <airlied at dhcp-40-204.bne.redhat.com>
port the opaque metadata changes from radeonsi for gfx9.
Signed-off-by: Dave Airlie <airlied at redhat.com>
---
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 8d3ff1a515..7a4b2d57a5 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.13.5
More information about the mesa-dev
mailing list