[MG_Remote] keep synchronous pack replies authoritative in the client buffer

This commit is contained in:
2026-09-20 12:01:01 -04:00
parent 1113298195
commit 44cac27bbc
3 changed files with 5 additions and 12 deletions
+1
View File
@@ -1009,6 +1009,7 @@ namespace MobileGL::MG_Remote::Client {
if (pbo) {
// pixels is an offset, never a host pointer. Upload only the
// requested rows so PACK padding and untouched bytes survive.
pbo->SyncGpuWrites();
const Uint64 alignment = std::max<Int>(pack.Alignment, 1);
const Uint64 rowPixels = pack.RowLength > 0 ? pack.RowLength : width;
const Uint64 stride = (rowPixels * bytesPerPixel + alignment - 1) / alignment * alignment;