Adding interface for renderpass layout transitions

This commit is contained in:
Dynamitos
2024-01-31 09:49:53 +01:00
parent 1bf08f696b
commit 5678021c9e
34 changed files with 616 additions and 184 deletions
+6 -8
View File
@@ -171,12 +171,11 @@ PGraphicsPipeline PipelineCache::createPipeline(Gfx::LegacyPipelineCreateInfo gf
};
hash = CRC::Calculate(&depthStencilState, sizeof(depthStencilState), CRC::CRC_32(), hash);
const auto& colorAttachments = gfxInfo.renderPass->getLayout()->colorAttachments;
Array<VkPipelineColorBlendAttachmentState> blendAttachments(colorAttachments.size());
for(uint32 i = 0; i < colorAttachments.size(); ++i)
Array<VkPipelineColorBlendAttachmentState> blendAttachments;
for(uint32 i = 0; i < gfxInfo.colorBlend.attachmentCount; ++i)
{
const Gfx::ColorBlendState::BlendAttachment& attachment = gfxInfo.colorBlend.blendAttachments[i];
blendAttachments[i] = {
blendAttachments.add() = {
.blendEnable = attachment.blendEnable,
.srcColorBlendFactor = (VkBlendFactor)attachment.srcColorBlendFactor,
.dstColorBlendFactor = (VkBlendFactor)attachment.dstColorBlendFactor,
@@ -343,12 +342,11 @@ PGraphicsPipeline PipelineCache::createPipeline(Gfx::MeshPipelineCreateInfo gfxI
};
hash = CRC::Calculate(&depthStencilState, sizeof(depthStencilState), CRC::CRC_32(), hash);
const auto& colorAttachments = gfxInfo.renderPass->getLayout()->colorAttachments;
Array<VkPipelineColorBlendAttachmentState> blendAttachments(colorAttachments.size());
for (uint32 i = 0; i < colorAttachments.size(); ++i)
Array<VkPipelineColorBlendAttachmentState> blendAttachments;
for (uint32 i = 0; i < gfxInfo.colorBlend.attachmentCount; ++i)
{
const Gfx::ColorBlendState::BlendAttachment& attachment = gfxInfo.colorBlend.blendAttachments[i];
blendAttachments[i] = {
blendAttachments.add() = {
.blendEnable = attachment.blendEnable,
.srcColorBlendFactor = (VkBlendFactor)attachment.srcColorBlendFactor,
.dstColorBlendFactor = (VkBlendFactor)attachment.dstColorBlendFactor,