[Feat] (MG_Remote): a read into a pixel pack buffer crosses as read_pixels_to_buffer / get_texture_image_to_buffer and waits for nothing - the server lands the rows through the buffer-write gate on both backends, the client marks the buffer GPU-written, and a device lost with the write still owed ends in Fatal{ReadbackDeclined, "buffer-writeback"}

This commit is contained in:
2026-09-29 02:02:29 -04:00
parent ad705a7392
commit 6485ae1dc0
28 changed files with 1152 additions and 58 deletions
+14 -1
View File
@@ -261,7 +261,9 @@ namespace MobileGL::MG_Remote::Wire {
X(ObjectDeath, MGPHandleOnly) \
X(SetContextValues, MGPContextValues) \
X(SetProgramBindings, MGPProgramBindings) \
X(DeleteStreamOutput, MGPStreamOutputBind)
X(DeleteStreamOutput, MGPStreamOutputBind) \
X(ReadPixelsToBuffer, MGPReadbackToBuffer) \
X(GetTextureImageToBuffer, MGPReadbackToBuffer)
namespace {
@@ -2461,6 +2463,17 @@ namespace MobileGL::MG_Remote::Wire {
case MGPWireOp::DeleteStreamOutput:
return m_verbs && m_verbs->OnDeleteStreamOutput(*static_cast<const MGPStreamOutputBind*>(payload));
// P9 (CONTRACT-P9.md §1): the pack-buffer readbacks. No reply sink on purpose - the
// destination is a resource handle and nothing is answered - so a sink that wanted
// one could only be reading the wrong row.
case MGPWireOp::ReadPixelsToBuffer:
return m_verbs != nullptr &&
m_verbs->OnReadPixelsToBuffer(*static_cast<const MGPReadbackToBuffer*>(payload));
case MGPWireOp::GetTextureImageToBuffer:
return m_verbs != nullptr &&
m_verbs->OnGetTextureImageToBuffer(*static_cast<const MGPReadbackToBuffer*>(payload));
case MGPWireOp::SetStorageBlockBinding: {
// The block name is the ONE string on the wire (CONTRACT-P5B.md i1): a kHasBlob
// record whose blob is the NUL-terminated name, Size = strlen + 1, staged whole in