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/GraphicsEngineD3DBase/CMakeLists.txt | 4 ++-- Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) (limited to 'Graphics/GraphicsEngineD3DBase') diff --git a/Graphics/GraphicsEngineD3DBase/CMakeLists.txt b/Graphics/GraphicsEngineD3DBase/CMakeLists.txt index dbdd9436..ef53741a 100644 --- a/Graphics/GraphicsEngineD3DBase/CMakeLists.txt +++ b/Graphics/GraphicsEngineD3DBase/CMakeLists.txt @@ -71,9 +71,9 @@ PUBLIC set_common_target_properties(Diligent-GraphicsEngineD3DBase) if(${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} STRGREATER_EQUAL "10.0.17763.0") - set(DILIGENT_HAS_DX12_DXIL_COMPILER TRUE CACHE INTERNAL "" FORCE) + set(DILIGENT_HAS_D3D12_DXIL_COMPILER TRUE CACHE INTERNAL "" FORCE) else() - set(DILIGENT_HAS_DX12_DXIL_COMPILER FALSE CACHE INTERNAL "" FORCE) + set(DILIGENT_HAS_D3D12_DXIL_COMPILER FALSE CACHE INTERNAL "" FORCE) endif() source_group("src" FILES ${SOURCE}) diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp index 48132a4b..fb51062b 100644 --- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp +++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp @@ -169,15 +169,15 @@ static HRESULT CompileDxilShader(const char* Source, VERIFY_EXPR(__uuidof(ID3DBlob) == __uuidof(IDxcBlob)); - if (!DXILCompile(DXILCompilerTarget::Direct3D12, - Source, SourceLength, - ToUnicode(ShaderCI.EntryPoint), - ToUnicode(profile), - D3DMacros.data(), D3DMacros.size(), - pArgs, _countof(pArgs), - ShaderCI.pShaderSourceStreamFactory, - reinterpret_cast(ppBlobOut), - reinterpret_cast(ppCompilerOutput))) + if (!DxcCompile(DXCompilerTarget::Direct3D12, + Source, SourceLength, + ToUnicode(ShaderCI.EntryPoint), + ToUnicode(profile), + D3DMacros.data(), D3DMacros.size(), + pArgs, _countof(pArgs), + ShaderCI.pShaderSourceStreamFactory, + reinterpret_cast(ppBlobOut), + reinterpret_cast(ppCompilerOutput))) { return E_FAIL; } @@ -338,7 +338,7 @@ ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, const ShaderVersi // clamp to maximum supported version ShaderVersion MaxSM; - if (DXILGetMaxShaderModel(DXILCompilerTarget::Direct3D12, MaxSM)) + if (DxcGetMaxShaderModel(DXCompilerTarget::Direct3D12, MaxSM)) { if (ShaderModel.Major > MaxSM.Major) ShaderModel = MaxSM; -- cgit v1.2.3