mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 16:31:57 +09:00
[MG_Backend, MG_Remote, MG_Impl, MG_State] (Disaggregated): P5c hd - sinks and twins resolve by the handle the record carried
A split-only verb-handle workspace in MGPipeApplierState (written by the sinks before
dispatch, read by the backend within the same verb) carries the record's handles to the
backend entries whose shared function-table signatures cannot grow them without moving
G1. OnBlit resolves ReadFbo/DrawFbo through the FBO twin table by handle (the named arm
of BlitFramebuffer, a loud refusal when the backend does not consume it) and the split
path's ScopedBlitBindings rebinding is deleted; CopyTex resolves MGPCopyFromFramebuffer::Dst;
the mip descriptor check resolves MGPMipPlan::Res; the indirect families resolve their
buffer handles from the records and read the bytes from the server staged shadow with
RequireStagedCoverage. EnsureBufferResourceForHandle answers HasDefinedContent from
Desc.HasDefinedContent OR the staged coverage set (the streaming idiom defines content
through subdata with no new descriptor). The minting GetOrCreate(StatePtr), HandleOf and
the death switch's lifetime-id arms take Fatal{RoleViolation, MGPipeSlots} from the apply
thread, as do the three MGPipeSlots() entry points; the frontend BufferObject legacy
accessors take Fatal{RoleViolation, buffer-legacy-arm}; Magma's four caps reads go to the
server's own backend and the client-mirror fallback arm is a named refusal.
Evidence: unit 2156/2156 (incl. 9 new RemoteF1 + 10 new RemoteGuards death tests pinning
the four Fatal names); monolith smoke green; six production mutations each turned their
named test red and were restored; c1f_redcheck M5 RED then RESTORED GREEN. The mip
descriptor check overlaps tx and is coordinated at the merge (tx's sync rekey wins the
sync body, this handle resolution wins the identity check). CONTRACT-P5C section 3.
This commit is contained in:
@@ -419,22 +419,26 @@ TEST(RemoteClientControls, BoundPackBufferOffsetReadRefusesByName) {
|
||||
}
|
||||
|
||||
TEST(RemoteClientControls, ServerRoleRespecifyDoesNotEmitClientInitialBytes) {
|
||||
// P5c (hd): the in-process server-role drive itself is now refused by name. The emit
|
||||
// path's first move is the client allocator's Acquire for the buffer's handle, and with
|
||||
// an active transport that entry is Fatal{RoleViolation, "MGPipeSlots"} from the apply
|
||||
// thread (CONTRACT-P5C §3.1, rule E). "No client initial bytes" therefore holds the
|
||||
// strong way - there is no client-emitter path for the server role to reach at all; ev's
|
||||
// SEG_EVENT producers are what replaces the mechanism this case used to drive.
|
||||
const auto child = RunInChild([] {
|
||||
CapsPeer backend;
|
||||
Srv::ServerSessionInstance().SetBackend(&backend);
|
||||
StartControlSession();
|
||||
MG_Config::Features.PipePush |= kMGPipeSubsystemResources;
|
||||
const auto before = ClientWireRecordsEmitted();
|
||||
if (Srv::ServerLoopInstance().RunOnApplyThread([](void*) {
|
||||
Srv::ServerLoopInstance().RunOnApplyThread([](void*) {
|
||||
MG_State::GLState::BufferObject buffer(701);
|
||||
Uint8 data[64]{};
|
||||
buffer.Respecify(sizeof(data), data);
|
||||
return MOBILEGL_OK;
|
||||
}, nullptr) != MOBILEGL_OK) ::_exit(92);
|
||||
if (ClientWireRecordsEmitted() != before) ::_exit(93);
|
||||
}, nullptr);
|
||||
ClientSessionInstance().Stop();
|
||||
});
|
||||
ExpectChildSuccess(child);
|
||||
ExpectNamedAbort(child, "Fatal{RoleViolation, \"MGPipeSlots\"}");
|
||||
}
|
||||
|
||||
TEST(RemoteClientControls, HeaderOnlyDynamicStateCrossesWithoutBlobMissing) {
|
||||
@@ -451,34 +455,33 @@ TEST(RemoteClientControls, HeaderOnlyDynamicStateCrossesWithoutBlobMissing) {
|
||||
}
|
||||
|
||||
TEST(RemoteClientControls, ServerRoleFlushDoesNotRunTheClientSubDataFollowup) {
|
||||
// P5c (hd): same refusal as the respecify sibling above - a server-role flush reaching the
|
||||
// client emit path is stopped at the allocator entry before any follow-up question arises
|
||||
// (Fatal{RoleViolation, "MGPipeSlots"}; ev's events replace the mechanism).
|
||||
const auto child = RunInChild([] {
|
||||
CapsPeer backend;
|
||||
Srv::ServerSessionInstance().SetBackend(&backend);
|
||||
StartControlSession();
|
||||
MG_Config::Features.PipePush |= kMGPipeSubsystemResources;
|
||||
const auto rc = Srv::ServerLoopInstance().RunOnApplyThread([](void*) {
|
||||
static int subdata = 0, flushes = 0;
|
||||
Srv::ServerLoopInstance().RunOnApplyThread([](void*) {
|
||||
MGPipeResourceOps ops{};
|
||||
ops.Create = [](MGPipeHandle, const MGPResourceDesc&) {};
|
||||
ops.Respecify = [](MGPipeHandle, const MGPResourceDesc&, const void*) {};
|
||||
ops.SubData = [](MGPipeHandle, const MGPSubData&, const void*) { ++subdata; };
|
||||
ops.FlushRange = [](MGPipeHandle, const MGPFlushRange&, const void*) { ++flushes; };
|
||||
ops.SubData = [](MGPipeHandle, const MGPSubData&, const void*) {};
|
||||
ops.FlushRange = [](MGPipeHandle, const MGPFlushRange&, const void*) {};
|
||||
ops.Destroy = [](MGPipeHandle) {};
|
||||
MGPipeSetResourceOps(&ops);
|
||||
{
|
||||
MG_State::GLState::BufferObject buffer(702);
|
||||
buffer.Resize(64);
|
||||
subdata = flushes = 0;
|
||||
MGPipeEmitResourceFlushRange(buffer, 16, 16, 0);
|
||||
if (subdata != 0 || flushes != 1) ::_exit(95);
|
||||
}
|
||||
MGPipeSetResourceOps(nullptr);
|
||||
return MOBILEGL_OK;
|
||||
}, nullptr);
|
||||
if (rc != MOBILEGL_OK) ::_exit(96);
|
||||
ClientSessionInstance().Stop();
|
||||
});
|
||||
ExpectChildSuccess(child);
|
||||
ExpectNamedAbort(child, "Fatal{RoleViolation, \"MGPipeSlots\"}");
|
||||
}
|
||||
// Uses the shipped EGL/GL frontend and real DirectGLES driver. Invoked explicitly by the
|
||||
// package gate because a native driver is not a prerequisite of the unit lane.
|
||||
|
||||
Reference in New Issue
Block a user