remove clear color from renderpass, add depth clear

This commit is contained in:
Matthew 2025-08-25 05:19:20 +10:00
parent 64ccf707e3
commit f1607043e5

View File

@ -806,8 +806,8 @@ BeginRendering(Vulkan* vk)
height: vk.swapchain_extent.height,
},
},
clearValueCount: cast(u32)clear_color.length,
pClearValues: clear_color.ptr,
//clearValueCount: cast(u32)clear_color.length,
//pClearValues: clear_color.ptr,
};
vkCmdBeginRenderPass(vk.cmds[vk.frame_index], &pass_info, VK_SUBPASS_CONTENTS_INLINE);
@ -1968,6 +1968,13 @@ CreateComputePipeline(Vulkan* vk, CompPipelineInfo* comp_info)
return pipeline_handle;
}
void
ClearDepth(Vulkan* vk, f32[4] color = [0.0, 0.0, 0.0, 0.0])
{
Transition(vk.cmds[vk.frame_index], &vk.depth_image, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL);
ClearColor(vk, &vk.depth_image, color);
}
void
ClearColor(Vulkan* vk, f32[4] color)
{