CustomPipeline: Mark arrays as constexpr

Ensures that these go into the ro section.
This commit is contained in:
Lioncash 2024-01-31 22:55:41 -05:00
parent 59211589b9
commit 7096f99f79
1 changed files with 6 additions and 4 deletions

View File

@ -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();
}