Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Current implementation of qml2puppet handles the cross process image sharing with:
1. Reading back the GPU rendered pixel data to CPU RAM.
2. Moving the pixel data across process boundary to Qt Creator process.
3. Re-uploading the pixel data to the GPU.
This implementation is slow as it involves stalling the GPU pipeline, moving data between two memory systems (twice) unnecessarily etc. A much more efficient implementation is to share the texture directly in GPU from process to process (in most desktop operating systems this can be done with EGL extensions or other extended APIs as zero-copy operation as the GPU kernel driver already "sees" one unified GPU memory from both processes).
On macOS implement IOSurface based texture sharing between qml2puppet and qt-creator processes. To get started see example:
https://developer.apple.com/library/archive/samplecode/MultiGPUIOSurface/Introduction/Intro.html