mirror of
https://github.com/ARMSX2/ARMSX2.git
synced 2026-08-24 16:50:16 -07:00
Update() already flushed queued draws before uploading, but the two other paths that write texture contents from outside the device did not: Map(), which the texture cache uses to stream uploads straight into a surface, and GenerateMipmap(), which reads every level and writes the smaller ones. Map() takes the same non-virtual wrapper treatment as the GSDevice entry points - the backend override becomes a protected DoMap(), so a backend cannot be reached without passing through the flush, and one that misses the rename fails to compile as abstract. GenerateMipmap() needs no such change: its only caller is the non-virtual GenerateMipmapsIfNeeded(), so guarding that one site covers all six backends and leaves the overrides untouched. Both use the narrow FlushDeferredDrawsFor(this) rather than a full flush, for the reason Update() does - the overwhelming majority of uploads are into a surface the queue has never seen.