From 1c207b7fab31871e0bfb51a986aa9536523d0d8c Mon Sep 17 00:00:00 2001 From: InkSoul Date: Mon, 24 Nov 2025 23:14:57 +0800 Subject: [PATCH] =?UTF-8?q?```=20refactor(render):=20=E7=A7=BB=E9=99=A4get?= =?UTF-8?q?ter=E6=96=B9=E6=B3=95=E7=9A=84const=E9=99=90=E5=AE=9A=E7=AC=A6?= =?UTF-8?q?=E5=B9=B6=E9=87=8D=E6=9E=84=E7=AE=A1=E7=BA=BF=E5=92=8C=E6=8F=8F?= =?UTF-8?q?=E8=BF=B0=E7=AC=A6=E9=9B=86=E8=8E=B7=E5=8F=96=E6=96=B9=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除了RenderPipelineList中所有getter方法的const限定符,并更新了render.cpp中对 管线对象和描述符集合的访问方式。通过引入新的布局与管线管理类,如 RenderDescriptorSetLayoutList、RenderPipelineList等,替换原有的直接成员变量访问, 使代码结构更清晰且便于维护。同时添加了必要的头文件包含以支持新增的类引用。 ``` --- src/render/RenderPipelineList.cpp | 14 +++--- src/render/RenderPipelineList.h | 14 +++--- src/render/render.cpp | 76 ++++++++++++++++++++----------- src/render/render.h | 68 +++++++++------------------ 4 files changed, 85 insertions(+), 87 deletions(-) diff --git a/src/render/RenderPipelineList.cpp b/src/render/RenderPipelineList.cpp index abe3201..928f9e2 100644 --- a/src/render/RenderPipelineList.cpp +++ b/src/render/RenderPipelineList.cpp @@ -9,37 +9,37 @@ RenderPipelineList::~RenderPipelineList() } // Getter method definitions -VkPipeline RenderPipelineList::getSkybox() const +VkPipeline RenderPipelineList::getSkybox() { return skybox; } -VkPipeline RenderPipelineList::getPbr() const +VkPipeline RenderPipelineList::getPbr() { return pbr; } -VkPipeline RenderPipelineList::getPbrDoubleSided() const +VkPipeline RenderPipelineList::getPbrDoubleSided() { return pbrDoubleSided; } -VkPipeline RenderPipelineList::getPbrAlphaBlend() const +VkPipeline RenderPipelineList::getPbrAlphaBlend() { return pbrAlphaBlend; } -VkPipeline RenderPipelineList::getSolid() const +VkPipeline RenderPipelineList::getSolid() { return solid; } -VkPipeline RenderPipelineList::getWireframe() const +VkPipeline RenderPipelineList::getWireframe() { return wireframe; } -VkPipeline RenderPipelineList::getToneMapping() const +VkPipeline RenderPipelineList::getToneMapping() { return toneMapping; } diff --git a/src/render/RenderPipelineList.h b/src/render/RenderPipelineList.h index baa3acc..94ebb66 100644 --- a/src/render/RenderPipelineList.h +++ b/src/render/RenderPipelineList.h @@ -7,13 +7,13 @@ public: ~RenderPipelineList(); // Getter methods - VkPipeline getSkybox() const; - VkPipeline getPbr() const; - VkPipeline getPbrDoubleSided() const; - VkPipeline getPbrAlphaBlend() const; - VkPipeline getSolid() const; - VkPipeline getWireframe() const; - VkPipeline getToneMapping() const; + VkPipeline getSkybox(); + VkPipeline getPbr(); + VkPipeline getPbrDoubleSided(); + VkPipeline getPbrAlphaBlend(); + VkPipeline getSolid(); + VkPipeline getWireframe(); + VkPipeline getToneMapping(); // Setter methods void setSkybox(VkPipeline pipeline); diff --git a/src/render/render.cpp b/src/render/render.cpp index 4dc6b68..96310c1 100644 --- a/src/render/render.cpp +++ b/src/render/render.cpp @@ -8,6 +8,7 @@ #include "glTFModel.h" #include "glm/gtc/matrix_transform.hpp" #include "renderUniformBufferSet.h" +#include "vulkan/vulkan_core.h" #include #include @@ -43,10 +44,17 @@ void PlumageRender::renderNode(glTFModel::Node *node, uint32_t cbIndex, glTFMode { case glTFModel::Material::ALPHAMODE_OPAQUE: case glTFModel::Material::ALPHAMODE_MASK: - pipeline = primitive->material.doubleSided ? pipelines.pbrDoubleSided : pipelines.pbr; + if (primitive->material.doubleSided) + { + pipeline = m_pipelineList.getPbrDoubleSided(); + } + else + { + pipeline = m_pipelineList.getPbr(); + } break; case glTFModel::Material::ALPHAMODE_BLEND: - pipeline = pipelines.pbrAlphaBlend; + pipeline = m_pipelineList.getPbrAlphaBlend(); break; } @@ -57,7 +65,7 @@ void PlumageRender::renderNode(glTFModel::Node *node, uint32_t cbIndex, glTFMode } const std::vector descriptorsets = { - descriptorSets[cbIndex].scene, + descriptorSets[cbIndex].getScene(), primitive->material.descriptorSet, node->mesh->uniformBuffer.descriptorSet, }; @@ -235,8 +243,9 @@ void PlumageRender::buildCommandBuffers() if (displayBackground) { - vkCmdBindDescriptorSets(currentCB, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &descriptorSets[i].skybox, 0, nullptr); - vkCmdBindPipeline(currentCB, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelines.skybox); + VkDescriptorSet skyboxDescriptorSet = descriptorSets[i].getSkybox(); + vkCmdBindDescriptorSets(currentCB, VK_PIPELINE_BIND_POINT_GRAPHICS, pipelineLayout, 0, 1, &skyboxDescriptorSet, 0, nullptr); + vkCmdBindPipeline(currentCB, VK_PIPELINE_BIND_POINT_GRAPHICS, m_pipelineList.getSkybox()); m_sceneModel.getSkyBox().draw(currentCB); } @@ -370,7 +379,8 @@ void PlumageRender::setupNodeDescriptorSet(glTFModel::Node *node) VkDescriptorSetAllocateInfo descriptorSetAllocInfo{}; descriptorSetAllocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; descriptorSetAllocInfo.descriptorPool = descriptorPool; - descriptorSetAllocInfo.pSetLayouts = &descriptorSetLayouts.node; + VkDescriptorSetLayout nodeDescriptorSetLayout = m_descriptorSetLayoutList.getNode(); + descriptorSetAllocInfo.pSetLayouts = &nodeDescriptorSetLayout; descriptorSetAllocInfo.descriptorSetCount = 1; VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorSetAllocInfo, &node->mesh->uniformBuffer.descriptorSet)); @@ -446,7 +456,8 @@ void PlumageRender::setupDescriptors() descriptorSetLayoutCI.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; descriptorSetLayoutCI.pBindings = setLayoutBindings.data(); descriptorSetLayoutCI.bindingCount = static_cast(setLayoutBindings.size()); - VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorSetLayoutCI, nullptr, &descriptorSetLayouts.scene)); + VkDescriptorSetLayout sceneDescriptorSetLayout = m_descriptorSetLayoutList.getScene(); + VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorSetLayoutCI, nullptr, &sceneDescriptorSetLayout)); vks::TextureCubeMap refIrradianceCube = m_sceneTextures.getIrradianceCube(); for (auto i = 0; i < descriptorSets.size(); i++) @@ -455,44 +466,46 @@ void PlumageRender::setupDescriptors() VkDescriptorSetAllocateInfo descriptorSetAllocInfo{}; descriptorSetAllocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; descriptorSetAllocInfo.descriptorPool = descriptorPool; - descriptorSetAllocInfo.pSetLayouts = &descriptorSetLayouts.scene; + VkDescriptorSetLayout sceneDescriptorSetLayout = m_descriptorSetLayoutList.getScene(); + descriptorSetAllocInfo.pSetLayouts = &sceneDescriptorSetLayout; descriptorSetAllocInfo.descriptorSetCount = 1; - VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorSetAllocInfo, &descriptorSets[i].scene)); + VkDescriptorSet sceneDescriptorSet = descriptorSets[i].getScene(); + VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorSetAllocInfo, &sceneDescriptorSet)); std::array writeDescriptorSets{}; writeDescriptorSets[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[0].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; writeDescriptorSets[0].descriptorCount = 1; - writeDescriptorSets[0].dstSet = descriptorSets[i].scene; + writeDescriptorSets[0].dstSet = descriptorSets[i].getScene(); writeDescriptorSets[0].dstBinding = 0; writeDescriptorSets[0].pBufferInfo = &uniformBuffers[i].getScene().descriptor; writeDescriptorSets[1].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[1].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; writeDescriptorSets[1].descriptorCount = 1; - writeDescriptorSets[1].dstSet = descriptorSets[i].scene; + writeDescriptorSets[1].dstSet = descriptorSets[i].getScene(); writeDescriptorSets[1].dstBinding = 1; writeDescriptorSets[1].pBufferInfo = &uniformBuffers[i].getParams().descriptor; writeDescriptorSets[2].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[2].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; writeDescriptorSets[2].descriptorCount = 1; - writeDescriptorSets[2].dstSet = descriptorSets[i].scene; + writeDescriptorSets[2].dstSet = descriptorSets[i].getScene(); writeDescriptorSets[2].dstBinding = 2; writeDescriptorSets[2].pImageInfo = &refIrradianceCube.descriptor; writeDescriptorSets[3].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[3].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; writeDescriptorSets[3].descriptorCount = 1; - writeDescriptorSets[3].dstSet = descriptorSets[i].scene; + writeDescriptorSets[3].dstSet = descriptorSets[i].getScene(); writeDescriptorSets[3].dstBinding = 3; writeDescriptorSets[3].pImageInfo = &refIrradianceCube.descriptor; writeDescriptorSets[4].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[4].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; writeDescriptorSets[4].descriptorCount = 1; - writeDescriptorSets[4].dstSet = descriptorSets[i].scene; + writeDescriptorSets[4].dstSet = descriptorSets[i].getScene(); writeDescriptorSets[4].dstBinding = 4; writeDescriptorSets[4].pImageInfo = &refIrradianceCube.descriptor; @@ -513,7 +526,8 @@ void PlumageRender::setupDescriptors() descriptorSetLayoutCI.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; descriptorSetLayoutCI.pBindings = setLayoutBindings.data(); descriptorSetLayoutCI.bindingCount = static_cast(setLayoutBindings.size()); - VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorSetLayoutCI, nullptr, &descriptorSetLayouts.material)); + VkDescriptorSetLayout materialDescriptorSetLayout = m_descriptorSetLayoutList.getMaterial(); + VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorSetLayoutCI, nullptr, &materialDescriptorSetLayout)); // Per-Material descriptor sets for (auto &material : m_sceneModel.getScene().materials) @@ -521,7 +535,8 @@ void PlumageRender::setupDescriptors() VkDescriptorSetAllocateInfo descriptorSetAllocInfo{}; descriptorSetAllocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; descriptorSetAllocInfo.descriptorPool = descriptorPool; - descriptorSetAllocInfo.pSetLayouts = &descriptorSetLayouts.material; + VkDescriptorSetLayout materialDescriptorSetLayout = m_descriptorSetLayoutList.getMaterial(); + descriptorSetAllocInfo.pSetLayouts = &materialDescriptorSetLayout; descriptorSetAllocInfo.descriptorSetCount = 1; VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorSetAllocInfo, &material.descriptorSet)); VkDescriptorImageInfo emptyTexDescriptor = m_sceneTextures.getEmpty().descriptor; @@ -579,7 +594,8 @@ void PlumageRender::setupDescriptors() descriptorSetLayoutCI.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO; descriptorSetLayoutCI.pBindings = setLayoutBindings.data(); descriptorSetLayoutCI.bindingCount = static_cast(setLayoutBindings.size()); - VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorSetLayoutCI, nullptr, &descriptorSetLayouts.node)); + VkDescriptorSetLayout nodeDescriptorSetLayout = m_descriptorSetLayoutList.getNode(); + VK_CHECK_RESULT(vkCreateDescriptorSetLayout(device, &descriptorSetLayoutCI, nullptr, &nodeDescriptorSetLayout)); // Per-Node descriptor set for (auto &node : m_sceneModel.getScene().nodes) @@ -596,30 +612,32 @@ void PlumageRender::setupDescriptors() VkDescriptorSetAllocateInfo descriptorSetAllocInfo{}; descriptorSetAllocInfo.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO; descriptorSetAllocInfo.descriptorPool = descriptorPool; - descriptorSetAllocInfo.pSetLayouts = &descriptorSetLayouts.scene; + VkDescriptorSetLayout sceneDescriptorSetLayouts = m_descriptorSetLayoutList.getScene(); + descriptorSetAllocInfo.pSetLayouts = &sceneDescriptorSetLayouts; descriptorSetAllocInfo.descriptorSetCount = 1; - VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorSetAllocInfo, &descriptorSets[i].skybox)); + VkDescriptorSet skyboxDescriptorSet = descriptorSets[i].getSkybox(); + VK_CHECK_RESULT(vkAllocateDescriptorSets(device, &descriptorSetAllocInfo, &skyboxDescriptorSet)); std::array writeDescriptorSets{}; writeDescriptorSets[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[0].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; writeDescriptorSets[0].descriptorCount = 1; - writeDescriptorSets[0].dstSet = descriptorSets[i].skybox; + writeDescriptorSets[0].dstSet = descriptorSets[i].getSkybox(); writeDescriptorSets[0].dstBinding = 0; writeDescriptorSets[0].pBufferInfo = &uniformBuffers[i].getSkybox().descriptor; writeDescriptorSets[1].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[1].descriptorType = VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER; writeDescriptorSets[1].descriptorCount = 1; - writeDescriptorSets[1].dstSet = descriptorSets[i].skybox; + writeDescriptorSets[1].dstSet = descriptorSets[i].getSkybox(); writeDescriptorSets[1].dstBinding = 1; writeDescriptorSets[1].pBufferInfo = &uniformBuffers[i].getParams().descriptor; writeDescriptorSets[2].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET; writeDescriptorSets[2].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER; writeDescriptorSets[2].descriptorCount = 1; - writeDescriptorSets[2].dstSet = descriptorSets[i].skybox; + writeDescriptorSets[2].dstSet = descriptorSets[i].getSkybox(); writeDescriptorSets[2].dstBinding = 2; writeDescriptorSets[2].pImageInfo = &refPrefilterCube.descriptor; @@ -680,7 +698,7 @@ void PlumageRender::preparePipelines() // Pipeline layout const std::vector setLayouts = { - descriptorSetLayouts.scene, descriptorSetLayouts.material, descriptorSetLayouts.node}; + m_descriptorSetLayoutList.getScene(), m_descriptorSetLayoutList.getMaterial(), m_descriptorSetLayoutList.getNode()}; VkPipelineLayoutCreateInfo pipelineLayoutCI{}; pipelineLayoutCI.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO; pipelineLayoutCI.setLayoutCount = static_cast(setLayouts.size()); @@ -736,7 +754,8 @@ void PlumageRender::preparePipelines() shaderStages = { loadShader(device, m_configFilePath.getSkyboxVertShaderPath(), VK_SHADER_STAGE_VERTEX_BIT), loadShader(device, m_configFilePath.getSkyboxFragShaderPath(), VK_SHADER_STAGE_FRAGMENT_BIT)}; - VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.skybox)); + VkPipeline skyboxPipeline = m_pipelineList.getSkybox(); + VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &skyboxPipeline)); for (auto shaderStage : shaderStages) { vkDestroyShaderModule(device, shaderStage.module, nullptr); @@ -748,9 +767,11 @@ void PlumageRender::preparePipelines() loadShader(device, m_configFilePath.getPbrFragShaderPath(), VK_SHADER_STAGE_FRAGMENT_BIT)}; depthStencilStateCI.depthWriteEnable = VK_TRUE; depthStencilStateCI.depthTestEnable = VK_TRUE; - VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.pbr)); + VkPipeline pbrPipeline = m_pipelineList.getPbr(); + VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pbrPipeline)); rasterizationStateCI.cullMode = VK_CULL_MODE_NONE; - VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.pbrDoubleSided)); + VkPipeline pbrDoubleSidedPipeline = m_pipelineList.getPbrDoubleSided(); + VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pbrDoubleSidedPipeline)); rasterizationStateCI.cullMode = VK_CULL_MODE_NONE; blendAttachmentState.blendEnable = VK_TRUE; @@ -761,7 +782,8 @@ void PlumageRender::preparePipelines() blendAttachmentState.srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA; blendAttachmentState.dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO; blendAttachmentState.alphaBlendOp = VK_BLEND_OP_ADD; - VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pipelines.pbrAlphaBlend)); + VkPipeline pbrAlphaBlendPipeline = m_pipelineList.getPbrAlphaBlend(); + VK_CHECK_RESULT(vkCreateGraphicsPipelines(device, pipelineCache, 1, &pipelineCI, nullptr, &pbrAlphaBlendPipeline)); for (auto shaderStage : shaderStages) { diff --git a/src/render/render.h b/src/render/render.h index 9387130..bc8f26c 100644 --- a/src/render/render.h +++ b/src/render/render.h @@ -1,6 +1,8 @@ #pragma once #include "ConfigFilePath.h" +#include "RenderDescriptorSetLayoutList.h" +#include "RenderPipelineList.h" #include "RenderSceneTextures.h" #include "renderShaderData.h" #if defined(_WIN32) @@ -41,9 +43,15 @@ #include "LocalizationStrings.h" #include "ConfigFilePath.h" +#include "IndexStagingBuffer.h" +#include "RenderDescriptorSetLayoutList.h" +#include "RenderDescriptorSetList.h" +#include "RenderPipelineLayoutList.h" +#include "RenderPipelineList.h" #include "RenderSceneTextures.h" #include "SceneUBOMatrices.h" #include "SkyboxUBOMatrices.h" +#include "VertexStagingBuffer.h" #include "renderEffectState.h" #include "renderSceneModel.h" #include "renderShaderData.h" @@ -64,6 +72,13 @@ private: SkyboxUBOMatrices m_shaderDataSkybox; ConfigFilePath m_configFilePath; + IndexStagingBuffer m_IndexStagingBuffer; + VertexStagingBuffer m_VertexStagingBuffer; + + RenderPipelineList m_pipelineList; + RenderPipelineLayoutList m_pipelineLayoutList; + + RenderDescriptorSetLayoutList m_descriptorSetLayoutList; public: float modelrot = 0.0f; @@ -83,50 +98,11 @@ public: int32_t debugViewInputs = 0; int32_t debugViewEquation = 0; - struct StagingBuffer - { - VkBuffer buffer; - VkDeviceMemory memory; - } vertexStaging, indexStaging; - - struct Pipelines - { - VkPipeline skybox; - VkPipeline pbr; - VkPipeline pbrDoubleSided; - VkPipeline pbrAlphaBlend; - VkPipeline solid; - VkPipeline wireframe = VK_NULL_HANDLE; - VkPipeline toneMapping = VK_NULL_HANDLE; - } pipelines; - VkPipeline boundPipeline = VK_NULL_HANDLE; - struct PipelineLayouts - { - VkDescriptorSetLayout scene; - VkDescriptorSetLayout material; - VkDescriptorSetLayout node; - VkPipelineLayout tonemappingLayout; - } pipelineLayouts; - VkPipelineLayout pipelineLayout; - struct DescriptorSets - { - VkDescriptorSet scene; - VkDescriptorSet skybox; - VkDescriptorSet tonemappingDescriptorSet = VK_NULL_HANDLE; - }; - - struct DescriptorSetLayouts - { - VkDescriptorSetLayout scene; - VkDescriptorSetLayout material; - VkDescriptorSetLayout node; - } descriptorSetLayouts; - - std::vector descriptorSets; + std::vector descriptorSets; std::vector commandBuffers; std::vector uniformBuffers; @@ -186,14 +162,14 @@ public: { // Clean up used Vulkan resources // Note : Inherited destructor cleans up resources stored in base class - vkDestroyPipeline(device, pipelines.skybox, nullptr); - vkDestroyPipeline(device, pipelines.pbr, nullptr); - vkDestroyPipeline(device, pipelines.pbrAlphaBlend, nullptr); + vkDestroyPipeline(device, m_pipelineList.getSkybox(), nullptr); + vkDestroyPipeline(device, m_pipelineList.getPbr(), nullptr); + vkDestroyPipeline(device, m_pipelineList.getPbrAlphaBlend(), nullptr); vkDestroyPipelineLayout(device, pipelineLayout, nullptr); - vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.scene, nullptr); - vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.material, nullptr); - vkDestroyDescriptorSetLayout(device, descriptorSetLayouts.node, nullptr); + vkDestroyDescriptorSetLayout(device, m_descriptorSetLayoutList.getScene(), nullptr); + vkDestroyDescriptorSetLayout(device, m_descriptorSetLayoutList.getMaterial(), nullptr); + vkDestroyDescriptorSetLayout(device, m_descriptorSetLayoutList.getNode(), nullptr); m_sceneModel.destroyScene(device); m_sceneModel.destroySkyBox(device);