From 32fd70c3636dc295270dee836d3dede2ad86f98a Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Wed, 28 Jan 2026 18:21:02 +0100 Subject: [PATCH] [vk] Added graphics pipeline library --- src/video_core/vulkan_common/vulkan_device.cpp | 9 +++++++++ src/video_core/vulkan_common/vulkan_device.h | 8 +++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 0b3aea6d2e..c443065bef 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp @@ -1493,6 +1493,15 @@ void Device::RemoveUnsuitableExtensions() { // VK_KHR_maintenance9 (proposed for Vulkan 1.4, no features) extensions.maintenance9 = loaded_extensions.contains(VK_KHR_MAINTENANCE_9_EXTENSION_NAME); RemoveExtensionIfUnsuitable(extensions.maintenance9, VK_KHR_MAINTENANCE_9_EXTENSION_NAME); + + // VK_EXT_graphics_pipeline_library + extensions.graphics_pipeline_library = loaded_extensions.contains(VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME); + RemoveExtensionIfUnsuitable(extensions.graphics_pipeline_library, VK_EXT_GRAPHICS_PIPELINE_LIBRARY_EXTENSION_NAME); + if (extensions.graphics_pipeline_library) { + LOG_INFO(Render_Vulkan, "Driver supports VK_EXT_graphics_pipeline_library; enabling use"); + } else { + LOG_INFO(Render_Vulkan, "VK_EXT_graphics_pipeline_library not available"); + } } void Device::SetupFamilies(VkSurfaceKHR surface) { diff --git a/src/video_core/vulkan_common/vulkan_device.h b/src/video_core/vulkan_common/vulkan_device.h index 744b5f827e..129b9ed61e 100644 --- a/src/video_core/vulkan_common/vulkan_device.h +++ b/src/video_core/vulkan_common/vulkan_device.h @@ -106,7 +106,8 @@ VK_DEFINE_HANDLE(VmaAllocator) EXTENSION(EXT, DESCRIPTOR_INDEXING, descriptor_indexing) \ EXTENSION(EXT, FILTER_CUBIC, filter_cubic) \ EXTENSION(QCOM, FILTER_CUBIC_WEIGHTS, filter_cubic_weights) - + EXTENSION(EXT, GRAPHICS_PIPELINE_LIBRARY, graphics_pipeline_library) + // Define extensions which must be supported. #define FOR_EACH_VK_MANDATORY_EXTENSION(EXTENSION_NAME) \ EXTENSION_NAME(VK_EXT_VERTEX_ATTRIBUTE_DIVISOR_EXTENSION_NAME) \ @@ -293,6 +294,11 @@ public: return properties.properties.driverVersion; } + /// Returns true if the device and driver have VK_EXT_graphics_pipeline_library enabled. + bool HasGraphicsPipelineLibrary() const { + return extensions.graphics_pipeline_library; + } + /// Returns the device name. std::string_view GetModelName() const { return properties.properties.deviceName;