Support multiple source languages, adding HLSL as an option.

This commit is contained in:
John Kessenich 2016-03-12 18:34:36 -07:00
parent 4d65ee31a6
commit 66e2faf844
7 changed files with 54 additions and 17 deletions

View file

@ -86,7 +86,7 @@ typedef enum {
EShLangFragment,
EShLangCompute,
EShLangCount,
} EShLanguage;
} EShLanguage; // would be better as stage, but this is ancient now
typedef enum {
EShLangVertexMask = (1 << EShLangVertex),
@ -99,6 +99,12 @@ typedef enum {
namespace glslang {
typedef enum {
EShSourceNone,
EShSourceGlsl,
EShSourceHlsl,
} EShSource; // if EShLanguage were EShStage, this could be EShLanguage instead
const char* StageName(EShLanguage);
} // end namespace glslang
@ -132,6 +138,7 @@ enum EShMessages {
EShMsgSpvRules = (1 << 3), // issue messages for SPIR-V generation
EShMsgVulkanRules = (1 << 4), // issue messages for Vulkan-requirements of GLSL for SPIR-V
EShMsgOnlyPreprocessor = (1 << 5), // only print out errors produced by the preprocessor
EShMsgReadHlsl = (1 << 6), // use HLSL parsing rules and semantics
};
//