Skip to content

Commit 3d861ae

Browse files
remmelrpavlik
authored andcommitted
Destroy Pipeline and all ShaderModule
add markdown and put back Pipeline::Release() as asked by rpavlik
1 parent 29364f8 commit 3d861ae

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed
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
@@ -352,7 +352,7 @@ struct ShaderProgram {
352352
if (m_vkDevice != nullptr) {
353353
for (auto& si : shaderInfo) {
354354
if (si.module != VK_NULL_HANDLE) {
355-
vkDestroyShaderModule(m_vkDevice, shaderInfo[0].module, nullptr);
355+
vkDestroyShaderModule(m_vkDevice, si.module, nullptr);
356356
}
357357
si.module = VK_NULL_HANDLE;
358358
}
@@ -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)