[Fix] (MG_Util, MG_State): five latent frontend bugs the async work made load-bearing

- SpvcSession's move constructor and move assignment dropped the parsed
  metadata, so a moved-to session silently reported empty reflection.
- ParseComputeLocalSize used std::stoull, whose std::out_of_range escaped
  glCompileShader on an oversized local_size literal; now std::from_chars
  saturating to UINT_MAX, pinned by a regression test that reproduced the
  escaping exception.
- The compute local_size std::regex was rebuilt on every compile; hoisted.
- LinkProgram dumped every shader's full source through MGLOG_D per link.
- glslang::FinalizeProcess ran before the GL context tore down, leaving the
  context's live TShaders pointing at freed builtin symbol tables.
This commit is contained in:
BZLZHH
2026-08-08 05:28:28 -04:00
parent 9152e88734
commit d6caed7822
5 changed files with 57 additions and 7 deletions
@@ -138,6 +138,9 @@ namespace MobileGL {
std::swap(this->resources, that.resources);
std::swap(this->reflectModule, that.reflectModule);
std::swap(this->reflectModuleValid, that.reflectModuleValid);
// ParseMetaData() fills `metadata`, and GetMetadata() is read through the
// moved-to session: leaving it behind silently returns an empty reflection.
std::swap(this->metadata, that.metadata);
}
SpvcSession& SpvcSession::operator=(SpvcSession&& that) {
@@ -149,6 +152,7 @@ namespace MobileGL {
std::swap(this->resources, that.resources);
std::swap(this->reflectModule, that.reflectModule);
std::swap(this->reflectModuleValid, that.reflectModuleValid);
std::swap(this->metadata, that.metadata);
return *this;
}