Merge pull request #1880 from georgeouzou/master
Add support for GL_ARB_explicit_uniform_location
This commit is contained in:
commit
101ca388fb
7 changed files with 52 additions and 6 deletions
|
|
@ -5149,7 +5149,8 @@ void TParseContext::setLayoutQualifier(const TSourceLoc& loc, TPublicType& publi
|
|||
return;
|
||||
} else if (id == "location") {
|
||||
profileRequires(loc, EEsProfile, 300, nullptr, "location");
|
||||
const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
|
||||
const char* exts[2] = { E_GL_ARB_separate_shader_objects, E_GL_ARB_explicit_attrib_location };
|
||||
// GL_ARB_explicit_uniform_location requires 330 or GL_ARB_explicit_attrib_location we do not need to add it here
|
||||
profileRequires(loc, ~EEsProfile, 330, 2, exts, "location");
|
||||
if ((unsigned int)value >= TQualifier::layoutLocationEnd)
|
||||
error(loc, "location is too large", id.c_str(), "");
|
||||
|
|
@ -5909,8 +5910,9 @@ void TParseContext::layoutQualifierCheck(const TSourceLoc& loc, const TQualifier
|
|||
case EvqBuffer:
|
||||
{
|
||||
const char* feature = "location qualifier on uniform or buffer";
|
||||
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile, feature);
|
||||
profileRequires(loc, ECoreProfile | ECompatibilityProfile, 430, nullptr, feature);
|
||||
requireProfile(loc, EEsProfile | ECoreProfile | ECompatibilityProfile | ENoProfile, feature);
|
||||
profileRequires(loc, ~EEsProfile, 330, E_GL_ARB_explicit_attrib_location, feature);
|
||||
profileRequires(loc, ~EEsProfile, 430, E_GL_ARB_explicit_uniform_location, feature);
|
||||
profileRequires(loc, EEsProfile, 310, nullptr, feature);
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ void TParseVersions::initializeExtensionBehavior()
|
|||
extensionBehavior[E_GL_ARB_texture_cube_map_array] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shader_texture_lod] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_explicit_attrib_location] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_explicit_uniform_location] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shader_image_load_store] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shader_atomic_counters] = EBhDisable;
|
||||
extensionBehavior[E_GL_ARB_shader_draw_parameters] = EBhDisable;
|
||||
|
|
@ -378,6 +379,7 @@ void TParseVersions::getPreamble(std::string& preamble)
|
|||
"#define GL_ARB_texture_cube_map_array 1\n"
|
||||
"#define GL_ARB_shader_texture_lod 1\n"
|
||||
"#define GL_ARB_explicit_attrib_location 1\n"
|
||||
"#define GL_ARB_explicit_uniform_location 1\n"
|
||||
"#define GL_ARB_shader_image_load_store 1\n"
|
||||
"#define GL_ARB_shader_atomic_counters 1\n"
|
||||
"#define GL_ARB_shader_draw_parameters 1\n"
|
||||
|
|
|
|||
|
|
@ -126,6 +126,7 @@ const char* const E_GL_ARB_enhanced_layouts = "GL_ARB_enhanced_layou
|
|||
const char* const E_GL_ARB_texture_cube_map_array = "GL_ARB_texture_cube_map_array";
|
||||
const char* const E_GL_ARB_shader_texture_lod = "GL_ARB_shader_texture_lod";
|
||||
const char* const E_GL_ARB_explicit_attrib_location = "GL_ARB_explicit_attrib_location";
|
||||
const char* const E_GL_ARB_explicit_uniform_location = "GL_ARB_explicit_uniform_location";
|
||||
const char* const E_GL_ARB_shader_image_load_store = "GL_ARB_shader_image_load_store";
|
||||
const char* const E_GL_ARB_shader_atomic_counters = "GL_ARB_shader_atomic_counters";
|
||||
const char* const E_GL_ARB_shader_draw_parameters = "GL_ARB_shader_draw_parameters";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue