diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-09-14 21:24:57 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-09-14 21:24:57 +0000 |
| commit | ad658f07caaecb1d5a2de84868c07067959b36e6 (patch) | |
| tree | 2bbba07a42eb7a1c66270e5f24fb888a44793f38 /Graphics/GraphicsEngineVulkan | |
| parent | Refactoring shader compilation - part II (diff) | |
| download | DiligentCore-ad658f07caaecb1d5a2de84868c07067959b36e6.tar.gz DiligentCore-ad658f07caaecb1d5a2de84868c07067959b36e6.zip | |
Refactoring shader compilation - part III
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
| -rw-r--r-- | Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp index 733f5b74..033f711a 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp @@ -67,8 +67,18 @@ ShaderVkImpl::ShaderVkImpl(IReferenceCounters* pRefCounters, switch (CreationAttribs.ShaderCompiler) { case SHADER_COMPILER_DXC: - m_SPIRV = DXILtoSPIRV(pRenderDeviceVk->GetDxCompiler(), CreationAttribs, VulkanDefine, CreationAttribs.ppCompilerOutput); - break; + { + auto* pDXComiler = pRenderDeviceVk->GetDxCompiler(); + if (pDXComiler != nullptr && pDXComiler->IsLoaded()) + { + pDXComiler->Compile(CreationAttribs, VulkanDefine, nullptr, &m_SPIRV, CreationAttribs.ppCompilerOutput); + } + else + { + LOG_ERROR_AND_THROW("DX Compiler is not loaded"); + } + } + break; case SHADER_COMPILER_DEFAULT: case SHADER_COMPILER_GLSLANG: |
