| Summary: | [PATCH] video: Add Vulkan support for vivante fb using VK_KHR_display | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Wladimir J. van der Laan <laanwj> |
| Component: | video | Assignee: | Sam Lantinga <slouken> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | normal | ||
| Priority: | P2 | Keywords: | target-2.0.10 |
| Version: | HG 2.1 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Attachments: | [PATCH] video: Add Vulkan support for vivante fb | ||
Mark, can you review this? Thanks! Tagging a bunch of bugs with "target-2.0.10" so we have a clear list of things to address before a 2.0.10 release. Please note that "addressing" one of these bugs might mean deciding to defer on it until after 2.0.10, or resolving it as WONTFIX, etc. This is just here to tell us we should look at it carefully, and soon. If you have new information or feedback on this issue, this is a good time to add it to the conversation, as we're likely to be paying attention to this specific report in the next few days/weeks. Thanks! --ryan. Looks good, thanks! https://hg.libsdl.org/SDL/rev/06d24c0395b3 |
Created attachment 2970 [details] [PATCH] video: Add Vulkan support for vivante fb Vivante drivers use the VK_KHR_display extension for rendering directly to the frame buffer. This patch adds support to the video driver for Vulkan rendering using that method. - Add an utility function SDL_Vulkan_Display_CreateSurface that creates a surface using this extension. The display to use (if there are multiple) can be overridden using the environment variable "SDL_VULKAN_DISPLAY". - Use this function in a new compilation unit SDL_vivantevideo.c, which implements the SDL_VIDEO_VULKAN methods of the driver structure. Note: There's nothing Vivante-specific in this patch. I thought about making this a separate "vulkandisplay" video driver, however I ran into a circular dependency issue there: An instance is needed to use this extension, to get the available displays and modes. There is not yet an instance available at window creation time. The Vulkan driver is loaded later. Also I like to be able to use it at the same time with the vivante FB stuff without switching video drivers. In any case a future such a more general video driver could share much of this code.