CustomPipeline: Mark arrays as constexpr
Ensures that these go into the ro section.
This commit is contained in:
parent
59211589b9
commit
7096f99f79
|
@ -17,15 +17,17 @@ namespace
|
|||
{
|
||||
bool IsQualifier(std::string_view value)
|
||||
{
|
||||
static std::array<std::string_view, 7> qualifiers = {"attribute", "const", "highp", "lowp",
|
||||
"mediump", "uniform", "varying"};
|
||||
static constexpr std::array<std::string_view, 7> qualifiers = {
|
||||
"attribute", "const", "highp", "lowp", "mediump", "uniform", "varying",
|
||||
};
|
||||
return std::find(qualifiers.begin(), qualifiers.end(), value) != qualifiers.end();
|
||||
}
|
||||
|
||||
bool IsBuiltInMacro(std::string_view value)
|
||||
{
|
||||
static std::array<std::string_view, 5> built_in = {"__LINE__", "__FILE__", "__VERSION__",
|
||||
"GL_core_profile", "GL_compatibility_profile"};
|
||||
static constexpr std::array<std::string_view, 5> built_in = {
|
||||
"__LINE__", "__FILE__", "__VERSION__", "GL_core_profile", "GL_compatibility_profile",
|
||||
};
|
||||
return std::find(built_in.begin(), built_in.end(), value) != built_in.end();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue