mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-10 13:18:31 +09:00
[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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user