mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 18:13:23 +09:00
[Feature] (SharedImage): GPU-side fences between sessions on Espryt and Magma, no CPU wait at present
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user