From e47c244ac38f93583370f6146c608524c891751f Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Wed, 31 Jan 2018 00:48:39 +0100 Subject: [PATCH] [dxvk] Use logger instead of exception when compiling pipelines The exception is never caught because it is called from DXVK code, not D3D code. --- src/dxvk/dxvk_compute.cpp | 2 +- src/dxvk/dxvk_graphics.cpp | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/dxvk/dxvk_compute.cpp b/src/dxvk/dxvk_compute.cpp index 44194ab2..5713b929 100644 --- a/src/dxvk/dxvk_compute.cpp +++ b/src/dxvk/dxvk_compute.cpp @@ -42,7 +42,7 @@ namespace dxvk { if (m_vkd->vkCreateComputePipelines(m_vkd->device(), m_cache->handle(), 1, &info, nullptr, &m_pipeline) != VK_SUCCESS) - throw DxvkError("DxvkComputePipeline::DxvkComputePipeline: Failed to compile pipeline"); + Logger::err("DxvkComputePipeline: Failed to compile pipeline"); } } \ No newline at end of file diff --git a/src/dxvk/dxvk_graphics.cpp b/src/dxvk/dxvk_graphics.cpp index d82e5542..749c242c 100644 --- a/src/dxvk/dxvk_graphics.cpp +++ b/src/dxvk/dxvk_graphics.cpp @@ -246,8 +246,11 @@ namespace dxvk { VkPipeline pipeline = VK_NULL_HANDLE; if (m_vkd->vkCreateGraphicsPipelines(m_vkd->device(), - m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) - throw DxvkError("DxvkGraphicsPipeline::DxvkGraphicsPipeline: Failed to compile pipeline"); + m_cache->handle(), 1, &info, nullptr, &pipeline) != VK_SUCCESS) { + Logger::err("DxvkGraphicsPipeline: Failed to compile pipeline"); + return VK_NULL_HANDLE; + } + return pipeline; }