From 8d4128cbc5646ec99007e9f523c4904a8d91923a Mon Sep 17 00:00:00 2001 From: Jayden Grubb Date: Wed, 30 Apr 2025 17:35:47 +1000 Subject: [PATCH] Add temporary color blend attachment to any pipelines Temorarily added a color blend attachment to all pipelines created. This is because, for now atleast, all pipelines are created using the swapchain render pass, meaning they need atleast one color blend attachment. --- engine/src/drivers/vulkan/render_driver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/engine/src/drivers/vulkan/render_driver.cpp b/engine/src/drivers/vulkan/render_driver.cpp index 2618b91..0d7113c 100644 --- a/engine/src/drivers/vulkan/render_driver.cpp +++ b/engine/src/drivers/vulkan/render_driver.cpp @@ -714,6 +714,10 @@ PipelineID VulkanRenderDriver::create_pipeline(GraphicsPipelineParams& p_params) // TODO: Properly set up color blend state std::vector attachments; + attachments.emplace_back(); + attachments.back().colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT + | VK_COLOR_COMPONENT_A_BIT; + attachments.back().blendEnable = VK_FALSE; VkPipelineColorBlendStateCreateInfo color_blend {}; color_blend.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO; color_blend.logicOpEnable = VK_FALSE; @@ -774,6 +778,8 @@ PipelineID VulkanRenderDriver::create_pipeline(GraphicsPipelineParams& p_params) != VK_SUCCESS) { throw std::runtime_error("Failed to create graphics pipeline"); } + + NOVA_LOG("VkPipeline created"); return pipeline; }