Skip to content

Support hardware RGB565 textures with DX11 #14357

@ZivDero

Description

@ZivDero

As far as I can see, DirectX11 (and probably 12, too), perfectly support RGB565 textures via DXGI_FORMAT_B5G6R5_UNORM.
Adding

    case SDL_PIXELFORMAT_RGB565:
        return DXGI_FORMAT_B5G6R5_UNORM;

to SDLPixelFormatToDXGITextureFormat and skipping over the IsSupportedFormat call in SDL_CreateTextureWithProperties was sufficient to get a working texture that gave me a ~3x perf boost due to offloading color conversion to the GPU.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions