mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-20 16:31:57 +09:00
[MG_Backend, MG_IntegrationTest] (P7): the wire watermark's sync point also fires above 1024 parked stores, so small orphans that never reach the byte budget are bounded by count
Measured on bsl-esc-menu-854 (spawn, lavapipe) with the byte watermark alone: the dead VkBuffers at the end fell from 25,935 to 32, but one stretch with no submission still parked 12,498 stores in 39.5 MB - under 64 MiB, so nothing forced a sync. A fixed ceiling (VkBufferManager::kWireDeferredCountCeiling = 1024, not a knob) now rides the same WaitForSubmitIndex call; MOBILEGL_IPC_WIRE_DEFERRED_MB=0 still turns both triggers off. MagmaWireReclaimScenario gains the case: 3000 respecify-and-draw rounds of a 256-byte store in one frame (750 KB, far below the lane's 8 MiB). Red before this commit on inproc and spawn (live peak 3001 vs a bound of 1027), green after (1025, two forced syncs).
This commit is contained in:
@@ -612,7 +612,13 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
|
||||
void VkBufferManager::EnforceWireDeferredWatermark() {
|
||||
const Uint64 budget = static_cast<Uint64>(MG_Config::Ipc.WireDeferredMb) * 1024u * 1024u;
|
||||
if (budget == 0 || m_deferredWireBytes <= budget) return;
|
||||
// TWO TRIGGERS, ONE SWITCH. Bytes are what the knob names, but a VkBuffer costs per
|
||||
// OBJECT as well as per byte, and small orphans never reach a byte budget: measured on
|
||||
// bsl-esc-menu-854 (spawn, lavapipe), one stretch with no submission parked 12,498 stores
|
||||
// in 39.5 MB against 64 MiB. So a fixed count ceiling rides the same sync point; the
|
||||
// knob's 0 turns both off, which keeps it one negative control.
|
||||
if (budget == 0) return;
|
||||
if (m_deferredWireBytes <= budget && m_deferredWireReleases.size() <= kWireDeferredCountCeiling) return;
|
||||
// What is left after the sweep is named by work that is recorded but unsubmitted, or
|
||||
// submitted but unretired. Every entry is tagged at or below the sync point taken HERE,
|
||||
// so waiting it out - the host-access wait's own call, which flushes the recording first
|
||||
|
||||
Reference in New Issue
Block a user