mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Fix] (SharedImage): uploads into a texture bound to a shared image are written into the image, and a producer's flush sends them first
This commit is contained in:
@@ -2371,7 +2371,12 @@ namespace MobileGL::MG_Pipe {
|
||||
// the mask arrives - and by construction only the non-storage fields differ.
|
||||
record->Desc = desc;
|
||||
// A shared image is the storage this call replaces - unless the call replaces none.
|
||||
if (level != nullptr || !metadataOnly) record->SharedImageId = 0;
|
||||
if ((level != nullptr || !metadataOnly) && record->SharedImageId != 0) {
|
||||
MGLOG_D("MGPipe: texture %u leaves shared image %llu: a respecify (%s) redefined its storage",
|
||||
desc.GlNameForDiag, static_cast<unsigned long long>(record->SharedImageId),
|
||||
level != nullptr ? "one level" : "whole resource");
|
||||
record->SharedImageId = 0;
|
||||
}
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
if (level != nullptr && desc.Target != static_cast<Uint8>(MGPipeResourceTarget::TexBuffer)) {
|
||||
// Scope and BufOffset/BufSize are transient respecify carriers, not resource state.
|
||||
|
||||
@@ -266,6 +266,11 @@ namespace MobileGL::MG_Pipe {
|
||||
void MGPipeClientFinish();
|
||||
// Submit a stream link's published prefix; never wait for appliedSeq.
|
||||
void MGPipeClientFlush();
|
||||
// The texture sub-data drain of a validate point, outside one: a shared-image producer's
|
||||
// glFlush (an X server's PutImage into a window pixmap is followed by no draw of its own)
|
||||
// has to get its uploads to the server before the flush publishes the images. Gated as the
|
||||
// validate point's drain is; a no-op on a monolith and on the server role.
|
||||
void MGPipeClientDrainTextureUploads();
|
||||
|
||||
// A FRESH SESSION REPLACES AN ENDED ONE (a device loss recovered, or an eglTerminate /
|
||||
// eglInitialize): every client-side answer to "what does the server hold" describes the
|
||||
|
||||
Reference in New Issue
Block a user