summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/angle/src/compiler/translator/CodeGen.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdparty/angle/src/compiler/translator/CodeGen.cpp')
-rw-r--r--src/3rdparty/angle/src/compiler/translator/CodeGen.cpp22
1 files changed, 16 insertions, 6 deletions
diff --git a/src/3rdparty/angle/src/compiler/translator/CodeGen.cpp b/src/3rdparty/angle/src/compiler/translator/CodeGen.cpp
index 71056f4297..5e3eb1cc05 100644
--- a/src/3rdparty/angle/src/compiler/translator/CodeGen.cpp
+++ b/src/3rdparty/angle/src/compiler/translator/CodeGen.cpp
@@ -6,7 +6,9 @@
#include "compiler/translator/TranslatorESSL.h"
#include "compiler/translator/TranslatorGLSL.h"
+#ifdef ANGLE_ENABLE_HLSL
#include "compiler/translator/TranslatorHLSL.h"
+#endif // ANGLE_ENABLE_HLSL
//
// This function must be provided to create the actual
@@ -17,14 +19,22 @@ TCompiler* ConstructCompiler(
sh::GLenum type, ShShaderSpec spec, ShShaderOutput output)
{
switch (output) {
- case SH_ESSL_OUTPUT:
+ case SH_ESSL_OUTPUT:
return new TranslatorESSL(type, spec);
- case SH_GLSL_OUTPUT:
- return new TranslatorGLSL(type, spec);
- case SH_HLSL9_OUTPUT:
- case SH_HLSL11_OUTPUT:
+ case SH_GLSL_CORE_OUTPUT:
+ case SH_GLSL_COMPATIBILITY_OUTPUT:
+ return new TranslatorGLSL(type, spec, output);
+ case SH_HLSL9_OUTPUT:
+ case SH_HLSL11_OUTPUT:
+#ifdef ANGLE_ENABLE_HLSL
return new TranslatorHLSL(type, spec, output);
- default:
+#else
+ // This compiler is not supported in this
+ // configuration. Return NULL per the ShConstructCompiler API.
+ return NULL;
+#endif // ANGLE_ENABLE_HLSL
+ default:
+ // Unknown format. Return NULL per the ShConstructCompiler API.
return NULL;
}
}