summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3DBase
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-03-02 20:59:46 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-03-19 00:38:14 +0000
commit0f3196742401a6871f41f9bbacf5cbbf33883c5c (patch)
treef480a3d060e1c6c9ef1bab04ef2b6c595e891a26 /Graphics/GraphicsEngineD3DBase
parentRunTimeResourceArray Test: added RW textures and buffers (diff)
downloadDiligentCore-0f3196742401a6871f41f9bbacf5cbbf33883c5c.tar.gz
DiligentCore-0f3196742401a6871f41f9bbacf5cbbf33883c5c.zip
Added shader compiler macros to shader source
Diffstat (limited to 'Graphics/GraphicsEngineD3DBase')
-rw-r--r--Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
index 49566626..322ccd50 100644
--- a/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
+++ b/Graphics/GraphicsEngineD3DBase/src/ShaderD3DBase.cpp
@@ -124,8 +124,10 @@ static HRESULT CompileShader(const char* Source,
}
}
+ D3D_SHADER_MACRO Macros[] = {{"D3DCOMPILER", ""}, {}};
+
D3DIncludeImpl IncludeImpl{ShaderCI.pShaderSourceStreamFactory};
- return D3DCompile(Source, SourceLength, NULL, nullptr, &IncludeImpl, ShaderCI.EntryPoint, profile, dwShaderFlags, 0, ppBlobOut, ppCompilerOutput);
+ return D3DCompile(Source, SourceLength, nullptr, Macros, &IncludeImpl, ShaderCI.EntryPoint, profile, dwShaderFlags, 0, ppBlobOut, ppCompilerOutput);
}
ShaderD3DBase::ShaderD3DBase(const ShaderCreateInfo& ShaderCI, const ShaderVersion ShaderModel, IDXCompiler* DxCompiler)