From 7d05cc25ac7aa339c232843d729c9e0914f973ed Mon Sep 17 00:00:00 2001 From: azhirnov Date: Mon, 7 Sep 2020 21:06:20 +0300 Subject: Added pDxCompilerPath to engine create info, fixed DXC usage in Linux, fixed FX compiler path for Win8, fixed DXC name refactoring: rename DXIL to DXC, keep DXIL names only for D3D12, disable DXC on Android --- Graphics/GraphicsEngineD3D12/CMakeLists.txt | 4 ++-- Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/CMakeLists.txt b/Graphics/GraphicsEngineD3D12/CMakeLists.txt index b5e85ad4..74e0f50d 100644 --- a/Graphics/GraphicsEngineD3D12/CMakeLists.txt +++ b/Graphics/GraphicsEngineD3D12/CMakeLists.txt @@ -183,8 +183,8 @@ if(${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} STRGREATER_EQUAL "10.0.19041.0") set(D12_H_HAS_MESH_SHADER ON CACHE INTERNAL "" FORCE) target_compile_definitions(Diligent-GraphicsEngineD3D12-static PRIVATE D12_H_HAS_MESH_SHADER) endif() -if(${DILIGENT_HAS_DX12_DXIL_COMPILER}) - target_compile_definitions(Diligent-GraphicsEngineD3D12-static PRIVATE DILIGENT_HAS_DX12_DXIL_COMPILER) +if(${DILIGENT_HAS_D3D12_DXIL_COMPILER}) + target_compile_definitions(Diligent-GraphicsEngineD3D12-static PRIVATE DILIGENT_HAS_D3D12_DXIL_COMPILER) endif() # Set output name to GraphicsEngineD3D12_{32|64}{r|d} diff --git a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp index 65991753..ac747d62 100644 --- a/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp +++ b/Graphics/GraphicsEngineD3D12/src/EngineFactoryD3D12.cpp @@ -42,6 +42,7 @@ #include "StringTools.hpp" #include "EngineMemory.h" #include "CommandQueueD3D12Impl.hpp" +#include "DXILUtils.hpp" #ifndef NOMINMAX # define NOMINMAX @@ -379,6 +380,8 @@ void EngineFactoryD3D12Impl::CreateDeviceAndContextsD3D12(const EngineD3D12Creat std::array CmdQueues = {pCmdQueueD3D12}; AttachToD3D12Device(d3d12Device, CmdQueues.size(), CmdQueues.data(), EngineCI, ppDevice, ppContexts); + + DxcLoadLibrary(DXCompilerTarget::Direct3D12, EngineCI.pDxCompilerPath); } -- cgit v1.2.3