Skip to content

Plan for external memory, external semaphores, etc #7819

Open
@SupaMaggie70Incorporated

Description

Is your feature request related to a problem? Please describe.
It would be nice if we could provide a more concise external memory interface. Currently, the Vulkan backend automatically adds the external_memory_win32, external_memory_fd, and external_memory_dma_buf if they are supported, regardless of features. However, this isn't reported as supported features, except for the win32, and as stated, enabling this feature doesn't actually do anything.

This makes it difficult to know if it is safe to use the external_memory_fd extension.

Describe the solution you'd like
We should make external memory features for external_memory_win32, external_memory_fd, and external_memory_dma_buf vulkan extensions.

Also, we should perhaps add a way to use this without requiring to call as_hal, even if the method it is still unsafe. Importing memory this way would be a more involved task for wgpu, but currently, the user has to write backend specific code that is likely to be almost identical across all uses of external memory.

Out of the scope of this issue would also be external memory for DirectX, and metal external memory for metal/vulkan on MacOS/the like.

Describe alternatives you've considered

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions