[Refactor] (P13 W5 S3): caps source, object death and the Magma wire stores' members follow their real guards.

This commit is contained in:
2026-10-06 12:00:37 -04:00
parent cb81610b2b
commit b050c60b32
3 changed files with 5 additions and 3 deletions
+2
View File
@@ -52,6 +52,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
// apply thread (and these reads all run there), so its cache is the authoritative one.
// Before the session lands, or under monolith transport in a disaggregated build, fall
// back to the process global exactly as the monolith path always has.
#if MOBILEGL_BUILD_DISAGGREGATED
if (MG_Config::Transport != MG_Config::TransportMode::Monolith) {
if (MG_Backend::BackendObject* server = MG_Remote::Server::ServerLoopInstance().Backend()) {
return &server->GetFormatCapabilities();
@@ -66,6 +67,7 @@ namespace MobileGL::MG_Backend::DirectGLES {
"on the apply thread");
std::abort();
}
#endif
return pActiveBackendObject ? &pActiveBackendObject->GetFormatCapabilities() : nullptr;
}
#endif
@@ -431,7 +431,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
}
void BackendObject_DirectVulkan::Initialize() {
#if MOBILEGL_BUILD_RECORD_ARM
#if MOBILEGL_BUILD_DISAGGREGATED
VkBufferManager::RegisterWireResourceOps();
// P7 wave 2 package C (CONTRACT-P7 §5.5). BESIDE the resource ops and for the same
// reason: this is the one place both Magma server roles pass through - the inproc
@@ -68,7 +68,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
SessionLocal<RendererGeneration> g_rendererGeneration;
} // namespace
#if MOBILEGL_BUILD_RECORD_ARM
#if MOBILEGL_BUILD_DISAGGREGATED
namespace {
// P7 wave 2 package C, CONTRACT-P7 §5.5: MAGMA'S MIRROR OF g_glesStateObjectDeathOps
// (DirectGLES/Managers.cpp:335), and the one arm of that table Magma has any work in.
@@ -126,7 +126,7 @@ namespace MobileGL::MG_Backend::DirectVulkan {
Bool StateObjectDeathOpsInstalled() {
return MG_State::GLState::GetStateObjectDeathOps() == &g_magmaStateObjectDeathOps;
}
#endif // MOBILEGL_BUILD_RECORD_ARM && MOBILEGL_PIPE_PUSH
#endif // MOBILEGL_BUILD_DISAGGREGATED
Uint64 GetRendererGeneration() {
return g_rendererGeneration->value.load(std::memory_order_acquire);