mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-12 14:18:31 +09:00
[Chore] (MG_State/Program): PostLink bisect 2
This commit is contained in:
@@ -139,13 +139,12 @@ namespace MobileGL {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MG_Util::ShaderTranspiler::SpvcSession session(m_programBinary[0]);
|
MG_Util::ShaderTranspiler::SpvcSession session(m_programBinary[0]);
|
||||||
const char* src = nullptr; // we dont care the source atm
|
const char* src = nullptr; // we don't care the source atm
|
||||||
auto result = session.Compile(&src);
|
auto result = session.Compile(&src);
|
||||||
if (result != SPVC_SUCCESS) {
|
if (result != SPVC_SUCCESS) {
|
||||||
assert(false);
|
assert(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
return;
|
|
||||||
m_metadata = session.GetMetadata();
|
m_metadata = session.GetMetadata();
|
||||||
auto& uniformOffsets = m_metadata.plainUniformOffsetsInUBO;
|
auto& uniformOffsets = m_metadata.plainUniformOffsetsInUBO;
|
||||||
for (const auto& [name, offset] : uniformOffsets) {
|
for (const auto& [name, offset] : uniformOffsets) {
|
||||||
@@ -153,13 +152,14 @@ namespace MobileGL {
|
|||||||
assert(m_uniforms[name] < m_uniformOffsets.size());
|
assert(m_uniforms[name] < m_uniformOffsets.size());
|
||||||
m_uniformOffsets[m_uniforms[name]] = offset;
|
m_uniformOffsets[m_uniforms[name]] = offset;
|
||||||
}
|
}
|
||||||
|
m_uboScratch.resize(m_metadata.uboSize, 0);
|
||||||
|
return;
|
||||||
|
|
||||||
m_uniformTypes.resize(uniformOffsets.size());
|
m_uniformTypes.resize(uniformOffsets.size());
|
||||||
for (const auto& [name, type] : m_metadata.plainUniformMemberTypes) {
|
for (const auto& [name, type] : m_metadata.plainUniformMemberTypes) {
|
||||||
m_uniformTypes[m_uniforms[name]] = MG_Util::ConvertSpvcTypeToGLEnum(type);
|
m_uniformTypes[m_uniforms[name]] = MG_Util::ConvertSpvcTypeToGLEnum(type);
|
||||||
}
|
}
|
||||||
|
|
||||||
m_uboScratch.resize(m_metadata.uboSize, 0);
|
|
||||||
}
|
}
|
||||||
} // namespace GLState
|
} // namespace GLState
|
||||||
} // namespace MG_State
|
} // namespace MG_State
|
||||||
|
|||||||
Reference in New Issue
Block a user