Add SDL_Vulkan_GetPresentationSupport

This commit is contained in:
Ethan Lee
2024-07-11 12:58:28 -04:00
parent 186fec2560
commit 1993ef664e
15 changed files with 167 additions and 0 deletions

View File

@@ -51,6 +51,7 @@ extern "C" {
#endif
VK_DEFINE_HANDLE(VkInstance)
VK_DEFINE_HANDLE(VkPhysicalDevice)
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkSurfaceKHR)
struct VkAllocationCallbacks;
@@ -211,6 +212,25 @@ extern SDL_DECLSPEC void SDLCALL SDL_Vulkan_DestroySurface(VkInstance instance,
VkSurfaceKHR surface,
const struct VkAllocationCallbacks *allocator);
/**
* Query support for presentation via a given physical device and queue family.
*
* The `instance` must have been created with extensions returned by
* SDL_Vulkan_GetInstanceExtensions() enabled.
*
* \param instance the Vulkan instance handle.
* \param physicalDevice a valid Vulkan physical device handle.
* \param queueFamilyIndex a valid queue family index for the given physical device.
* \returns SDL_TRUE if supported, SDL_FALSE if unsupported or an error occurred.
*
* \since This function is available since SDL 3.0.0.
*
* \sa SDL_Vulkan_GetInstanceExtensions
*/
extern SDL_DECLSPEC SDL_bool SDLCALL SDL_Vulkan_GetPresentationSupport(VkInstance instance,
VkPhysicalDevice physicalDevice,
Uint32 queueFamilyIndex);
/* @} *//* Vulkan support functions */
/* Ends C function definitions when using C++ */