From d6f472cf6c25001ee6f402891c435422050346af Mon Sep 17 00:00:00 2001 From: Kbz-8 Date: Wed, 24 Sep 2025 19:11:53 +0200 Subject: [PATCH] fixing physical device selection under swiftshaders --- runtime/Sources/Renderer/RenderCore.cpp | 2 ++ third_party/kvf.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/runtime/Sources/Renderer/RenderCore.cpp b/runtime/Sources/Renderer/RenderCore.cpp index a7dc473..1bbe5f6 100644 --- a/runtime/Sources/Renderer/RenderCore.cpp +++ b/runtime/Sources/Renderer/RenderCore.cpp @@ -120,6 +120,8 @@ namespace mlx else m_physical_device = kvfPickGoodPhysicalDevice(m_instance, VK_NULL_HANDLE, nullptr, 0); + Verify(m_physical_device != VK_NULL_HANDLE, "Could not find a suitable physical device"); + // just for style VkPhysicalDeviceProperties props; vkGetPhysicalDeviceProperties(m_physical_device, &props); diff --git a/third_party/kvf.h b/third_party/kvf.h index eadc889..bd972e2 100755 --- a/third_party/kvf.h +++ b/third_party/kvf.h @@ -1474,9 +1474,6 @@ int32_t __kvfScorePhysicalDevice(VkPhysicalDevice device, VkSurfaceKHR surface, if(device_props.deviceType == VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU) score += 1000; - if(!device_features.geometryShader) - return -1; - score += device_props.limits.maxImageDimension2D; score += device_props.limits.maxBoundDescriptorSets;