Revert "[Fix] (MG_State/Program): use vector to save uniforms instead"

This reverts commit bfb62872c9.
This commit is contained in:
2025-08-13 17:05:21 +08:00
parent bfb62872c9
commit 09d1e035ed
3 changed files with 7 additions and 17 deletions
@@ -67,12 +67,7 @@ namespace MobileGL {
root->traverse(&traverser);
auto& symbols = traverser.GetCollectedSymbols();
for (const auto& symbol : symbols) {
auto layoutLoc = symbol->getQualifier().layoutLocation;
if (layoutLoc >= m_uniforms.size()) {
m_uniforms.reserve(std::bit_ceil(layoutLoc));
m_uniforms.resize(layoutLoc + 1);
}
m_uniforms[layoutLoc] = symbol->getName().c_str();
m_uniforms[symbol->getName().c_str()] = symbol->getQualifier().layoutLocation;
}
return true;
@@ -73,7 +73,7 @@ namespace MobileGL {
const ShaderStage m_stage;
String m_source;
SharedPtr<glslang::TShader> m_shader;
Vector<String> m_uniforms;
UnorderedMap<String, Int> m_uniforms;
String m_infoLog;
Bool m_deleteStatus = false;