From cdac2d65b33621f5ae53fe47152e633ee37722a2 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Tue, 2 Jun 2026 15:31:30 +0200 Subject: [PATCH] radv: return VK_ERROR_INITIALIZATION_FAILED if VM_ALWAYS_VALID isn't supported Better than asserting. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_device.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_device.c b/src/amd/vulkan/radv_device.c index 90799f2bc69..2e7f81d6dc5 100644 --- a/src/amd/vulkan/radv_device.c +++ b/src/amd/vulkan/radv_device.c @@ -1405,7 +1405,10 @@ radv_CreateDevice(VkPhysicalDevice physicalDevice, const VkDeviceCreateInfo *pCr : device->ws->copy_sync_payloads; /* VM_ALWAYS_VALID must be supported. */ - assert(pdev->info.has_vm_always_valid); + if (!pdev->info.has_vm_always_valid) { + result = VK_ERROR_INITIALIZATION_FAILED; + goto fail; + } device->overallocation_disallowed = overallocation_disallowed; mtx_init(&device->overallocation_mutex, mtx_plain);