From 650d927a14a015ef7954fbb3e7992e440f02b88f Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 24 Dec 2018 16:44:06 -0800 Subject: Fixed shader version when compiling glsl in Vulkan on Mac --- Graphics/GLSLTools/src/GLSLSourceBuilder.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Graphics/GLSLTools') 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" ); -- cgit v1.2.3