SDL_GPUVulkanOptions(3type)
β¨ 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_listis ignored. onlyvulkan_10_physical_device_featuresand the extension lists get used. that's it. that's the whole roster. π - when you request API version 1.1, the
feature_listgets scanned for feature structures introduced in Vulkan 1.1. oh she's looking now. π - when you request Vulkan 1.2 or higher, the
feature_listgets additionally scanned for compound feature structs β thinkVkPhysicalDeviceVulkan11Featuresand 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
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms