Skip to content

Commit 95d56e9

Browse files
committed
Destroy Pipeline and all ShaderModule
1 parent 3a59f10 commit 95d56e9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/tests/hello_xr/graphicsplugin_vulkan.cpp

Lines changed: 2 additions & 2 deletions
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
}
@@ -871,7 +871,7 @@ struct Pipeline {
871871
CHECK_VKCMD(vkCreateGraphicsPipelines(m_vkDevice, VK_NULL_HANDLE, 1, &pipeInfo, nullptr, &pipe));
872872
}
873873

874-
void Release() {
874+
~Pipeline() {
875875
if (m_vkDevice != nullptr) {
876876
if (pipe != VK_NULL_HANDLE) {
877877
vkDestroyPipeline(m_vkDevice, pipe, nullptr);

0 commit comments

Comments
 (0)