(Vulkan) Negotiation interface v3: a presentation queue in the graphics family

A presentation_queue that is another queue of queue_family_index is only
valid for a frontend that takes one, so it gets a version of its own.
GET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_SUPPORT reports 3, and a core
may hand back that queue only when it sees 3 or higher. Frontends below
that fail context creation on any presentation_queue that is not the
graphics queue.

Acceptance stays version-agnostic: a core that provides the queue without
asking is still honoured when the family matches.
This commit is contained in:
LibretroAdmin authored and libretroadmin committed 2026-09-21 15:17:40 +02:00
1 parent 5bb3e201a5
commit dadbd009d9
1 file changed
+8 -1
+8 -1
View File
@@ -27,7 +27,7 @@
#include <vulkan/vulkan.h>
#define RETRO_HW_RENDER_INTERFACE_VULKAN_VERSION 5
#define RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION 2
#define RETRO_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_VULKAN_VERSION 3
struct retro_vulkan_image
{
@@ -155,6 +155,13 @@ struct retro_hw_render_context_negotiation_interface_vulkan
* If surface is not VK_NULL_HANDLE, the instance from frontend will have been created with supported for
* VK_KHR_surface extension.
*
* v3: presentation_queue may be another queue of queue_family_index even when presentation is supported
* on queue itself, which takes the frontend's present off the queue the core submits to and off its lock.
* presentation_queue_family_index must still equal queue_family_index; another family would need an image
* ownership transfer around every frame and is rejected.
* A core must only do this when GET_HW_RENDER_CONTEXT_NEGOTIATION_INTERFACE_SUPPORT reports 3 or higher:
* earlier frontends reject a presentation_queue that is not queue and fail context creation.
*
* The core is free to set its own queue priorities.
* Device provided to frontend is owned by the frontend, but any additional device resources must be freed by core
* in destroy_device callback.