VkGraphicsPipelineCreateInfo
has integer member subpass
.
My use case is creating a single pipeline object and use it with multiple subpasses. Each subpass has different color attachment.
VkGraphicsPipelineCreateInfo
has integer member subpass
.
My use case is creating a single pipeline object and use it with multiple subpasses. Each subpass has different color attachment.
No. A pipeline is always built relative to a specific subpass of a specific render pass. It cannot be used in any other subpass:
The subpass index of the current render pass must be equal to the
subpass
member of theVkGraphicsPipelineCreateInfo
structure specified when creating theVkPipeline
currently bound toVK_PIPELINE_BIND_POINT_GRAPHICS
.
You will need to create multiple pipelines, one for each subpass you intend to use it with. The pipeline cache should make this efficient for implementations that don't really care much about this.