[dxvk] Don't crash immediately on pipeline library compile error

Things will blow up down the line but there's no good reason to crash
immediately. Also ignore returned pipeline on error so we'll always
return null.
This commit is contained in:
Philip Rebohle 2022-10-18 00:07:41 +02:00
parent 69d7af42a4
commit 53a0c3726c
1 changed files with 6 additions and 6 deletions

View File

@ -1130,9 +1130,9 @@ namespace dxvk {
VkResult vr = vk->vkCreateGraphicsPipelines(vk->device(), VK_NULL_HANDLE, 1, &info, nullptr, &pipeline);
if (vr && !(flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT))
throw DxvkError(str::format("DxvkShaderPipelineLibrary: Failed to create vertex shader pipeline: ", vr));
Logger::err(str::format("DxvkShaderPipelineLibrary: Failed to create vertex shader pipeline: ", vr));
return pipeline;
return vr ? VK_NULL_HANDLE : pipeline;
}
@ -1201,9 +1201,9 @@ namespace dxvk {
VkResult vr = vk->vkCreateGraphicsPipelines(vk->device(), VK_NULL_HANDLE, 1, &info, nullptr, &pipeline);
if (vr && !(flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT))
throw DxvkError(str::format("DxvkShaderPipelineLibrary: Failed to create fragment shader pipeline: ", vr));
Logger::err(str::format("DxvkShaderPipelineLibrary: Failed to create fragment shader pipeline: ", vr));
return pipeline;
return vr ? VK_NULL_HANDLE : pipeline;
}
@ -1223,9 +1223,9 @@ namespace dxvk {
VkResult vr = vk->vkCreateComputePipelines(vk->device(), VK_NULL_HANDLE, 1, &info, nullptr, &pipeline);
if (vr && !(flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT))
throw DxvkError(str::format("DxvkShaderPipelineLibrary: Failed to create compute shader pipeline: ", vr));
Logger::err(str::format("DxvkShaderPipelineLibrary: Failed to create compute shader pipeline: ", vr));
return pipeline;
return vr ? VK_NULL_HANDLE : pipeline;
}