[Refactor] (P13): Espryt's frontend-keyed slot-table entries and the apply-thread refusals go, death notices release twins by handle, and the link ratchet refuses any '# P13' line (49 -> 36 symbols).

This commit is contained in:
2026-10-06 20:55:16 -04:00
parent 556ff46601
commit fa77b1874f
21 changed files with 492 additions and 2498 deletions
+12
View File
@@ -781,6 +781,18 @@ namespace MobileGL::MG_Pipe {
return (appliers.fetch_add(1, std::memory_order_relaxed) + 1) << 40;
}
namespace {
std::atomic<MGPipeCompileEnvChangedHook> g_compileEnvChangedHook{nullptr};
}
void MGPipeSetCompileEnvChangedHook(MGPipeCompileEnvChangedHook hook) {
g_compileEnvChangedHook.store(hook, std::memory_order_release);
}
void MGPipeNotifyCompileEnvChanged() {
if (const auto hook = g_compileEnvChangedHook.load(std::memory_order_acquire)) hook();
}
MGPipeApplierState& MGPipeApplier() {
const MGPipeApplierKeyResolver resolve = g_applierKeyResolver;
if (resolve == nullptr) return g_defaultApplier;
+10
View File
@@ -1019,6 +1019,16 @@ namespace MobileGL::MG_Pipe {
// is byte-for-byte the old behaviour.
MGPipeApplierState& MGPipeApplier();
// P13 W6: the backend's "my capabilities changed" notice, without naming the frontend. A
// backend whose advertised limits / extensions move after a context exists (Magma's caps
// re-query) calls MGPipeNotifyCompileEnvChanged(); the frontend registers the hook that
// invalidates its shader compile environment (PipeFill.cpp, static registration). Under a
// transport no hook is registered on the server side and the client invalidates on the caps
// re-publication instead (CONTRACT-P5C §4.2), so the notice is a no-op there.
using MGPipeCompileEnvChangedHook = void (*)();
void MGPipeSetCompileEnvChangedHook(MGPipeCompileEnvChangedHook hook);
void MGPipeNotifyCompileEnvChanged();
// =====================================================================================
// P14 S5 (docs/Disaggregated/design/11-state-ownership.md): WHOSE APPLIER IS IT?
// =====================================================================================