Skip to content

Commit

Permalink
Fixed shader version when compiling glsl in Vulkan on Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
TheMostDiligent committed Dec 25, 2018
1 parent 4b190e5 commit 650d927
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Graphics/GLSLTools/src/GLSLSourceBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
Expand Down

0 comments on commit 650d927

Please sign in to comment.