We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3864 - [PATCH] video: Add Vulkan support for vivante fb using VK_KHR_display
Summary: [PATCH] video: Add Vulkan support for vivante fb using VK_KHR_display
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: HG 2.1
Hardware: x86_64 Linux
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords: target-2.0.10
Depends on:
Blocks:
 
Reported: 2017-10-08 07:39 UTC by Wladimir J. van der Laan
Modified: 2019-05-19 17:37 UTC (History)
0 users

See Also:


Attachments
[PATCH] video: Add Vulkan support for vivante fb (25.30 KB, patch)
2017-10-08 07:39 UTC, Wladimir J. van der Laan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wladimir J. van der Laan 2017-10-08 07:39:52 UTC
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.
Comment 1 Sam Lantinga 2017-10-08 07:49:37 UTC
Mark, can you review this?

Thanks!
Comment 2 Ryan C. Gordon 2019-05-18 18:48:55 UTC
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.
Comment 3 Sam Lantinga 2019-05-19 17:37:14 UTC
Looks good, thanks!
https://hg.libsdl.org/SDL/rev/06d24c0395b3