video_core: renderer_vulkan: support for passes w\o a fs

This commit is contained in:
psucien 2024-05-30 09:42:28 +02:00
parent 674bd4a2ed
commit d05cbd88bb
1 changed files with 9 additions and 6 deletions

View File

@ -144,18 +144,21 @@ GraphicsPipeline::GraphicsPipeline(const Instance& instance_, Scheduler& schedul
},
};
u32 shader_count = 2;
u32 shader_count = 1;
std::array<vk::PipelineShaderStageCreateInfo, MaxShaderStages> shader_stages;
shader_stages[0] = vk::PipelineShaderStageCreateInfo{
.stage = vk::ShaderStageFlagBits::eVertex,
.module = modules[0],
.pName = "main",
};
if (modules[4]) {
shader_stages[1] = vk::PipelineShaderStageCreateInfo{
.stage = vk::ShaderStageFlagBits::eFragment,
.module = modules[4],
.pName = "main",
};
++shader_count;
}
const auto it = std::ranges::find(key.color_formats, vk::Format::eUndefined);
const u32 num_color_formats = std::distance(key.color_formats.begin(), it);