From 68dd329d95f89bcd9beaab39becafba03d319e5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 8 Sep 2022 01:23:18 +0200 Subject: [PATCH] Fix for desc struct --- Common/GPU/Vulkan/VulkanRenderManager.cpp | 11 ----------- Common/GPU/Vulkan/VulkanRenderManager.h | 2 +- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index b7a076bba7..5a267a273f 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -27,11 +27,6 @@ using namespace PPSSPP_VK; // renderPass is an example of the "compatibility class" or RenderPassType type. bool VKRGraphicsPipeline::Create(VulkanContext *vulkan, VkRenderPass compatibleRenderPass, RenderPassType rpType) { - if (!desc) { - // Already failed to create this one. - return false; - } - // Fill in the last part of the desc since now it's time to block. VkShaderModule vs = desc->vertexShader->BlockUntilReady(); VkShaderModule fs = desc->fragmentShader->BlockUntilReady(); @@ -103,12 +98,6 @@ bool VKRGraphicsPipeline::Create(VulkanContext *vulkan, VkRenderPass compatibleR pipeline[rpType]->Post(vkpipeline); } - - // Having the desc stick around can be useful for debugging. -#ifndef _DEBUG - delete desc; - desc = nullptr; -#endif return success; } diff --git a/Common/GPU/Vulkan/VulkanRenderManager.h b/Common/GPU/Vulkan/VulkanRenderManager.h index dc4bad101f..ad2f71fa28 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.h +++ b/Common/GPU/Vulkan/VulkanRenderManager.h @@ -166,7 +166,7 @@ struct VKRGraphicsPipeline { u32 GetVariantsBitmask() const; - VKRGraphicsPipelineDesc *desc = nullptr; + VKRGraphicsPipelineDesc *desc = nullptr; // not owned! Promise *pipeline[RP_TYPE_COUNT]{}; std::string tag; };