[vk] Added graphics pipeline library

This commit is contained in:
CamilleLaVey
2026-01-28 18:21:02 +01:00
committed by Caio Oliveira
parent 6637810fe6
commit 32fd70c363
2 changed files with 16 additions and 1 deletions

View File

@@ -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) {

View File

@@ -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;