From 42b99e509eeb2f791b47207f7d00348c0e57ab6b Mon Sep 17 00:00:00 2001 From: azhirnov Date: Wed, 19 Aug 2020 18:55:52 +0300 Subject: Load dxcompiler.dll in runtime --- Graphics/GraphicsEngineD3D12/include/RootSignature.hpp | 1 - Graphics/GraphicsEngineD3D12/src/ShaderResourcesD3D12.cpp | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') 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 -#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 pReflection; UINT32 shaderIdx; - DxcCreateInstance(CLSID_DxcContainerReflection, IID_PPV_ARGS(&pReflection)); - hr = pReflection->Load(reinterpret_cast(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(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(&pShaderReflection)); -- cgit v1.2.3