Module: Mesa Branch: staging/22.0 Commit: 9c68072f722a809b683d46e4f360e1fcdcad5438 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=9c68072f722a809b683d46e4f360e1fcdcad5438
Author: Georg Lehmann <[email protected]> Date: Thu Mar 31 21:32:41 2022 +0200 radv: Enable global bo list if 1.2 features are used. These features require the global bo list and the existing code only checked if the extensions which were promoted to 1.2 are enabled. Found by inspection. Cc: mesa-stable Signed-off-by: Georg Lehmann <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15701> (cherry picked from commit 80a7ed273a32c35fe3bdd9a8aec881a554b8bbfe) --- .pick_status.json | 2 +- src/amd/vulkan/radv_device.c | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index da2af833681..2f0d1031c35 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -1164,7 +1164,7 @@ "description": "radv: Enable global bo list if 1.2 features are used.", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "because_sha": null }, { diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index b078ac6217d..c655f315843 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -2945,6 +2945,7 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr bool attachment_vrs_enabled = false; bool image_float32_atomics = false; bool vs_prologs = false; + bool global_bo_list = false; /* Check enabled features */ if (pCreateInfo->pEnabledFeatures) { @@ -3005,6 +3006,12 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr vs_prologs = true; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VULKAN_1_2_FEATURES: { + const VkPhysicalDeviceVulkan12Features *features = (const void *)ext; + if (features->bufferDeviceAddress || features->descriptorIndexing) + global_bo_list = true; + break; + } default: break; } @@ -3052,7 +3059,8 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr /* With update after bind we can't attach bo's to the command buffer * from the descriptor set anymore, so we have to use a global BO list. */ - device->use_global_bo_list = (device->instance->perftest_flags & RADV_PERFTEST_BO_LIST) || + device->use_global_bo_list = global_bo_list || + (device->instance->perftest_flags & RADV_PERFTEST_BO_LIST) || device->vk.enabled_extensions.EXT_descriptor_indexing || device->vk.enabled_extensions.EXT_buffer_device_address || device->vk.enabled_extensions.KHR_buffer_device_address ||
