radv: Don't relayout images with modifiers.

The modifier should have been the exact layout of the image. Hence
we should not relayout the image according to the implicit modifier
on memory import (i.e. VkMemory allocation).

Reviewed-By: Chad Versace <chad@kiwitree.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7667>
This commit is contained in:
Bas Nieuwenhuizen 2020-11-16 12:01:54 +01:00 committed by Marge Bot
parent f543f09e2a
commit 4dbbd59a01
1 changed files with 2 additions and 1 deletions

View File

@ -5310,7 +5310,8 @@ static VkResult radv_alloc_memory(struct radv_device *device,
if (mem->image && mem->image->plane_count == 1 &&
!vk_format_is_depth_or_stencil(mem->image->vk_format) &&
mem->image->info.samples == 1) {
mem->image->info.samples == 1 &&
mem->image->tiling != VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT) {
struct radeon_bo_metadata metadata;
device->ws->buffer_get_metadata(mem->bo, &metadata);