[Refactor] (P13 W5 S3): the record stores' includes and the slot tables' refusals follow the record-arm guard.

This commit is contained in:
2026-10-06 11:50:26 -04:00
parent b26167a095
commit d00d5c9416
7 changed files with 29 additions and 15 deletions
@@ -28,9 +28,13 @@
// The draw path's attribute-values sync reads Archive->Link, so this TU needs it complete -
// Managers.cpp already includes it for ProgramArchiveSource, which is the same reason.
#include <MG_State/GLState/ProgramState/ProgramArtifactsCodec.h>
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
// P5c (tx): §1's server-side per-level extent derivation, for GenerateMipmap's shape reads.
#include <MG_Backend/Record/StagedTextureStore.h>
// The record arm's deaths and latches (MGPipeRecordFail / MGPipeRecordLatch), in every build.
#include <MG_Pipe/PipeSessionFail.h>
#endif
#if MOBILEGL_BUILD_DISAGGREGATED
// Shared images: the registry the EGLImages are built from (SharedImageImpl below).
#include <MG_Remote/Server/SharedImageRegistry.h>
// Device loss ends the session through MG_Pipe's latch seam (LatchIfDeviceLost).
+3 -1
View File
@@ -18,11 +18,13 @@
// needs only the name - the deleter is captured where the archive is constructed - but the
// program build reads through it, so the one translation unit that does needs the whole type.
#include <MG_State/GLState/ProgramState/ProgramArtifactsCodec.h>
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
// R-11's server-owned staging copy. Header-only and package v1's; see its own header block for
// why GLESBufferResource does not simply gain a member.
#include <MG_Backend/Record/StagedShadow.h>
#include <MG_Backend/Record/StagedTextureStore.h>
#endif
#if MOBILEGL_BUILD_DISAGGREGATED
#include <MG_Remote/Server/ServerLoop.h>
// P5c (ct): object_death's producer (CONTRACT-P5C.md §5.2) - the death notice's split arm
// emits the record through the client's emit helper instead of hopping a stack struct to the
+6 -4
View File
@@ -30,6 +30,8 @@
// so a forward declaration would not do. Push-only, like everything else P4a adds to this
// header, so the pull build's include graph is unchanged (D-P).
#include <MG_Pipe/PipeApply.h>
// P13 W5: the record arm's deaths (the slot tables' handle refusals below), in every build.
#include <MG_Pipe/PipeSessionFail.h>
namespace MobileGL::MG_Backend::DirectGLES {
String EmulateBaseInstanceInVertexShader(String source, GLenum shaderType);
@@ -477,8 +479,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
if (MG_Pipe::MGPipeHandleIsNull(handle)) return nullptr;
if (handle.Slot >= SlotTable::kMaxHandleSlot) {
#if MOBILEGL_BUILD_RECORD_ARM
MG_Pipe::MGPipeSessionFail( // @Ph-declined (ID-P7-1): PH-2 stays Fatal, CONTRACT-P7 §12
MG_Pipe::MGPipeFatalFamily::ProtocolCorruption,
MG_Pipe::MGPipeRecordFail( // @Ph-declined (ID-P7-1): PH-2 stays Fatal, CONTRACT-P7 §12
MG_Pipe::MGFatalFamily::ProtocolCorruption,
"MGPipe: Fatal{ProtocolCorruption, \"BackendSlotTable.HandleSlot\"} - "
"GetOrCreateByHandle named slot %u, past this table's %u bound",
handle.Slot, SlotTable::kMaxHandleSlot);
@@ -489,8 +491,8 @@ namespace MobileGL::MG_Backend::DirectGLES {
const Uint32 liveGen = m_slotTables.LiveGenAt(handle.Slot);
if (liveGen != 0 && liveGen > handle.Gen) {
#if MOBILEGL_BUILD_RECORD_ARM
MG_Pipe::MGPipeSessionFail( // @Ph-declined (ID-P7-1): PH-2 stays Fatal, CONTRACT-P7 §12
MG_Pipe::MGPipeFatalFamily::ProtocolCorruption,
MG_Pipe::MGPipeRecordFail( // @Ph-declined (ID-P7-1): PH-2 stays Fatal, CONTRACT-P7 §12
MG_Pipe::MGFatalFamily::ProtocolCorruption,
"MGPipe: Fatal{ProtocolCorruption, \"BackendSlotTable.Generation\"} - "
"GetOrCreateByHandle named generation %u at slot %u, behind live generation %u",
handle.Gen, handle.Slot, liveGen);
@@ -12,7 +12,7 @@
#include "VulkanRenderer.h"
#include "MG_Util/Metrics/PipeStats.h"
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
#include "MG_Pipe/MGPipeCallbacks.h"
#include "MG_Pipe/PipeApply.h"
#include <MG_Backend/Record/StagedShadow.h>
@@ -18,16 +18,18 @@
#include "MG_Util/Metrics/PipeStats.h"
#include <Config.h>
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
// P5f (fm): the handle-keyed texture arm's two sources - the applier's resource records
// (shape) and the server's staged-texture store (texels).
#include <MG_Pipe/PipeApply.h>
#include <MG_Backend/Record/StagedTextureStore.h>
// Shared images: a texture whose level 0 is a server-allocated AHardwareBuffer.
#include <MG_Remote/Server/SharedImageRegistry.h>
#include "../DirectVulkan.h"
// P7 wave 2 package B3: rule I's tally for the silent exits on this file's wire arm.
#include "WireDeclineTally.h"
#endif
#if MOBILEGL_BUILD_DISAGGREGATED
// Shared images: a texture whose level 0 is a server-allocated AHardwareBuffer.
#include <MG_Remote/Server/SharedImageRegistry.h>
#if defined(__ANDROID__)
#include <android/hardware_buffer.h>
#endif
@@ -42,15 +42,12 @@
#include "MG_Util/SelfTest/PrimitivesGeneratedNoXfbProbe.h"
#include "MG_Util/Texture/PixelStoreProcessor.h"
#include <Config.h>
#if MOBILEGL_BUILD_DISAGGREGATED
#if MOBILEGL_BUILD_RECORD_ARM
// P7 wave 0: the seam WireFramebuffer.inc's MagmaWireFatal and WireDraw.inc's
// WireBufferLegacyFatal die through. Declared by MG_Pipe on purpose - see PipeSessionFail.h.
#include <MG_Pipe/PipeSessionFail.h>
// P5c (T5 / tx): the server's staged-texture shadow GenerateMipmap defines its chain on.
#include <MG_Backend/Record/StagedTextureStore.h>
#include <MG_Remote/Server/ServerLoop.h>
// Shared images: the present side resolves the image it imports (WireSharedImage.inc).
#include <MG_Remote/Server/SharedImageRegistry.h>
// P5c (G6): the named-blit arm's endpoint resolution runs inside the frontend-keyed scope.
#include <MG_Impl/Pipe/SlotAllocator.h>
// P7 wave 2 package B3: rule I's tally for WireDraw.inc's silent draw drops.
@@ -59,6 +56,11 @@
#include "WireDepthResolveArm.h"
#include "WireDepthResolveProbe.h"
#endif
#if MOBILEGL_BUILD_DISAGGREGATED
#include <MG_Remote/Server/ServerLoop.h>
// Shared images: the present side resolves the image it imports (WireSharedImage.inc).
#include <MG_Remote/Server/SharedImageRegistry.h>
#endif
#include <algorithm>
#include <bit>
#include <cstdlib>
+3 -1
View File
@@ -49,9 +49,11 @@
#include <MG_Remote/Client/ClientSession.h>
#include <MG_Remote/Server/ServerLoop.h>
#include <MG_Remote/Server/ServerSession.h>
#include <MG_Backend/Record/StagedTextureStore.h>
#include <MG_Remote/CapsCodec.h>
#endif
#if MOBILEGL_BUILD_RECORD_ARM
#include <MG_Backend/Record/StagedTextureStore.h>
#endif
#include <algorithm>
#include <atomic>