Skip to content

Feature request: Support importing Vulkan textures with different layouts in SDL_CreateTextureWithProperties #14254

@anonymix007

Description

@anonymix007

Currently SDL_PROP_TEXTURE_CREATE_VULKAN_TEXTURE_NUMBER expects

the VkImage with layout VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL associated with the texture

However, external producers such as GStreamer or FFmpeg may produce other layouts (i.e. when Vulkan decoders are used). It would be really convenient to directly import them into SDL_Texture without users having to do the conversion. This feature would be especially useful since SDL_Renderer doesn't expose its internal command buffers and/or queues.

For example, this may be implemented by introducing SDL_PROP_TEXTURE_CREATE_VULKAN_LAYOUT_NUMBER which will default to VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL. Then, SDL would convert image to whatever format it needs.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions