diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2018-12-25 00:44:06 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2018-12-25 00:44:06 +0000 |
| commit | 650d927a14a015ef7954fbb3e7992e440f02b88f (patch) | |
| tree | eb0d0b74b24f42694bb9865d253fb50db3be5b06 /Graphics/GLSLTools | |
| parent | Updated ios.toolchain.cmake (diff) | |
| download | DiligentCore-650d927a14a015ef7954fbb3e7992e440f02b88f.tar.gz DiligentCore-650d927a14a015ef7954fbb3e7992e440f02b88f.zip | |
Fixed shader version when compiling glsl in Vulkan on Mac
Diffstat (limited to 'Graphics/GLSLTools')
| -rw-r--r-- | Graphics/GLSLTools/src/GLSLSourceBuilder.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp index b8c4a95d..a395b67c 100644 --- a/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp +++ b/Graphics/GLSLTools/src/GLSLSourceBuilder.cpp @@ -51,8 +51,14 @@ String BuildGLSLSourceString(const ShaderCreationAttribs& CreationAttribs, Targe # error Unexpected platform # endif #elif PLATFORM_MACOS + if (TargetCompiler == TargetGLSLCompiler::glslang) + GLSLSource.append("#version 430 core\n"); + else if (TargetCompiler == TargetGLSLCompiler::driver) + GLSLSource.append("#version 410 core\n"); + else + UNEXPECTED("Unexpected target GLSL compiler"); + GLSLSource.append( - "#version 410 core\n" "#define DESKTOP_GL 1\n" "#define PLATFORM_MACOS 1\n" ); |
