summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorazhirnov <zh1dron@gmail.com>2020-08-19 20:55:26 +0000
committerazhirnov <zh1dron@gmail.com>2020-08-19 20:55:26 +0000
commit882d621fe50027dedbb69f3f84e5c294656f6c6b (patch)
treee7a4e16a14dfc0ad57dced8833e1ee99a20aea5b /Graphics/GraphicsEngineD3DBase
parentminor fixes and formatting (diff)
downloadDiligentCore-882d621fe50027dedbb69f3f84e5c294656f6c6b.tar.gz
DiligentCore-882d621fe50027dedbb69f3f84e5c294656f6c6b.zip
Removed macros HAS_D12_DXIL_COMPILER
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/CMakeLists.txt1
-rw-r--r--Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp7
-rw-r--r--Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp7
3 files changed, 1 insertions, 14 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/CMakeLists.txt b/Graphics/GraphicsEngineD3DBase/CMakeLists.txt
index bd7423ee..289ecc7e 100644
--- a/Graphics/GraphicsEngineD3DBase/CMakeLists.txt
+++ b/Graphics/GraphicsEngineD3DBase/CMakeLists.txt
@@ -71,7 +71,6 @@ set_common_target_properties(Diligent-GraphicsEngineD3DBase)
if(${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION} STRGREATER_EQUAL "10.0.17763.0")
set(HAS_D12_DXIL_COMPILER TRUE CACHE INTERNAL "" FORCE)
- target_compile_definitions(Diligent-GraphicsEngineD3DBase PRIVATE HAS_D12_DXIL_COMPILER)
else()
set(HAS_D12_DXIL_COMPILER FALSE CACHE INTERNAL "" FORCE)
endif()
diff --git a/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp b/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp
index ed41bb5f..5e834c98 100644
--- a/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp
+++ b/Graphics/GraphicsEngineD3DBase/include/ShaderD3DBase.hpp
@@ -28,10 +28,7 @@
#pragma once
#include <d3dcommon.h>
-
-#ifdef HAS_D12_DXIL_COMPILER
-# include "dxcapi.h"
-#endif
+#include <dxcapi.h>
#include "Shader.h"
@@ -52,12 +49,10 @@ protected:
bool m_isDXIL;
};
-#ifdef HAS_D12_DXIL_COMPILER
// calls DxcCreateInstance
HRESULT DXILCreateInstance(
_In_ REFCLSID rclsid,
_In_ REFIID riid,
_Out_ LPVOID* ppv);
-#endif
} // namespace Diligent
diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
index 604e385a..53c57e44 100644
--- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
+++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
@@ -45,7 +45,6 @@ static const Char* g_HLSLDefinitions =
};
-#ifdef HAS_D12_DXIL_COMPILER
struct DXILCompilerLib
{
HMODULE Module = nullptr;
@@ -150,7 +149,6 @@ private:
ULONG m_RefCount;
std::vector<RefCntAutoPtr<IDataBlob>> m_FileDataCache;
};
-#endif
static HRESULT CompileDxilShader(const char* Source,
const ShaderCreateInfo& ShaderCI,
@@ -158,7 +156,6 @@ static HRESULT CompileDxilShader(const char* Source,
ID3DBlob** ppBlobOut,
ID3DBlob** ppCompilerOutput)
{
-#ifdef HAS_D12_DXIL_COMPILER
if (DXILCompilerLib::Instance().CreateInstance == nullptr)
{
LOG_ERROR("Failed to load dxcompiler.dll");
@@ -327,10 +324,6 @@ static HRESULT CompileDxilShader(const char* Source,
hr = result->GetResult(reinterpret_cast<IDxcBlob**>(ppBlobOut));
return hr;
-#else
- UNSUPPORTED("Shader model 6 and above requires DXIL compiler");
- return E_FAIL;
-#endif
}