[Feature] (SharedImage): GPU-side fences between sessions on Espryt and Magma, no CPU wait at present

This commit is contained in:
2026-10-02 10:31:34 -04:00
parent b5cab44100
commit 7520e53b5e
13 changed files with 845 additions and 58 deletions
@@ -3195,7 +3195,10 @@ namespace MobileGL::MG_Backend::DirectVulkan {
// preparing the texture would decline a storage-less one and lose the pass.
if (storage && WireShaderImageNamesNoTexel(*m_textureManager, state.BoundShaderImages[unit]))
continue;
if (!m_textureManager->SyncTextureResourceByHandle(handle, false, storage)) return false;
const auto* resource = m_textureManager->SyncTextureResourceByHandle(handle, false, storage);
if (resource == nullptr) return false;
// Another session writes it: the renderer acquires it before this use.
if (resource->sharedImageId != 0) m_textureManager->NoteSharedImageUse(*resource);
}
}
}