Commit Graph
3397 Commits
Author SHA1 Message Date
swung0x48 f1d3fa8f1a [MG_Backend] keep the default framebuffer on the image GL last rendered into across a swap
DirectVulkan resolved every default-framebuffer role against
m_imageIndexAcquired. Present() advances that to the image it acquires for
the frame that is about to start, and a present record is kWaitPresent - the
client does not wait for the apply - so a readback belonging to the frame
being presented (the retrace snapshot, taken at the swap call) can be applied
after the acquire and then resolve an image nothing had written. That is the
pure-black sundial-lite DirectVulkan retrace frame; DirectGLES is immune
because the driver keeps handing back the buffer the app drew into.

Split the GL-visible index out (VulkanRenderer::m_defaultFramebufferImageIndex)
and keep it out of the present/acquire path: it only re-points at the acquired
image when something WRITES the default framebuffer (DefaultFramebufferWriteIndex,
called at the FBO-0 render-pass creation, the deferred-clear-free direct writes
and the wire draw/clear/blit resolutions) and is reset on RecreateSwapchain.
Reads - glReadPixels both arms, the parked-clear materialization, a blit or copy
SOURCED from FBO 0, ResolveWireImage's read role (carrying the resolved index in
WireImage) - resolve DefaultFramebufferReadIndex instead, i.e. whatever that is.

A readback that resolves a swapchain image with no recorded write now says so
once (MGLOG_W_ONCE, both arms) instead of silently handing back raw pixels.

New integration scenario DirectVulkan|DirectGLES.DefaultFramebufferAcrossSwap
pins both halves: a readback after a swap still sees the drawn frame, and the
first draw after a swap lands in the image the readback then resolves.
2026-09-20 18:52:08 -04:00
swung0x48 73b37bbe83 [MG_Backend] (DirectGLES): clip view mip generation to the view's layer window
glGenerateMipmap's native arm carries BASE_LEVEL/MAX_LEVEL of the view's own
ES name, so the LEVEL axis was already clipped the way the view describes, but
the layer set it writes is every layer of the storage the view aliases. A
generation through a windowed texture view therefore rewrote the owner's layers
outside the window (F1WireScenario
.GenerateMipmapThroughViewKeepsOwnerLevelsAndLayersOutsideItsWindow).

Both arms now read the window and generate the chain with per-layer blits
between the owner's levels MinLevel + L, over layers
[MinLayer, MinLayer + NumLayers), and leave the native call for the shapes it
already gets right: no view, a view whose layer window covers the whole
storage, a multisample view, and aspects the layer blits do not carry. The
record arm reads the window from the sampler view CSO with the same validation
SyncTextureViewToBackendByRecord uses (Fatal{ProtocolCorruption} on a stale or
foreign record); the monolith arm reads the same numbers off the frontend view
object. ScratchFBOImpl gains EnsureDepthAttachmentLayer for the depth-only
aspect.
2026-09-20 18:47:26 -04:00
swung0x48 8ffb87109a [MGPipe] include the stage-chunk helper where it is called
PipeFill.cpp reaches MG_Remote::Client::MGPipeStageChunkBytes through
GpuWritePending.h, which the TU did not include: the declaration was visible to
the helper's own TU and to no other, so both MobileGL translation units for
PipeFill.cpp failed to compile while the shared objects it defines built fine.

PipeFill.cpp.
2026-09-20 18:46:13 -04:00
swung0x48 bde7624310 [MGPipe, Test] pin the stage-chunk split and the empty-store respecify
ResourceEmit.AWideBufferSubDataSplitsAtTheStageChunkBytes: the walk driven at
MGPipeStageChunkBytesFor's clamp (a quarter of the segment, floored at 4096 and
never above the segment), with the trace's own 128 MiB arena against the default
32 MiB segment - sixteen contiguous ascending pieces, each encodable by the
record builder, covering the range exactly once. The no-session answer (0 = keep
the record's own bound) is asserted beside it.

ResourceEmit.AZeroByteRespecifyDefinesTheStoreAndCarriesNoContent: armed the way
the split-only unit cases are (Transport = InProcess, an op table, and the caps
mirror R-8's liveness gate reads), BufferObject::Respecify(0, nullptr) must not
abort, must land Width == 0 && HasDefinedContent == 1 on the applier, and must
emit no resource_subdata at all. The drive runs in a child because the defect's
verdict is std::abort() and a case that aborts its own binary reports nothing.

MG_Test/Pipe/ResourceEmitTest.cpp.
2026-09-20 18:45:34 -04:00
swung0x48 07f91f352a [MGPipe] carry no initial bytes for an empty store
glBufferData(target, 0, NULL, usage) DEFINES its store - that is not the
orphaning idiom - so HasDefinedContent is set, and MappedData() answers a
non-null pointer for it because the shadow reserves one byte whatever the size
(PipeResource.h:140-143). Reading MappedData() alone therefore put the call on
the split arm's respecify(nullptr)-plus-follow-up shape, whose walk emits
nothing for a zero-length range (ResourceTracker.h:253), and the
InitialBytesNotCarried self-check aborted by name on the first such call in the
bsl-esc-menu trace.

The predicate is 'HasDefinedContent && GetSize() > 0': there are bytes here,
not merely a defined store. The split arm's own condition is untouched - moving
it instead would send the zero-byte case to the UncarriedInitialBytes refusal
in the wire escape.

PipeFill.cpp.
2026-09-20 18:45:29 -04:00
swung0x48 1e7c372e6c [MGPipe] cut buffer content ranges at the stage segment's chunk budget
One resource_subdata record's blob is staged whole in SEG_STAGE, so a range
larger than that arena is Fatal{RingOverrun, SEG_STAGE} at the encoder rather
than a split: the CI traces abort there on a 128 MiB arena's whole-buffer
follow-up against a 32 MiB segment.

- ClientSession::StageCapacityBytes(), the twin of EventRingCapacityBytes, so
  the emitter can size against the arena the codec allocates from.
- MGPipeStageChunkBytes(): clamp(segment/4, 4096, segment), 0 when there is
  nothing to fit (monolith, the server role's own uploads, no session).
- PipeFill.cpp's two buffer content walks take that cap instead of the
  record's own 2^32-1 bound, so an over-long range becomes several contiguous
  ascending records. StagedShadowStore::Adopt already accumulates coverage.

ClientSession.h/.cpp, GpuWritePending.h/.cpp, PipeFill.cpp.
2026-09-20 18:45:24 -04:00
swung0x48 6f0248048d [Docs] add CI/inproc continuation handoff (2026-09-20) 2026-09-20 18:16:45 -04:00
swung0x48 5cbf29b041 [CI] retain failed retrace-split artifacts and read full inventories before cleanup
The remove-artifact-clutter jobs deleted trace fixtures and results while
reading job/artifact inventories through unchecked process substitution, so
a failed GitHub API page looked like 'no failed cases' and fixtures for a
red retrace could be deleted. test.yml cleanup also did not wait for the
retrace-split lane even though those jobs download the same fixtures.

Read both paginated inventories into files before any deletion so an API
failure fails the step, add retrace-split to the cleanup dependencies, and
retain fixtures plus result artifacts for failed cases in all three lanes.
2026-09-20 18:16:44 -04:00
swung0x48 70c8230b3e [MG_Impl, Test] preserve immutable view storage and plan mip generation within base/max levels 2026-09-20 13:10:58 -04:00
swung0x48 ed01f4e31a [MGPipe] preserve explicit mip extents in the shared texture staging owner 2026-09-20 13:02:56 -04:00
swung0x48 2426abb814 [MG_Backend] (Disaggregated): bound mip generation to the logical base and view window 2026-09-20 13:02:51 -04:00
swung0x48 7b92642999 [MG_Backend] (Disaggregated): preserve the untouched aspect of depth stencil resolves 2026-09-20 13:02:04 -04:00
swung0x48 0a91fa4197 [Magma] diagnose unavailable owned mip readback bytes 2026-09-20 12:55:41 -04:00
swung0x48 5310ff62bb [MG_Backend] (Disaggregated): generate packed float mips with native shader blits 2026-09-20 12:51:19 -04:00
swung0x48 d339053ea6 [Magma] reject truncated or overflowing RGB staging before expansion 2026-09-20 12:51:17 -04:00
swung0x48 677922a930 [Tests] pin full texture staging extents beside scattered upload regions 2026-09-20 12:49:50 -04:00
swung0x48 616f3c90d2 [Magma] preserve packed texture storage and read unbacked sparse levels from owned bytes 2026-09-20 12:48:34 -04:00
swung0x48 40c5443fc0 [MGPipe] carry full mutable mip extents independently of dirty upload boxes 2026-09-20 12:46:01 -04:00
swung0x48 0cb0e9af9b [MG_Backend] (Disaggregated): resolve multisample depth and stencil through renderpass2 2026-09-20 12:44:37 -04:00
swung0x48 e2d6e33db4 [MG_Backend, MG_Impl] complete GLES XFB lifetimes, lazy readback and sampler windows 2026-09-20 12:43:07 -04:00
swung0x48 c3a5d2f58e [MG_Pipe] preserve image-unit slots and publish named storage-binding programs 2026-09-20 12:41:29 -04:00
swung0x48 ec4ca06d1e [MG_Backend] (Disaggregated): resolve multisample color through submission-owned scratch images 2026-09-20 12:31:28 -04:00
swung0x48 c7de0dffc1 [MG_Test] pin every migrated query and XFB deletion verb boundary 2026-09-20 12:30:52 -04:00
swung0x48 1389e8e7f6 [MG_Backend] (Disaggregated): resolve cube face attachments from their wire upload target 2026-09-20 12:27:32 -04:00
swung0x48 5922e54b47 [Magma] provide native placeholders for unbound wire image descriptors 2026-09-20 12:21:36 -04:00
swung0x48 4610b573f4 [MG_Remote] (Disaggregated): gate timer caps before renderer creation and advertise native primitive queries 2026-09-20 12:18:08 -04:00
swung0x48 03c6b8c979 [Test] keep texture upload shape coverage on inproc with applied-frame stats boundaries 2026-09-20 12:16:23 -04:00
swung0x48 cf0f77b067 [MG_Backend, Test] isolate native mip completeness during GLES texture readback 2026-09-20 12:13:19 -04:00
swung0x48 347bb90c4a [CI] make migrated client arrays and full inproc status hard gates 2026-09-20 12:07:52 -04:00
swung0x48 bb816906a7 [Magma] resolve copy-image renderbuffer endpoints from wire storage 2026-09-20 12:07:28 -04:00
swung0x48 39e1692861 [MG_Remote, Espryt] copy image regions through server-owned renderbuffer handles 2026-09-20 12:03:47 -04:00
swung0x48 44cac27bbc [MG_Remote] keep synchronous pack replies authoritative in the client buffer 2026-09-20 12:01:01 -04:00
swung0x48 1113298195 [Test] distinguish monolith mechanism controls from inproc GL coverage 2026-09-20 12:00:50 -04:00
swung0x48 f5234b9e7e [Readback] encode signed and half-float depth texture results correctly 2026-09-20 11:59:46 -04:00
swung0x48 8eaebc9091 [MG_Test] (Disaggregated): assert named clear routing and pixel pack results 2026-09-20 11:57:25 -04:00
swung0x48 7f9147aeab [Tests] reject undersized packed GPU readback destinations 2026-09-20 11:56:58 -04:00
swung0x48 859c0efb01 [MG_Remote] validate packed readback bounds before copying GPU replies 2026-09-20 11:56:05 -04:00
swung0x48 70df57bb23 [MG_Remote] (Disaggregated): carry native query results and complete XFB object deletion 2026-09-20 11:52:13 -04:00
swung0x48 c0b40ff508 [MG_Remote] chunk texture replies and cover GPU readback packing 2026-09-20 11:50:47 -04:00
swung0x48 97ce032f7f [CI] make full inproc GPU and trace acceptance primary on disaggregation branches 2026-09-20 11:46:54 -04:00
swung0x48 29b5e0640e [MG_Impl, Espryt] read split texture pixels from server-owned GPU storage 2026-09-20 11:44:00 -04:00
swung0x48 7875e28cd8 [Magma] read texture images into server-owned tight reply bytes 2026-09-20 11:43:49 -04:00
swung0x48 57e0f6bee5 [MG_Backend] (Disaggregated): create GLES texture views from server CSO windows 2026-09-20 11:32:51 -04:00
swung0x48 beba025618 [MG_Impl, MG_Remote] (Disaggregated): own client vertex and index data before draw emission 2026-09-20 11:26:28 -04:00
swung0x48 d0c6fdbc14 [Magma] consume wire-owned transform feedback capture spans 2026-09-20 11:15:58 -04:00
swung0x48 c1bf7e15c3 [MG_Backend] (Disaggregated): preserve server-owned texture contents during GLES image promotion 2026-09-20 11:11:50 -04:00
swung0x48 bb3a51995c [CI, Android] (Disaggregated): run full inproc trace acceptance beside monolith controls 2026-09-20 10:43:06 -04:00
swung0x48 7fd83133c0 [Android] retain trace replay ownership across Activity recreation 2026-09-20 10:32:18 -04:00
swung0x48 10bfd29fc5 [CI] replace E1 pixel races with observed protocol wait controls 2026-09-20 10:27:41 -04:00
swung0x48 08c63f77e2 [Test] wait for the drawing Present before sampling strict-arming statistics 2026-09-20 10:20:36 -04:00