diff --git a/GPU/Vulkan/DrawEngineVulkan.cpp b/GPU/Vulkan/DrawEngineVulkan.cpp index c12f8d9390..b1a4d14144 100644 --- a/GPU/Vulkan/DrawEngineVulkan.cpp +++ b/GPU/Vulkan/DrawEngineVulkan.cpp @@ -531,6 +531,10 @@ void DrawEngineVulkan::DoFlush(VkCommandBuffer cmd) { shaderManager_->UpdateUniforms(); shaderManager_->GetShaders(prim, lastVType_, &vshader, &fshader, useHWTransform); VulkanPipeline *pipeline = pipelineManager_->GetOrCreatePipeline(pipelineLayout_, pipelineKey, dec_, vshader, fshader, true); + if (!pipeline) { + // Already logged, let's bail out. + return; + } vkCmdBindPipeline(cmd_, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline->pipeline); // TODO: Avoid if same as last draw. if (pipeline->uniformBlocks & UB_VS_FS_BASE) { @@ -620,6 +624,10 @@ void DrawEngineVulkan::DoFlush(VkCommandBuffer cmd) { shaderManager_->UpdateUniforms(); shaderManager_->GetShaders(prim, lastVType_, &vshader, &fshader, useHWTransform); VulkanPipeline *pipeline = pipelineManager_->GetOrCreatePipeline(pipelineLayout_, pipelineKey, dec_, vshader, fshader, false); + if (!pipeline) { + // Already logged, let's bail out. + return; + } vkCmdBindPipeline(cmd_, VK_PIPELINE_BIND_POINT_GRAPHICS, pipeline->pipeline); // TODO: Avoid if same as last draw. if (pipeline->uniformBlocks & UB_VS_FS_BASE) { diff --git a/GPU/Vulkan/PipelineManagerVulkan.cpp b/GPU/Vulkan/PipelineManagerVulkan.cpp index 4102af0d53..ef51bf6e9e 100644 --- a/GPU/Vulkan/PipelineManagerVulkan.cpp +++ b/GPU/Vulkan/PipelineManagerVulkan.cpp @@ -197,6 +197,11 @@ static VulkanPipeline *CreateVulkanPipeline(VkDevice device, VkPipelineCache pip ss[1].pName = "main"; ss[1].flags = 0; + if (!ss[0].module || !ss[1].module) { + ERROR_LOG(G3D, "Failed creating graphics pipeline - bad shaders"); + return nullptr; + } + VkPipelineInputAssemblyStateCreateInfo inputAssembly; inputAssembly.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; inputAssembly.pNext = nullptr;