From 890bde0e04d47f0ca409b1dfbcda5cc1e4716735 Mon Sep 17 00:00:00 2001 From: Bas Nieuwenhuizen Date: Sun, 21 Feb 2021 21:01:04 +0100 Subject: [PATCH] radv: Don't use dedicated memory info to indicate sharing. Can be used without sharing, so if only the dedicated memory info is set we know it isn't shareable. Use that. Fixes: a639d40f133 ("radv: add support for local bos. (v3)") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4330 Reviewed-by: Samuel Pitoiset Part-of: (cherry picked from commit 2d520b692354ded47dbc32d19c2be253727bc935) --- .pick_status.json | 2 +- src/amd/vulkan/radv_device.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 9bbdfa1d809..c45d1c6a202 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1030,7 +1030,7 @@ "description": "radv: Don't use dedicated memory info to indicate sharing.", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "a639d40f1330351924d736ca260de764734f9ef7" }, diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index e46d6eeba22..9a82094a1ff 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -5331,7 +5331,7 @@ static VkResult radv_alloc_memory(struct radv_device *device, domain = device->physical_device->memory_domains[pAllocateInfo->memoryTypeIndex]; flags |= device->physical_device->memory_flags[pAllocateInfo->memoryTypeIndex]; - if (!dedicate_info && !import_info && (!export_info || !export_info->handleTypes)) { + if (!import_info && (!export_info || !export_info->handleTypes)) { flags |= RADEON_FLAG_NO_INTERPROCESS_SHARING; if (device->use_global_bo_list) { flags |= RADEON_FLAG_PREFER_LOCAL_BO;