Backends: Vulkan: Add override for the subpass to reference during VkPipeline creation. (#3579)

This allows for binding the pipeline/sending draw commands
(via `ImGui_ImplVulkan_RenderDrawData`) against any subpass, rather than
being restricted to only the first subpass.

Without this, attempting to bind the pipeline against a subpass other than
the first one results in validation layer errors and, at worst, some drivers
failing if the subpass attachments differ.
This commit is contained in:
Brandon DeRosier
2020-11-07 07:32:48 -08:00
committed by ocornut
parent 61825c7735
commit 6a0e85c561
3 changed files with 10 additions and 3 deletions

View File

@ -35,6 +35,7 @@ struct ImGui_ImplVulkan_InitInfo
VkQueue Queue;
VkPipelineCache PipelineCache;
VkDescriptorPool DescriptorPool;
uint32_t Subpass;
uint32_t MinImageCount; // >= 2
uint32_t ImageCount; // >= MinImageCount
VkSampleCountFlagBits MSAASamples; // >= VK_SAMPLE_COUNT_1_BIT