diff --git a/include/SDL3/SDL_gpu.h b/include/SDL3/SDL_gpu.h index a17dd5661d..6c5d214129 100644 --- a/include/SDL3/SDL_gpu.h +++ b/include/SDL3/SDL_gpu.h @@ -877,11 +877,11 @@ typedef enum SDL_GPUSamplerAddressMode * - VSYNC: Waits for vblank before presenting. No tearing is possible. If * there is a pending image to present, the new image is enqueued for * presentation. Disallows tearing at the cost of visual latency. When using - * this present mode, AcquireGPUSwapchainTexture will block if too many frames - * are in flight. + * this present mode, AcquireGPUSwapchainTexture will block if too many + * frames are in flight. * - IMMEDIATE: Immediately presents. Lowest latency option, but tearing may - * occur. When using this mode, AcquireGPUSwapchainTexture will return NULL if - * too many frames are in flight. + * occur. When using this mode, AcquireGPUSwapchainTexture will return NULL + * if too many frames are in flight. * - MAILBOX: Waits for vblank before presenting. No tearing is possible. If * there is a pending image to present, the pending image is replaced by the * new image. Similar to VSYNC, but with reduced visual latency. When using @@ -1732,7 +1732,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_GPUSupportsProperties( * \param debug_mode enable debug mode properties and validations. * \param name the preferred GPU driver, or NULL to let SDL pick the optimal * driver. - * \returns a GPU context on success or NULL on failure; call SDL_GetError() for more information. + * \returns a GPU context on success or NULL on failure; call SDL_GetError() + * for more information. * * \since This function is available since SDL 3.0.0. * @@ -1779,7 +1780,8 @@ extern SDL_DECLSPEC SDL_GPUDevice *SDLCALL SDL_CreateGPUDevice( * use for all vertex semantics, default is "TEXCOORD". * * \param props the properties to use. - * \returns a GPU context on success or NULL on failure; call SDL_GetError() for more information. + * \returns a GPU context on success or NULL on failure; call SDL_GetError() + * for more information. * * \since This function is available since SDL 3.0.0. * @@ -1905,7 +1907,8 @@ extern SDL_DECLSPEC SDL_GPUShaderFormat SDLCALL SDL_GetGPUShaderFormats(SDL_GPUD * \param device a GPU Context. * \param createinfo a struct describing the state of the compute pipeline to * create. - * \returns a compute pipeline object on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a compute pipeline object on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -1922,7 +1925,8 @@ extern SDL_DECLSPEC SDL_GPUComputePipeline *SDLCALL SDL_CreateGPUComputePipeline * \param device a GPU Context. * \param createinfo a struct describing the state of the graphics pipeline to * create. - * \returns a graphics pipeline object on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a graphics pipeline object on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -1940,7 +1944,8 @@ extern SDL_DECLSPEC SDL_GPUGraphicsPipeline *SDLCALL SDL_CreateGPUGraphicsPipeli * * \param device a GPU Context. * \param createinfo a struct describing the state of the sampler to create. - * \returns a sampler object on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a sampler object on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -2009,7 +2014,8 @@ extern SDL_DECLSPEC SDL_GPUSampler *SDLCALL SDL_CreateGPUSampler( * * \param device a GPU Context. * \param createinfo a struct describing the state of the shader to create. - * \returns a shader object on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a shader object on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -2035,7 +2041,8 @@ extern SDL_DECLSPEC SDL_GPUShader *SDLCALL SDL_CreateGPUShader( * * \param device a GPU Context. * \param createinfo a struct describing the state of the texture to create. - * \returns a texture object on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a texture object on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -2065,7 +2072,8 @@ extern SDL_DECLSPEC SDL_GPUTexture *SDLCALL SDL_CreateGPUTexture( * * \param device a GPU Context. * \param createinfo a struct describing the state of the buffer to create. - * \returns a buffer object on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a buffer object on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -2094,7 +2102,8 @@ extern SDL_DECLSPEC SDL_GPUBuffer *SDLCALL SDL_CreateGPUBuffer( * \param device a GPU Context. * \param createinfo a struct describing the state of the transfer buffer to * create. - * \returns a transfer buffer on success, or NULL on failure; call SDL_GetError() for more information. + * \returns a transfer buffer on success, or NULL on failure; call + * SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -2302,7 +2311,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_ReleaseGPUGraphicsPipeline( * acquired on. * * \param device a GPU context. - * \returns a command buffer, or NULL on failure; call SDL_GetError() for more information. + * \returns a command buffer, or NULL on failure; call SDL_GetError() for more + * information. * * \since This function is available since SDL 3.0.0. * @@ -2968,7 +2978,8 @@ extern SDL_DECLSPEC void SDLCALL SDL_EndGPUComputePass( * \param device a GPU context. * \param transfer_buffer a transfer buffer. * \param cycle if true, cycles the transfer buffer if it is already bound. - * \returns the address of the mapped transfer buffer memory, or NULL on failure; call SDL_GetError() for more information. + * \returns the address of the mapped transfer buffer memory, or NULL on + * failure; call SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. */ @@ -3227,7 +3238,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WindowSupportsGPUPresentMode( * * \param device a GPU context. * \param window an SDL_Window. - * \returns true on success, or false on failure; call SDL_GetError() for more information. + * \returns true on success, or false on failure; call SDL_GetError() for more + * information. * * \since This function is available since SDL 3.0.0. * @@ -3284,6 +3296,7 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SetGPUSwapchainParameters( /** * Obtains the texture format of the swapchain for the given window. + * * Note that this format can change if the swapchain parameters change. * * \param device a GPU context. @@ -3302,14 +3315,17 @@ extern SDL_DECLSPEC SDL_GPUTextureFormat SDLCALL SDL_GetGPUSwapchainTextureForma * When a swapchain texture is acquired on a command buffer, it will * automatically be submitted for presentation when the command buffer is * submitted. The swapchain texture should only be referenced by the command - * buffer used to acquire it. The swapchain texture handle can be NULL under certain conditions. This - * is not necessarily an error. If this function returns false then there is an error. This texture is managed by the implementation - * and must not be freed by the user. The texture dimensions will be the height and width of the claimed window. You MUST NOT call this function from any - * thread other than the one that created the window. + * buffer used to acquire it. The swapchain texture handle can be NULL under + * certain conditions. This is not necessarily an error. If this function + * returns false then there is an error. This texture is managed by the + * implementation and must not be freed by the user. The texture dimensions + * will be the height and width of the claimed window. You MUST NOT call this + * function from any thread other than the one that created the window. * * \param command_buffer a command buffer. * \param window a window that has been claimed. - * \param swapchainTexture a pointer filled in with a swapchain texture handle + * \param swapchainTexture a pointer filled in with a swapchain texture + * handle. * \returns true on success, false on error. * * \since This function is available since SDL 3.0.0. @@ -3334,7 +3350,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_AcquireGPUSwapchainTexture( * command in a subsequent submission begins executing. * * \param command_buffer a command buffer. - * \returns true on success, false on failure; call SDL_GetError() for more information. + * \returns true on success, false on failure; call SDL_GetError() for more + * information. * * \since This function is available since SDL 3.0.0. * @@ -3358,7 +3375,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_SubmitGPUCommandBuffer( * command in a subsequent submission begins executing. * * \param command_buffer a command buffer. - * \returns a fence associated with the command buffer, or NULL on failure; call SDL_GetError() for more information. + * \returns a fence associated with the command buffer, or NULL on failure; + * call SDL_GetError() for more information. * * \since This function is available since SDL 3.0.0. * @@ -3374,7 +3392,8 @@ extern SDL_DECLSPEC SDL_GPUFence *SDLCALL SDL_SubmitGPUCommandBufferAndAcquireFe * Blocks the thread until the GPU is completely idle. * * \param device a GPU context. - * \returns true on success, false on failure; call SDL_GetError() for more information. + * \returns true on success, false on failure; call SDL_GetError() for more + * information. * * \since This function is available since SDL 3.0.0. * @@ -3391,7 +3410,8 @@ extern SDL_DECLSPEC bool SDLCALL SDL_WaitForGPUIdle( * fences to be signaled. * \param fences an array of fences to wait on. * \param num_fences the number of fences in the fences array. - * \returns true on success, false on failure; call SDL_GetError() for more information. + * \returns true on success, false on failure; call SDL_GetError() for more + * information. * * \since This function is available since SDL 3.0.0. *