summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D12
diff options
context:
space:
mode:
authorazhirnov <zh1dron@gmail.com>2020-08-19 15:55:52 +0000
committerazhirnov <zh1dron@gmail.com>2020-08-19 15:55:52 +0000
commit42b99e509eeb2f791b47207f7d00348c0e57ab6b (patch)
tree119fda6cef1f2e7c44f4d30e6889c31ae56963b1 /Graphics/GraphicsEngineD3D12
parentRename HAS_DXIL_COMPILER to HAS_D12_DXIL_COMPILER (diff)
downloadDiligentCore-42b99e509eeb2f791b47207f7d00348c0e57ab6b.tar.gz
DiligentCore-42b99e509eeb2f791b47207f7d00348c0e57ab6b.zip
Load dxcompiler.dll in runtime
Diffstat (limited to 'Graphics/GraphicsEngineD3D12')
-rw-r--r--Graphics/GraphicsEngineD3D12/include/RootSignature.hpp1
-rw-r--r--Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp5
2 files changed, 3 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngineD3D12/include/RootSignature.hpp b/Graphics/GraphicsEngineD3D12/include/RootSignature.hpp
index cc7ae67f..a3bc8d11 100644
--- a/Graphics/GraphicsEngineD3D12/include/RootSignature.hpp
+++ b/Graphics/GraphicsEngineD3D12/include/RootSignature.hpp
@@ -30,7 +30,6 @@
/// \file
/// Declaration of Diligent::RootSignature class
#include <array>
-#include "ShaderD3DBase.hpp"
#include "ShaderResourceLayoutD3D12.hpp"
#include "BufferD3D12Impl.hpp"
diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
index b447c036..f3680ee7 100644
--- a/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
+++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp
@@ -62,9 +62,10 @@ ShaderResourcesD3D12::ShaderResourcesD3D12(ID3DBlob* pShaderBytecode, bool isDXI
const uint32_t DFCC_DXIL = uint32_t('D') | (uint32_t('X') << 8) | (uint32_t('I') << 16) | (uint32_t('L') << 24);
CComPtr<IDxcContainerReflection> pReflection;
UINT32 shaderIdx;
- DxcCreateInstance(CLSID_DxcContainerReflection, IID_PPV_ARGS(&pReflection));
- hr = pReflection->Load(reinterpret_cast<IDxcBlob*>(pShaderBytecode));
+ hr = DXILCreateInstance(CLSID_DxcContainerReflection, IID_PPV_ARGS(&pReflection));
CHECK_D3D_RESULT_THROW(hr, "Failed to create shader reflection instance");
+ hr = pReflection->Load(reinterpret_cast<IDxcBlob*>(pShaderBytecode));
+ CHECK_D3D_RESULT_THROW(hr, "Failed to load shader reflection from bytecode");
hr = pReflection->FindFirstPartKind(DFCC_DXIL, &shaderIdx);
CHECK_D3D_RESULT_THROW(hr, "Failed to find DXIL part");
hr = pReflection->GetPartReflection(shaderIdx, __uuidof(pShaderReflection), reinterpret_cast<void**>(&pShaderReflection));