Add support for GL_ARB_shading_language_include
Add support for GL_ARB_shading_language_include. Usage is identical to the way GL_GOOGLE_include_directive currently works glslang (since GL_ARB_shading_language_include is inherently a runtime feature and glslang is an offline compiler). Users can simulate their runtime environment by using a custom glslang::TShader::Includer or using filenames that match their GL runtime names. Closes #249.
This commit is contained in:
parent
fa04cdf355
commit
b0df68c490
12 changed files with 59 additions and 6 deletions
|
|
@ -269,6 +269,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
// #line and #include
|
||||
extensionBehavior[E_GL_GOOGLE_cpp_style_line_directive] = EBhDisable;
|
||||
extensionBehavior[E_GL_GOOGLE_include_directive] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shading_language_include] = EBhDisable;
|
||||
|
||||
extensionBehavior[E_GL_AMD_shader_ballot] = EBhDisable;
|
||||
extensionBehavior[E_GL_AMD_shader_trinary_minmax] = EBhDisable;
|
||||
|
|
@ -983,6 +984,8 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
|
|||
updateExtensionBehavior(line, "GL_OES_shader_io_blocks", behaviorString);
|
||||
else if (strcmp(extension, "GL_GOOGLE_include_directive") == 0)
|
||||
updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString);
|
||||
else if (strcmp(extension, "GL_ARB_shading_language_include") == 0)
|
||||
updateExtensionBehavior(line, "GL_GOOGLE_cpp_style_line_directive", behaviorString);
|
||||
// subgroup_* to subgroup_basic
|
||||
else if (strcmp(extension, "GL_KHR_shader_subgroup_vote") == 0)
|
||||
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue