From fcfcdb045cb5bc8ada5c8ebf23ac28b3de5bf151 Mon Sep 17 00:00:00 2001 From: maxjivi05 Date: Tue, 17 Nov 2026 12:03:17 -0500 Subject: [PATCH] fix(venus): install SPIR-V 1.3 lowering hooks on Vulkan 1.2+ devices or emulated gaps --- tools/venus/layer/layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/venus/layer/layer.c b/tools/venus/layer/layer.c index 1f13ac3af0..a4e35e0a32 100644 --- a/tools/venus/layer/layer.c +++ b/tools/venus/layer/layer.c @@ -603,7 +603,6 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physical_dev dev->handle = *device; dev->gdpa = gdpa; dev->emulated = requested; - dev->active = inst->active; pthread_mutex_init(&dev->lock, NULL); #define LOAD(name) \ dev->name = (PFN_vk##name)gdpa(*device, "vk" #name); \ @@ -616,6 +615,7 @@ static VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice physical_dev inst->GetPhysicalDeviceMemoryProperties(physical_device, &dev->memory_properties); VkPhysicalDeviceProperties properties; inst->GetPhysicalDeviceProperties(physical_device, &properties); + dev->active = inst->active && (requested != 0 || properties.apiVersion >= VK_API_VERSION_1_2); uint32_t components = properties.limits.maxVertexOutputComponents; if (properties.limits.maxFragmentInputComponents < components) components = properties.limits.maxFragmentInputComponents;