Using the external memory for Inter-Process Communication (IPC)

Hi all,

I am very new to Vulkan. I would like to implement an Inter-Process Communication (IPC) mechanism in two applications that I am writing, so that they can share an image buffer in the GPU memory. Basically, an image that is being edited in application A and stored in the GPU memory can be displayed in another application B.

It is pointed on a reddit discussion "Inter-process communication on the gpu?" (Sorry I am not able to include links) that Vulkan can do that using VK_KHR_external_memory (and related functionalities). Is this correct? And the next question is, can anyone point out any example to do that?

So far I have only started learning the basic setup from Alexander Overvoorde’s tutorial. I am under the impression that the learning curve for Vulkan is quite steep, so perhaps I still need to understand a number of concepts and do their implementation before reaching that stage.

Many thanks,

VK_KHR_external_memory (resp. Vulkan 1.1) will produce a NT handle, which I assume can be used across processes too.

There’s some example code for the original NV extension:

It’s just memory, so I think you don’t need to understand much. You could just write something in one process via vkMapMemory and read it in the second process and verify. You would only need VkInstance, VkDevice, and export\import the memory; no knowledge of graphics concepts needed.

1 Like

Thank you very much! I will read a bit more about vkMapMemory and also the example that you gave.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.