Document/ignore GPU features without universal support

This commit is contained in:
Caleb Cornett 2025-02-23 13:34:28 -05:00 committed by Sam Lantinga
parent ad11c6988c
commit ea77472d75
4 changed files with 18 additions and 60 deletions

View file

@ -1495,6 +1495,9 @@ typedef struct SDL_GPUIndirectDispatchCommand
/**
* A structure specifying the parameters of a sampler.
*
* Note that mip_lod_bias is a no-op for the Metal driver.
* For Metal, LOD bias must be applied via shader instead.
*
* \since This function is available since SDL 3.2.0.
*
* \sa SDL_CreateGPUSampler
@ -1547,7 +1550,7 @@ typedef struct SDL_GPUVertexBufferDescription
Uint32 slot; /**< The binding slot of the vertex buffer. */
Uint32 pitch; /**< The byte pitch between consecutive elements of the vertex buffer. */
SDL_GPUVertexInputRate input_rate; /**< Whether attribute addressing is a function of the vertex index or instance index. */
Uint32 instance_step_rate; /**< The number of instances to draw using the same per-instance data before advancing in the instance buffer by one element. Ignored unless input_rate is SDL_GPU_VERTEXINPUTRATE_INSTANCE */
Uint32 instance_step_rate; /**< Ignored, reserved for future use. */
} SDL_GPUVertexBufferDescription;
/**
@ -1717,10 +1720,13 @@ typedef struct SDL_GPUTransferBufferCreateInfo
* A structure specifying the parameters of the graphics pipeline rasterizer
* state.
*
* NOTE: Some backend APIs (D3D11/12) will enable depth clamping even if
* enable_depth_clip is true. If you rely on this clamp+clip behavior,
* consider enabling depth clip and then manually clamping depth in your
* fragment shaders on Metal and Vulkan.
* Note that SDL_GPU_FILLMODE_LINE is not supported on many Android devices.
* For those devices, the fill mode will automatically fall back to FILL.
*
* Also note that the D3D12 driver will enable depth clamping even if
* enable_depth_clip is true. If you need this clamp+clip behavior, consider
* enabling depth clip and then manually clamping depth in your fragment
* shaders on Metal and Vulkan.
*
* \since This struct is available since SDL 3.2.0.
*
@ -1751,8 +1757,8 @@ typedef struct SDL_GPURasterizerState
typedef struct SDL_GPUMultisampleState
{
SDL_GPUSampleCount sample_count; /**< The number of samples to be used in rasterization. */
Uint32 sample_mask; /**< Determines which samples get updated in the render targets. Treated as 0xFFFFFFFF if enable_mask is false. */
bool enable_mask; /**< Enables sample masking. */
Uint32 sample_mask; /**< Ignored, reserved for future use. */
bool enable_mask; /**< Ignored, reserved for future use. */
Uint8 padding1;
Uint8 padding2;
Uint8 padding3;