remove clear color from renderpass, add depth clear
This commit is contained in:
parent
64ccf707e3
commit
f1607043e5
11
vulkan.d
11
vulkan.d
@ -806,8 +806,8 @@ BeginRendering(Vulkan* vk)
|
|||||||
height: vk.swapchain_extent.height,
|
height: vk.swapchain_extent.height,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
clearValueCount: cast(u32)clear_color.length,
|
//clearValueCount: cast(u32)clear_color.length,
|
||||||
pClearValues: clear_color.ptr,
|
//pClearValues: clear_color.ptr,
|
||||||
};
|
};
|
||||||
|
|
||||||
vkCmdBeginRenderPass(vk.cmds[vk.frame_index], &pass_info, VK_SUBPASS_CONTENTS_INLINE);
|
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;
|
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
|
void
|
||||||
ClearColor(Vulkan* vk, f32[4] color)
|
ClearColor(Vulkan* vk, f32[4] color)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user