Skip to content

Pipeline Libraries #853

Open
Open
@devshgraphicsprogramming

Description

Description

A pipeline library is a special pipeline that was created using the VK_PIPELINE_CREATE_LIBRARY_BIT_KHR and cannot be bound, instead it defines a set of pipeline state which can be linked into other pipelines.
https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#pipelines-library

Description of the related problem

Bits of pipelines are reusable but right now pipelines are not granular enough.

Solution proposal

The spec is a mess, it needs to be a separate object, almost a new asset class like something inbetween an IShader (to come in #839 ) and the ITypePipeline, basically ITypePipelineLibrary.

We don't need the pipeline creation bits of VK_PIPELINE_CREATE_LIBRARY_BIT_KHR

The application must maintain the lifetime of a pipeline library based on the pipelines that link with it.

Its almost like our old Specialized Shader.

We probably don't need VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT exposed as well, cause thats just a flag one passes whenever one creates a pipeline from libraries and those libraries were made with shader stage identifiers instead of spir-v. https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VUID-VkPipelineLibraryCreateInfoKHR-pLibraries-06855

Additional context

Annoying thing, certain flags are common to Pipelines and Libraries, and have to match 🤦
https://registry.khronos.org/vulkan/specs/latest/html/vkspec.html#VUID-VkRayTracingPipelineCreateInfoKHR-flags-04720

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions