diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-07-04 23:21:24 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-07-04 23:21:24 +0000 |
| commit | 19dcf476e8f9b079191bd43ee8da9e9cfe5e3e64 (patch) | |
| tree | 4ebd90768fbcd8c6f5dda8f48e8558f59bf4a262 /Graphics/GLSLTools | |
| parent | Fixed few issues with 3D texture views in GL and VK (diff) | |
| download | DiligentCore-19dcf476e8f9b079191bd43ee8da9e9cfe5e3e64.tar.gz DiligentCore-19dcf476e8f9b079191bd43ee8da9e9cfe5e3e64.zip | |
Corrected depth-related GLSL definitions for Vulkan case
Diffstat (limited to 'Graphics/GLSLTools')
| -rw-r--r-- | Graphics/GLSLTools/include/GLSLSourceBuilder.h | 2 | ||||
| -rw-r--r-- | Graphics/GLSLTools/src/GLSLSourceBuilder.cpp | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/Graphics/GLSLTools/include/GLSLSourceBuilder.h b/Graphics/GLSLTools/include/GLSLSourceBuilder.h index 572ea180..b77b1055 100644 --- a/Graphics/GLSLTools/include/GLSLSourceBuilder.h +++ b/Graphics/GLSLTools/include/GLSLSourceBuilder.h @@ -35,6 +35,6 @@ enum TargetGLSLCompiler driver }; -String BuildGLSLSourceString(const ShaderCreationAttribs &CreationAttribs, TargetGLSLCompiler TargetCompiler); +String BuildGLSLSourceString(const ShaderCreationAttribs& CreationAttribs, TargetGLSLCompiler TargetCompiler, const char* ExtraDefinitions = nullptr); }
\ No newline at end of file diff --git a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp index e37206b1..d5a8ee09 100644 --- a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp +++ b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp @@ -32,7 +32,7 @@ namespace Diligent { -String BuildGLSLSourceString(const ShaderCreationAttribs &CreationAttribs, TargetGLSLCompiler TargetCompiler) +String BuildGLSLSourceString(const ShaderCreationAttribs& CreationAttribs, TargetGLSLCompiler TargetCompiler, const char* ExtraDefinitions) { String GLSLSource; @@ -189,6 +189,11 @@ String BuildGLSLSourceString(const ShaderCreationAttribs &CreationAttribs, Targe } GLSLSource += ShaderTypeDefine; + if(ExtraDefinitions != nullptr) + { + GLSLSource.append(ExtraDefinitions); + } + if (CreationAttribs.Macros != nullptr) { auto *pMacro = CreationAttribs.Macros; |
