summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineVulkan
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-09-14 21:24:57 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-09-14 21:24:57 +0000
commitad658f07caaecb1d5a2de84868c07067959b36e6 (patch)
tree2bbba07a42eb7a1c66270e5f24fb888a44793f38 /Graphics/GraphicsEngineVulkan
parentRefactoring shader compilation - part II (diff)
downloadDiligentCore-ad658f07caaecb1d5a2de84868c07067959b36e6.tar.gz
DiligentCore-ad658f07caaecb1d5a2de84868c07067959b36e6.zip
Refactoring shader compilation - part III
Diffstat (limited to 'Graphics/GraphicsEngineVulkan')
-rw-r--r--Graphics/GraphicsEngineVulkan/src/ShaderVkImpl.cpp14
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: