diff options
author | David Airlie <[email protected]> | 2017-08-15 14:02:54 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2017-08-16 05:54:15 +1000 |
commit | e43cc3e3afc98783310f81f8c0151a8314044739 (patch) | |
tree | 6e12951adecdabfe4e015a80bf2acb68ac74f804 | |
parent | 674ecbfef2acb17be363867425a013ca151e16b2 (diff) |
radv/gfx9: handle GFX9 opaque metadata
port the opaque metadata changes from radeonsi for gfx9.
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Cc: "17.2" <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r-- | src/amd/vulkan/radv_image.c | 9 |
1 files 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 |