Fix T95278: Crash on startup because of GLSL recursion

Bypassing the defines which are only there for error checking.
This commit is contained in:
Clément Foucault 2022-02-01 19:22:50 +01:00
parent ffb0ecb498
commit 83b6c8f2b1
1 changed files with 2 additions and 0 deletions

View File

@ -415,11 +415,13 @@ std::string GLShader::resources_declare(const ShaderCreateInfo &info) const
}
ss << ";\n";
}
#if 0 /* T95278: This is not be enough to prevent some compilers think it is recursive. */
for (const ShaderCreateInfo::PushConst &uniform : info.push_constants_) {
/* T95278: Double macro to avoid some compilers think it is recursive. */
ss << "#define " << uniform.name << "_ " << uniform.name << "\n";
ss << "#define " << uniform.name << " (" << uniform.name << "_)\n";
}
#endif
ss << "\n";
return ss.str();
}