SDL_GPUVulkanOptions(3type)

πŸ“¦
version 3.4.18 Β· 5 versions
, in fedora 43, fedora 44

✨ SDL_GPUVulkanOptions ✨

okay bestie, gather round, because we're talking about SDL_GPUVulkanOptions β€” a lil struct from the SDL3 DATATYPES corner of the world that lets you hand Vulkan some extra vibes when SDL spins up its GPU stuff. πŸ’…


🌸 NAME 🌸

SDL_GPUVulkanOptions β€” a structure specifying additional options when using Vulkan. no cap, that's literally the whole job.


πŸŽ€ SYNOPSIS πŸŽ€

#include <SDL3/SDL_gpu.h>

typedef struct SDL_GPUVulkanOptions
{
    Uint32 vulkan_api_version; /**< The Vulkan API version to request for the instance. Use Vulkan's VK_MAKE_VERSION or VK_MAKE_API_VERSION. */
    void *feature_list; /**< Pointer to the first element of a chain of Vulkan feature structs. (Requires API version 1.1 or higher.)*/
     void *vulkan_10_physical_device_features; /**< Pointer to a VkPhysicalDeviceFeatures struct to enable additional Vulkan 1.0 features. */
     Uint32 device_extension_count; /**< Number of additional device extensions to require. */
     const char **device_extension_names; /**< Pointer to a list of additional device extensions to require. */
     Uint32 instance_extension_count; /**< Number of additional instance extensions to require. */
     const char **instance_extension_names; /**< Pointer to a list of additional instance extensions to require. */
} SDL_GPUVulkanOptions;

πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea, bestie πŸ“ β€” if you don't hand SDL one of these structs, SDL is gonna default to Vulkan API version 1.0 and a minimal set of features. humble. understated. fine.

but the version you request? it changes how feature_list gets processed. it's giving "your API version is the main character and everything else follows."

  • when you request API version 1.0, the feature_list is ignored. only vulkan_10_physical_device_features and the extension lists get used. that's it. that's the whole roster. πŸ’€
  • when you request API version 1.1, the feature_list gets scanned for feature structures introduced in Vulkan 1.1. oh she's looking now. πŸ‘€
  • when you request Vulkan 1.2 or higher, the feature_list gets additionally scanned for compound feature structs β€” think VkPhysicalDeviceVulkan11Features and friends. iconic behavior honestly.

and the device + instance extension lists, plus vulkan_10_physical_device_features? those are always processed no matter what version you're on. loyal. consistent. we love that for them. 🫢


⭐ AVAILABILITY ⭐

this struct is available since SDL 3.4.0. she's new-ish, she's fresh, she's ready. ✨


and that's the whole page, bestie πŸ’œ β€” brought to you by the fine folks at Simple Directmedia Layer, running on SDL 3.4.18, and yes this very page is literally called SDL_GPUVulkanOptions(3type). go forth and configure ur Vulkan options, you absolute queen πŸ‘‘πŸŒˆ

πŸ“¦ where this page comes from