Skip to content

Commit

Permalink
Added GLSL460 to output shader versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Aug 20, 2017
1 parent 8a29fcf commit a798f5d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions inc/Xsc/Targets.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ enum class OutputShaderVersion
GLSL430 = 430, //!< GLSL 4.30 (OpenGL 4.3).
GLSL440 = 440, //!< GLSL 4.40 (OpenGL 4.4).
GLSL450 = 450, //!< GLSL 4.50 (OpenGL 4.5).
GLSL460 = 460, //!< GLSL 4.60 (OpenGL 4.6).
GLSL = 0x0000ffff, //!< Auto-detect minimal required GLSL version (for OpenGL 2+).

ESSL100 = (0x00010000 + 100), //!< ESSL 1.00 (OpenGL ES 2.0). \note Currently not supported!
Expand Down
3 changes: 2 additions & 1 deletion src/Compiler/Targets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ XSC_EXPORT std::string ToString(const OutputShaderVersion shaderVersion)
case OutputShaderVersion::GLSL430: return "GLSL 4.30";
case OutputShaderVersion::GLSL440: return "GLSL 4.40";
case OutputShaderVersion::GLSL450: return "GLSL 4.50";
case OutputShaderVersion::GLSL460: return "GLSL 4.60";
case OutputShaderVersion::GLSL: return "GLSL";

case OutputShaderVersion::ESSL100: return "ESSL 1.00";
Expand Down Expand Up @@ -97,7 +98,7 @@ XSC_EXPORT bool IsLanguageGLSL(const InputShaderVersion shaderVersion)

XSC_EXPORT bool IsLanguageGLSL(const OutputShaderVersion shaderVersion)
{
return ((shaderVersion >= OutputShaderVersion::GLSL110 && shaderVersion <= OutputShaderVersion::GLSL450) || shaderVersion == OutputShaderVersion::GLSL);
return ((shaderVersion >= OutputShaderVersion::GLSL110 && shaderVersion <= OutputShaderVersion::GLSL460) || shaderVersion == OutputShaderVersion::GLSL);
}

XSC_EXPORT bool IsLanguageESSL(const OutputShaderVersion shaderVersion)
Expand Down
5 changes: 3 additions & 2 deletions src/Shell/Command.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ HelpDescriptor VersionOutCommand::Help() const
"-Vout, --version-out VERSION",
R_CmdHelpVersionOut,
(
"GLSL[110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440, 450],\n" \
"ESSL[100, 300, 310, 320],\n" \
"GLSL[110, 120, 130, 140, 150, 330, 400, 410, 420, 430, 440, 450, 460],\n" \
"ESSL[100, 300, 310, 320],\n" \
"VKSL[450]"
),
HelpCategory::Main
Expand All @@ -233,6 +233,7 @@ void VersionOutCommand::Run(CommandLine& cmdLine, ShellState& state)
{ "GLSL430", OutputShaderVersion::GLSL430 },
{ "GLSL440", OutputShaderVersion::GLSL440 },
{ "GLSL450", OutputShaderVersion::GLSL450 },
{ "GLSL460", OutputShaderVersion::GLSL460 },
{ "GLSL", OutputShaderVersion::GLSL },

{ "ESSL100", OutputShaderVersion::ESSL100 },
Expand Down

0 comments on commit a798f5d

Please sign in to comment.