-
Couldn't load subscription status.
- Fork 2.4k
Description
Feature request: Enable SDL_gpu to use textures and other resources created in other processes on the same GPU.
Metal: https://developer.apple.com/documentation/iosurface
Direct3D12: https://learn.microsoft.com/en-us/windows/win32/api/d3d12/nf-d3d12-id3d12device-opensharedhandle
Vulkan: https://registry.khronos.org/vulkan/specs/latest/man/html/VK_KHR_external_memory.html
Use case: CEF provides an accelerated paint function that passes a handle to a shared texture with frame data for a rendered webpage. This is an alternative to the normal approach, which is copying a texture from CPU and then back into the GPU on every frame, which is obviously inefficient and often results in stuttering when streaming video.
However, there's currently no way to create a SDL_GPUTexture from the handle with SDL_gpu, so the only option is write a D3D11 or D3D12 renderer to use instead to benefit from this feature.