Don't crash as hard on shader compile error.

This commit is contained in:
Unknown W. Brackets authored and Henrik Rydgard committed 2016-03-20 19:31:02 +01:00
1 parent 2d548d64da
commit 323130eb86
2 files changed
+13

No files matched your search

+8
View File
@@ -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) {