diff options
| author | azhirnov <zh1dron@gmail.com> | 2020-09-07 18:06:20 +0000 |
|---|---|---|
| committer | azhirnov <zh1dron@gmail.com> | 2020-09-07 21:41:51 +0000 |
| commit | 7d05cc25ac7aa339c232843d729c9e0914f973ed (patch) | |
| tree | 76681ba20e31e9d8824b44e78555e31eea98a16d /Graphics/GraphicsEngineD3DBase | |
| parent | fixed compilation on UWP (diff) | |
| download | DiligentCore-7d05cc25ac7aa339c232843d729c9e0914f973ed.tar.gz DiligentCore-7d05cc25ac7aa339c232843d729c9e0914f973ed.zip | |
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
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp | 20 |
2 files changed, 12 insertions, 12 deletions
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<IDxcBlob**>(ppBlobOut), - reinterpret_cast<IDxcBlob**>(ppCompilerOutput))) + if (!DxcCompile(DXCompilerTarget::Direct3D12, + Source, SourceLength, + ToUnicode(ShaderCI.EntryPoint), + ToUnicode(profile), + D3DMacros.data(), D3DMacros.size(), + pArgs, _countof(pArgs), + ShaderCI.pShaderSourceStreamFactory, + reinterpret_cast<IDxcBlob**>(ppBlobOut), + reinterpret_cast<IDxcBlob**>(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; |
