Fix for desc struct

This commit is contained in:
Henrik Rydgård 2022-09-08 01:23:18 +02:00
parent 347f7c4e5a
commit 68dd329d95
2 changed files with 1 additions and 12 deletions

View file

@ -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;
}

View file

@ -166,7 +166,7 @@ struct VKRGraphicsPipeline {
u32 GetVariantsBitmask() const;
VKRGraphicsPipelineDesc *desc = nullptr;
VKRGraphicsPipelineDesc *desc = nullptr; // not owned!
Promise<VkPipeline> *pipeline[RP_TYPE_COUNT]{};
std::string tag;
};