diff --git a/Common/GPU/Vulkan/VulkanRenderManager.cpp b/Common/GPU/Vulkan/VulkanRenderManager.cpp index fb92a7a7face..d16ff046bbc2 100644 --- a/Common/GPU/Vulkan/VulkanRenderManager.cpp +++ b/Common/GPU/Vulkan/VulkanRenderManager.cpp @@ -41,6 +41,7 @@ bool VKRGraphicsPipeline::Create(VulkanContext *vulkan, VkRenderPass compatibleR // Seen in crash reports from PowerVR GE8320, presumably we failed creating some shader modules. if (!desc->vertexShader || !desc->fragmentShader) { ERROR_LOG(G3D, "Failed creating graphics pipeline - missing vs/fs shader module pointers!"); + pipeline[(size_t)rpType]->Post(VK_NULL_HANDLE); return false; } @@ -51,13 +52,13 @@ bool VKRGraphicsPipeline::Create(VulkanContext *vulkan, VkRenderPass compatibleR if (!vs || !fs || (!gs && desc->geometryShader)) { ERROR_LOG(G3D, "Failed creating graphics pipeline - missing shader modules"); - // We're kinda screwed here? + pipeline[(size_t)rpType]->Post(VK_NULL_HANDLE); return false; } if (!compatibleRenderPass) { - ERROR_LOG(G3D, "Failed creating graphics pipeline - compatible render pass was null"); - // We're kinda screwed here? + ERROR_LOG(G3D, "Failed creating graphics pipeline - compatible render pass was nullptr"); + pipeline[(size_t)rpType]->Post(VK_NULL_HANDLE); return false; } diff --git a/GPU/Vulkan/ShaderManagerVulkan.cpp b/GPU/Vulkan/ShaderManagerVulkan.cpp index 9cae5d6486df..5b90e39e1506 100644 --- a/GPU/Vulkan/ShaderManagerVulkan.cpp +++ b/GPU/Vulkan/ShaderManagerVulkan.cpp @@ -119,7 +119,9 @@ VulkanFragmentShader::VulkanFragmentShader(VulkanContext *vulkan, FShaderID id, VulkanFragmentShader::~VulkanFragmentShader() { if (module_) { VkShaderModule shaderModule = module_->BlockUntilReady(); - vulkan_->Delete().QueueDeleteShaderModule(shaderModule); + if (shaderModule) { + vulkan_->Delete().QueueDeleteShaderModule(shaderModule); + } vulkan_->Delete().QueueCallback([](void *m) { auto module = (Promise *)m; delete module;