mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-09-11 13:48:30 +09:00
- EGL swap semantics make the presented colour buffer's content undefined at its next acquire (EGL_BUFFER_DESTROYED, the implementation default) and every ancillary depth/stencil buffer's content undefined after ANY swap, yet the default-FBO render pass reloaded both with LOAD_OP_LOAD every frame; SwapchainObject now tracks per-image content validity (defined when a pass stores into the attachment, invalidated at present) and the render-pass manager turns an undefined attachment's tile load into LOAD_OP_DONT_CARE with initialLayout=UNDEFINED, keyed into both hashes so the cached LOAD variants cannot be hit by mistake - the default framebuffer's depth attachment is now attached ON DEMAND: a draw with depth test and stencil test both disabled (GL: a disabled test neither reads nor writes its buffer), and no pending depth/stencil clear, resolves to a depth-less pass flavour, dropping the D24S8 tile load AND store outright - MC 26.2 renders its GUI into its own FBO and only ever blits colour to the default framebuffer, so its swapchain pass carried a full-screen depth round-trip for nothing - the flavour only escalates: an active depth-full pass absorbs depth-less draws unchanged, while a depth-using draw against a depth-less pass resolves to an incompatible entry and splits, its depth loading DONT_CARE (the content was undefined all along); the depth-less flavour is folded into ComputeHash and the per-draw fast-path memo so the two flavours can never alias