mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Fix, Test] (MG_Remote, MG_Test, CONTRACT): wave 1.5 s1 - ID-47 SEG_REPLY is 16 MiB / 8 slots of 2 MiB and ReplySlotPool::CanHold+RequireReadPixelsFits refuse an oversize ReadPixels at the CLIENT by name (ProtocolSmokeTest pin, CONTRACT row 23); CapsAbiFingerprint IS MixAbiFingerprint over CapsAbiFingerprintInputs and the sensitivity case drives it; the null-union Hello/Welcome frames go THROUGH Accept/StartOverTransportPair; the pad-bit case stamps the bit past Reserve; both death controls name their diagnostic via WireLogFatal (stderr echo); the RSS ledger reads /proc once and keeps its own running peak (GitHub run 35079459114)
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
#include <MG_Util/Debug/Log.h>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
namespace MobileGL::MG_Remote::Client {
|
||||
@@ -150,7 +151,25 @@ namespace MobileGL::MG_Remote::Client {
|
||||
|
||||
// ---- 1. the control plane and the two bells. The transport owns the bells; THE
|
||||
// SESSION owns the rings, and the accessors stay off ITransport (contract §3.9).
|
||||
Transport::InProcessTransport::CreatePair(m_clientTransport, m_serverTransport);
|
||||
std::unique_ptr<Transport::InProcessTransport> clientEnd;
|
||||
std::unique_ptr<Transport::InProcessTransport> serverEnd;
|
||||
Transport::InProcessTransport::CreatePair(clientEnd, serverEnd);
|
||||
return StartOverTransportPair(std::move(clientEnd), std::move(serverEnd));
|
||||
}
|
||||
|
||||
MobileGLResult ClientSession::StartOverTransportPair(
|
||||
std::unique_ptr<Transport::InProcessTransport> clientEnd,
|
||||
std::unique_ptr<Transport::InProcessTransport> serverEnd) {
|
||||
if (m_started) {
|
||||
return MOBILEGL_ERR_INVALID_ARGUMENT;
|
||||
}
|
||||
if (clientEnd == nullptr || serverEnd == nullptr) {
|
||||
MGLOG_E("MG_Remote client: StartOverTransportPair needs both ends of one "
|
||||
"InProcessTransport::CreatePair");
|
||||
return MOBILEGL_ERR_INVALID_ARGUMENT;
|
||||
}
|
||||
m_clientTransport = std::move(clientEnd);
|
||||
m_serverTransport = std::move(serverEnd);
|
||||
m_transport = m_clientTransport.get();
|
||||
|
||||
// ---- 2. Hello. Sent before the server accepts: InProcessTransport queues whole
|
||||
@@ -451,6 +470,15 @@ namespace MobileGL::MG_Remote::Client {
|
||||
|
||||
Uint32 ClientSession::MaxReplyBytes() const { return m_replies.MaxReplyBytes(); }
|
||||
|
||||
Bool ClientSession::ReplyCanHold(Uint64 bytes) const { return m_replies.CanHold(bytes); }
|
||||
|
||||
// ID-47. Forwarded verbatim so that the message, the boundary and the abort are the pool's
|
||||
// and are pinned once, in SessionTest, rather than re-derived per caller.
|
||||
void ClientSession::RequireReadPixelsReplyFits(Uint32 width, Uint32 height, Uint32 format,
|
||||
Uint32 type, Uint64 bytes) const {
|
||||
m_replies.RequireReadPixelsFits(width, height, format, type, bytes);
|
||||
}
|
||||
|
||||
Transport::EventRingConsumer& ClientSession::Events() { return m_events; }
|
||||
|
||||
Transport::RingControl* ClientSession::Control() { return m_shm.CmdControl(); }
|
||||
|
||||
Reference in New Issue
Block a user