Skip to content

Commit 7980623

Browse files
committed
add markdown and put back Pipeline::Release()
as asked by rpavlik
1 parent 95d56e9 commit 7980623

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
> hello_xr: Fix Vulkan resource destruction bugs of ShaderProgram and Pipeline.

src/tests/hello_xr/graphicsplugin_vulkan.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ struct Pipeline {
871871
CHECK_VKCMD(vkCreateGraphicsPipelines(m_vkDevice, VK_NULL_HANDLE, 1, &pipeInfo, nullptr, &pipe));
872872
}
873873

874-
~Pipeline() {
874+
void Release() {
875875
if (m_vkDevice != nullptr) {
876876
if (pipe != VK_NULL_HANDLE) {
877877
vkDestroyPipeline(m_vkDevice, pipe, nullptr);
@@ -881,6 +881,8 @@ struct Pipeline {
881881
m_vkDevice = nullptr;
882882
}
883883

884+
~Pipeline() { Release(); }
885+
884886
private:
885887
VkDevice m_vkDevice{VK_NULL_HANDLE};
886888
};

0 commit comments

Comments
 (0)