mirror of
https://github.com/MobileGL-Dev/MobileGL
synced 2026-11-07 01:53:24 +09:00
[Feature] (SharedImage): zero-copy Wayland windows via linux-dmabuf, EGL dma-buf import, GBM backend, and Espryt/Magma AHB present and texture binding
This commit is contained in:
@@ -560,6 +560,22 @@ namespace MobileGL::MG_Backend::DirectVulkan {
|
||||
return BackendObject::SwapEGLBuffers(dpy, draw);
|
||||
}
|
||||
|
||||
Bool BackendObject_DirectVulkan::BlitDefaultFramebufferToSharedImage(const SharedImageView& image) {
|
||||
#if MOBILEGL_BUILD_DISAGGREGATED
|
||||
// Same lock as SwapEGLBuffers: the copy reads the current surface target's image.
|
||||
const std::lock_guard<std::recursive_mutex> lock(m_eglStateMutex);
|
||||
if (!pVulkanRenderer) {
|
||||
MGLOG_E("DirectVulkan: shared image %llu: the renderer is not initialized",
|
||||
static_cast<unsigned long long>(image.Id));
|
||||
return false;
|
||||
}
|
||||
return pVulkanRenderer->BlitDefaultFramebufferToSharedImage(image);
|
||||
#else
|
||||
(void)image;
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void BackendObject_DirectVulkan::SetEGLSwapInterval(Int interval) {
|
||||
// Same lock as SwapEGLBuffers: the renderer reads the request in Present.
|
||||
const std::lock_guard<std::recursive_mutex> lock(m_eglStateMutex);
|
||||
|
||||
Reference in New Issue
Block a user