Archived
1
Fork 0

Fix crash when trying to load scene editor on Vulkan

This commit is contained in:
redstrate 2021-05-11 17:05:43 -04:00
parent 2ddc1e1794
commit fcc3917155

View file

@ -1168,10 +1168,12 @@ void GFXVulkan::submit(GFXCommandBuffer* command_buffer, const int identifier) {
case GFXCommandType::SetGraphicsPipeline: case GFXCommandType::SetGraphicsPipeline:
{ {
currentPipeline = (GFXVulkanPipeline*)command.data.set_graphics_pipeline.pipeline; currentPipeline = (GFXVulkanPipeline*)command.data.set_graphics_pipeline.pipeline;
if(currentPipeline != nullptr) {
vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, currentPipeline->handle); vkCmdBindPipeline(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS, currentPipeline->handle);
resetDescriptorState(); resetDescriptorState();
lastDescriptorHash = 0; lastDescriptorHash = 0;
}
} }
break; break;
case GFXCommandType::SetVertexBuffer: case GFXCommandType::SetVertexBuffer: