35
35
* can render offscreen entirely, perhaps for image processing, and not use a
36
36
* window at all.
37
37
*
38
- * Next the app prepares static data (things that are created once and used
38
+ * Next, the app prepares static data (things that are created once and used
39
39
* over and over). For example:
40
40
*
41
41
* - Shaders (programs that run on the GPU): use SDL_CreateGPUShader().
42
- * - Vertex buffers (arrays of geometry data) and other data rendering will
43
- * need: use SDL_UploadToGPUBuffer().
44
- * - Textures (images): use SDL_UploadToGPUTexture().
42
+ * - Vertex buffers (arrays of geometry data) and other rendering data: use
43
+ * SDL_CreateGPUBuffer() and SDL_UploadToGPUBuffer().
44
+ * - Textures (images): use SDL_CreateGPUTexture() and
45
+ * SDL_UploadToGPUTexture().
45
46
* - Samplers (how textures should be read from): use SDL_CreateGPUSampler().
46
47
* - Render pipelines (precalculated rendering state): use
47
48
* SDL_CreateGPUGraphicsPipeline()
@@ -1495,9 +1496,16 @@ typedef struct SDL_GPUIndirectDispatchCommand
1495
1496
/**
1496
1497
* A structure specifying the parameters of a sampler.
1497
1498
*
1499
+ * Note that mip_lod_bias is a no-op for the Metal driver. For Metal, LOD bias
1500
+ * must be applied via shader instead.
1501
+ *
1498
1502
* \since This function is available since SDL 3.2.0.
1499
1503
*
1500
1504
* \sa SDL_CreateGPUSampler
1505
+ * \sa SDL_GPUFilter
1506
+ * \sa SDL_GPUSamplerMipmapMode
1507
+ * \sa SDL_GPUSamplerAddressMode
1508
+ * \sa SDL_GPUCompareOp
1501
1509
*/
1502
1510
typedef struct SDL_GPUSamplerCreateInfo
1503
1511
{
@@ -1536,14 +1544,14 @@ typedef struct SDL_GPUSamplerCreateInfo
1536
1544
* \since This struct is available since SDL 3.2.0.
1537
1545
*
1538
1546
* \sa SDL_GPUVertexAttribute
1539
- * \sa SDL_GPUVertexInputState
1547
+ * \sa SDL_GPUVertexInputRate
1540
1548
*/
1541
1549
typedef struct SDL_GPUVertexBufferDescription
1542
1550
{
1543
1551
Uint32 slot ; /**< The binding slot of the vertex buffer. */
1544
1552
Uint32 pitch ; /**< The byte pitch between consecutive elements of the vertex buffer. */
1545
1553
SDL_GPUVertexInputRate input_rate ; /**< Whether attribute addressing is a function of the vertex index or instance index. */
1546
- 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 */
1554
+ Uint32 instance_step_rate ; /**< Reserved for future use. Must be set to 0. */
1547
1555
} SDL_GPUVertexBufferDescription ;
1548
1556
1549
1557
/**
@@ -1713,10 +1721,13 @@ typedef struct SDL_GPUTransferBufferCreateInfo
1713
1721
* A structure specifying the parameters of the graphics pipeline rasterizer
1714
1722
* state.
1715
1723
*
1716
- * NOTE: Some backend APIs (D3D11/12) will enable depth clamping even if
1717
- * enable_depth_clip is true. If you rely on this clamp+clip behavior,
1718
- * consider enabling depth clip and then manually clamping depth in your
1719
- * fragment shaders on Metal and Vulkan.
1724
+ * Note that SDL_GPU_FILLMODE_LINE is not supported on many Android devices.
1725
+ * For those devices, the fill mode will automatically fall back to FILL.
1726
+ *
1727
+ * Also note that the D3D12 driver will enable depth clamping even if
1728
+ * enable_depth_clip is true. If you need this clamp+clip behavior, consider
1729
+ * enabling depth clip and then manually clamping depth in your fragment
1730
+ * shaders on Metal and Vulkan.
1720
1731
*
1721
1732
* \since This struct is available since SDL 3.2.0.
1722
1733
*
@@ -1747,8 +1758,8 @@ typedef struct SDL_GPURasterizerState
1747
1758
typedef struct SDL_GPUMultisampleState
1748
1759
{
1749
1760
SDL_GPUSampleCount sample_count ; /**< The number of samples to be used in rasterization. */
1750
- Uint32 sample_mask ; /**< Determines which samples get updated in the render targets. Treated as 0xFFFFFFFF if enable_mask is false . */
1751
- bool enable_mask ; /**< Enables sample masking . */
1761
+ Uint32 sample_mask ; /**< Reserved for future use. Must be set to 0 . */
1762
+ bool enable_mask ; /**< Reserved for future use. Must be set to false . */
1752
1763
Uint8 padding1 ;
1753
1764
Uint8 padding2 ;
1754
1765
Uint8 padding3 ;
@@ -1798,6 +1809,8 @@ typedef struct SDL_GPUColorTargetDescription
1798
1809
* \since This struct is available since SDL 3.2.0.
1799
1810
*
1800
1811
* \sa SDL_GPUGraphicsPipelineCreateInfo
1812
+ * \sa SDL_GPUColorTargetDescription
1813
+ * \sa SDL_GPUTextureFormat
1801
1814
*/
1802
1815
typedef struct SDL_GPUGraphicsPipelineTargetInfo
1803
1816
{
@@ -3920,6 +3933,9 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUSwapchain(
3920
3933
* freed by the user. You MUST NOT call this function from any thread other
3921
3934
* than the one that created the window.
3922
3935
*
3936
+ * The swapchain texture is write-only and cannot be used as a sampler or for
3937
+ * another reading operation.
3938
+ *
3923
3939
* \param command_buffer a command buffer.
3924
3940
* \param window a window that has been claimed.
3925
3941
* \param swapchain_texture a pointer filled in with a swapchain texture
@@ -3938,6 +3954,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUSwapchain(
3938
3954
*
3939
3955
* \sa SDL_SubmitGPUCommandBuffer
3940
3956
* \sa SDL_SubmitGPUCommandBufferAndAcquireFence
3957
+ * \sa SDL_AcquireGPUSwapchainTexture
3941
3958
*/
3942
3959
extern SDL_DECLSPEC bool SDLCALL SDL_WaitAndAcquireGPUSwapchainTexture (
3943
3960
SDL_GPUCommandBuffer * command_buffer ,
0 commit comments