mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-18 23:43:23 +09:00
[Fix] (P11 M2, Espryt, Magma): the texture emitter carries a level's exact dirty footprint as its regions (dev 9524c688) - a single partial box as one region, only a whole-level write as none - so both servers upload exactly the texels written over GPU content; the applier keeps it exact up to 4096 regions, and Espryt's handle arm applies the storage's box-or-rects cut-offs itself while its texture holds no GPU writes
This commit is contained in:
@@ -901,9 +901,18 @@ namespace MobileGL::MG_Pipe {
|
||||
for (MGPipeResourceRecord::PendingUpload& entry : stored.PendingUploads) {
|
||||
if (entry.UploadTarget != record.Target || entry.Level != record.Level) continue;
|
||||
entry.UnionBox = UnionOfBoxes(entry.UnionBox, record.UnionBox);
|
||||
if (record.RegionCount == 0 || entry.Regions.empty() ||
|
||||
static_cast<Uint64>(entry.Regions.size()) + record.RegionCount >
|
||||
kMGPipeMaxPendingUploadRegions) {
|
||||
if (record.RegionCount == 0 || entry.Regions.empty()) {
|
||||
// A whole-level contribution (the emitter's only box-only spelling since P11
|
||||
// M2) owns every texel of the level, so the entry is that box, exactly.
|
||||
entry.Regions.clear();
|
||||
return true;
|
||||
}
|
||||
if (static_cast<Uint64>(entry.Regions.size()) + record.RegionCount > kMGPipeMaxPendingUploadRegions) {
|
||||
// The one lossy answer left: the box covers every texel the list named, and
|
||||
// also the gaps between them (see kMGPipeMaxPendingUploadRegions).
|
||||
MGLOG_W_ONCE("MGPipe: a texture level's pending upload outgrew %u regions and becomes its union "
|
||||
"box, which spans the gaps between the writes",
|
||||
kMGPipeMaxPendingUploadRegions);
|
||||
entry.Regions.clear();
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user