From 8b7b509077c52093a9fa936c0462248a24646c90 Mon Sep 17 00:00:00 2001 From: Frederico Linhares Date: Sat, 30 Sep 2023 14:34:22 -0300 Subject: refa Remove redundant render pass * src/vk/render_pass.hpp: Both 2D pipelines used identical render passes. I merged both in a single render pass. * src/vk/renderer.cpp (Renderer::draw): Use only one render pass for both 2D graphics pipelines. --- src/vk/graphics_pipeline_3d.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/vk/graphics_pipeline_3d.cpp') diff --git a/src/vk/graphics_pipeline_3d.cpp b/src/vk/graphics_pipeline_3d.cpp index 3d4b7cd..a1a1785 100644 --- a/src/vk/graphics_pipeline_3d.cpp +++ b/src/vk/graphics_pipeline_3d.cpp @@ -270,8 +270,7 @@ load_framebuffer(void *obj) VkFramebufferCreateInfo framebuffer_info{}; framebuffer_info.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO; - framebuffer_info.renderPass = - cg_core.vk_graphics_pipeline_3d_layout->render_pass; + framebuffer_info.renderPass = cg_core.vk_render_pass->pipeline_3d; framebuffer_info.attachmentCount = attachments.size(); framebuffer_info.pAttachments = attachments.data(); framebuffer_info.width = cg_core.display_width; @@ -483,8 +482,7 @@ load_pipeline(void *obj) pipeline_info.pColorBlendState = &color_blending; pipeline_info.pDynamicState = &dynamic_state_info; pipeline_info.layout = cg_core.vk_graphics_pipeline_3d_layout->pipeline; - pipeline_info.renderPass = - cg_core.vk_graphics_pipeline_3d_layout->render_pass; + pipeline_info.renderPass = cg_core.vk_render_pass->pipeline_3d; pipeline_info.subpass = 0; pipeline_info.basePipelineHandle = VK_NULL_HANDLE; pipeline_info.basePipelineIndex = -1; -- cgit v1.2.3