Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
32 changes: 31 additions & 1 deletion include/SDL3/SDL_gpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -2306,7 +2306,15 @@ 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.
*
* \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 +2345,28 @@ 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_ADDITIONAL_FEATURES_POINTER "SDL.gpu.device.create.vulkan.additional_features"
#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. */
} SDL_GPUVulkanOptions;

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