Skip to content
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
32a4fe2
Add hint to specify Vulkan API version to use
TheSniperFan Oct 10, 2025
c0ea6bf
Fix incorrect use of strings
TheSniperFan Oct 10, 2025
6c4d2c0
Change hint to only specify minor version
TheSniperFan Oct 10, 2025
90926f7
Update include/SDL3/SDL_hints.h
TheSniperFan Oct 10, 2025
db9532a
Revert "Change hint to only specify minor version"
TheSniperFan Oct 10, 2025
4b66c16
Handle errors when parsing hint
TheSniperFan Oct 10, 2025
1721814
Use standard version string format
TheSniperFan Oct 11, 2025
0310602
Allow requesting additional Vulkan device features
TheSniperFan Oct 11, 2025
0bddc9c
Rename VulkanRenderer.desiredDeviceFeatures
TheSniperFan Oct 11, 2025
962026f
Handle multiple chaining of structures
TheSniperFan Oct 11, 2025
9cd9bbd
Add Vulkan options property
TheSniperFan Oct 12, 2025
9dac2f6
Handle Vulkan 1.1 features properly
TheSniperFan Oct 12, 2025
b938d6e
Gate Vulkan feature requests by API version
TheSniperFan Oct 12, 2025
872aa0a
Fix CI errors
TheSniperFan Oct 12, 2025
a269ffb
Validate requested extensions
TheSniperFan Oct 17, 2025
bada266
Cleanup
TheSniperFan Oct 18, 2025
cff7d01
Implement opt-in instance extensions
TheSniperFan Oct 18, 2025
b00b4df
Implement opt-in device extensions
TheSniperFan Oct 18, 2025
4cbb2a0
Add missing const
TheSniperFan Oct 18, 2025
9e26c5a
Update comment
TheSniperFan Oct 18, 2025
e357936
Fix compile error
TheSniperFan Oct 18, 2025
d95f1d8
Remove obsolete error check
TheSniperFan Oct 18, 2025
a198c8c
Clear extension name pointers after initialization
TheSniperFan Oct 18, 2025
24749c4
Update include/SDL3/SDL_gpu.h
TheSniperFan Oct 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 35 additions & 1 deletion include/SDL3/SDL_gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,16 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDevice(
* useful for targeting Intel Haswell and Broadwell GPUs; other hardware
* either supports Tier 2 Resource Binding or does not support D3D12 in any
* capacity. Defaults to false.
*
*
* With the Vulkan renderer:
*
* - `SDL_PROP_GPU_DEVICE_CREATE_VULKAN_ADDITIONAL_FEATURES_POINTER`: pointer
* to a Vulkan structure to be appended to SDL's VkDeviceCreateInfo during
* device creation.
* This allows passing a list of VkPhysicalDeviceFeature structures to
* opt-into features aside from the minimal set SDL requires. It also allows
* requesting a higher API version and opting into extensions.
*
* \param props the properties to use.
* \returns a GPU context on success or NULL on failure; call SDL_GetError()
* for more information.
Expand Down Expand Up @@ -2337,6 +2346,31 @@ extern SDL_DECLSPEC SDL_GPUDevice * SDLCALL SDL_CreateGPUDeviceWithProperties(
#define SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN "SDL.gpu.device.create.shaders.metallib"
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_ALLOW_FEWER_RESOURCE_SLOTS_BOOLEAN "SDL.gpu.device.create.d3d12.allowtier1resourcebinding"
#define SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING "SDL.gpu.device.create.d3d12.semantic"
#define SDL_PROP_GPU_DEVICE_CREATE_VULKAN_OPTIONS_POINTER "SDL.gpu.device.create.vulkan.options"




/**
* A structure specifying additional options when using Vulkan.
*
* When no such structure is provided, SDL will use Vulkan API version 1.0 and a minimal set of features.
* The feature list gets passed to the vkCreateInstance function and allows requesting additional
* features.
*
* \since This struct is available since SDL 3.4.0.
*
*/
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 list of structs to be passed to device creation. */
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;

/**
* Destroys a GPU context previously returned by SDL_CreateGPUDevice.
Expand Down
Loading
Loading