Module gpu
dep_sdl3
only.Expand description
The GPU API offers a cross-platform way for apps to talk to modern graphics hardware. It offers both 3D graphics and compute support, in the style of Metal, Vulkan, and Direct3D 12.
A basic workflow might be something like this:
The app creates a GPU device with SDL_CreateGPUDevice()
, and assigns it to
a window with SDL_ClaimWindowForGPUDevice()
–although strictly speaking you
can render offscreen entirely, perhaps for image processing, and not use a
window at all.
Next the app prepares static data (things that are created once and used over and over). For example:
- Shaders (programs that run on the GPU): use
SDL_CreateGPUShader()
. - Vertex buffers (arrays of geometry data) and other data rendering will
need: use
SDL_UploadToGPUBuffer()
. - Textures (images): use
SDL_UploadToGPUTexture()
. - Samplers (how textures should be read from): use
SDL_CreateGPUSampler()
. - Render pipelines (precalculated rendering state): use
SDL_CreateGPUGraphicsPipeline()
To render, the app creates one or more command buffers, with
SDL_AcquireGPUCommandBuffer()
. Command buffers collect rendering
instructions that will be submitted to the GPU in batch. Complex scenes can
use multiple command buffers, maybe configured across multiple threads in
parallel, as long as they are submitted in the correct order, but many apps
will just need one command buffer per frame.
Rendering can happen to a texture (what other APIs call a “render target”)
or it can happen to the swapchain texture (which is just a special texture
that represents a window’s contents). The app can use
SDL_WaitAndAcquireGPUSwapchainTexture()
to render to the window.
Rendering actually happens in a Render Pass, which is encoded into a command buffer. One can encode multiple render passes (or alternate between render and compute passes) in a single command buffer, but many apps might simply need a single render pass in a single command buffer. Render Passes can render to up to four color textures and one depth texture simultaneously. If the set of textures being rendered to needs to change, the Render Pass must be ended and a new one must be begun.
The app calls SDL_BeginGPURenderPass()
. Then it sets states it needs for
each draw:
SDL_BindGPUGraphicsPipeline()
SDL_SetGPUViewport()
SDL_BindGPUVertexBuffers()
SDL_BindGPUVertexSamplers()
- etc
Then, make the actual draw commands with these states:
After all the drawing commands for a pass are complete, the app should call
SDL_EndGPURenderPass()
. Once a render pass ends all render-related state is
reset.
The app can begin new Render Passes and make new draws in the same command buffer until the entire scene is rendered.
Once all of the render commands for the scene are complete, the app calls
SDL_SubmitGPUCommandBuffer()
to send it to the GPU for processing.
If the app needs to read back data from texture or buffers, the API has an
efficient way of doing this, provided that the app is willing to tolerate
some latency. When the app uses SDL_DownloadFromGPUTexture()
or
SDL_DownloadFromGPUBuffer()
, submitting the command buffer with
SDL_SubmitGPUCommandBufferAndAcquireFence()
will return a fence handle that
the app can poll or wait on in a thread. Once the fence indicates that the
command buffer is done processing, it is safe to read the downloaded data.
Make sure to call SDL_ReleaseGPUFence()
when done with the fence.
The API also has “compute” support. The app calls SDL_BeginGPUComputePass()
with compute-writeable textures and/or buffers, which can be written to in
a compute shader. Then it sets states it needs for the compute dispatches:
Then, dispatch compute work:
For advanced users, this opens up powerful GPU-driven workflows.
Graphics and compute pipelines require the use of shaders, which as mentioned above are small programs executed on the GPU. Each backend (Vulkan, Metal, D3D12) requires a different shader format. When the app creates the GPU device, the app lets the device know which shader formats the app can provide. It will then select the appropriate backend depending on the available shader formats and the backends available on the platform. When creating shaders, the app must provide the correct shader format for the selected backend. If you would like to learn more about why the API works this way, there is a detailed blog post explaining this situation.
It is optimal for apps to pre-compile the shader formats they might use, but for ease of use SDL provides a separate project, SDL_shadercross , for performing runtime shader cross-compilation. It also has a CLI interface for offline precompilation as well.
This is an extremely quick overview that leaves out several important details. Already, though, one can see that GPU programming can be quite complex! If you just need simple 2D graphics, the Render API is much easier to use but still hardware-accelerated. That said, even for 2D applications the performance benefits and expressiveness of the GPU API are significant.
The GPU API targets a feature set with a wide range of hardware support and ease of portability. It is designed so that the app won’t have to branch itself by querying feature support. If you need cutting-edge features with limited hardware support, this API is probably not for you.
Examples demonstrating proper usage of this API can be found here .
§Performance considerations
Here are some basic tips for maximizing your rendering performance.
- Beginning a new render pass is relatively expensive. Use as few render passes as you can.
- Minimize the amount of state changes. For example, binding a pipeline is relatively cheap, but doing it hundreds of times when you don’t need to will slow the performance significantly.
- Perform your data uploads as early as possible in the frame.
- Don’t churn resources. Creating and releasing resources is expensive. It’s better to create what you need up front and cache it.
- Don’t use uniform buffers for large amounts of data (more than a matrix or so). Use a storage buffer instead.
- Use cycling correctly. There is a detailed explanation of cycling further below.
- Use culling techniques to minimize pixel writes. The less writing the GPU has to do the better. Culling can be a very advanced topic but even simple culling techniques can boost performance significantly.
In general try to remember the golden rule of performance: doing things is more expensive than not doing things. Don’t Touch The Driver!
§FAQ
Question: When are you adding more advanced features, like ray tracing or mesh shaders?
Answer: We don’t have immediate plans to add more bleeding-edge features, but we certainly might in the future, when these features prove worthwhile, and reasonable to implement across several platforms and underlying APIs. So while these things are not in the “never” category, they are definitely not “near future” items either.
Question: Why is my shader not working?
Answer: A common oversight when using shaders is not properly laying out
the shader resources/registers correctly. The GPU API is very strict with
how it wants resources to be laid out and it’s difficult for the API to
automatically validate shaders to see if they have a compatible layout. See
the documentation for SDL_CreateGPUShader()
and
SDL_CreateGPUComputePipeline()
for information on the expected layout.
Another common issue is not setting the correct number of samplers,
textures, and buffers in SDL_GPUShaderCreateInfo
. If possible use shader
reflection to extract the required information from the shader
automatically instead of manually filling in the struct’s values.
Question: My application isn’t performing very well. Is this the GPU API’s fault?
Answer: No. Long answer: The GPU API is a relatively thin layer over the underlying graphics API. While it’s possible that we have done something inefficiently, it’s very unlikely especially if you are relatively inexperienced with GPU rendering. Please see the performance tips above and make sure you are following them. Additionally, tools like RenderDoc can be very helpful for diagnosing incorrect behavior and performance issues.
§System Requirements
Vulkan: Supported on Windows, Linux, Nintendo Switch, and certain Android devices. Requires Vulkan 1.0 with the following extensions and device features:
VK_KHR_swapchain
VK_KHR_maintenance1
independentBlend
imageCubeArray
depthClamp
shaderClipDistance
drawIndirectFirstInstance
D3D12: Supported on Windows 10 or newer, Xbox One (GDK), and Xbox Series X|S (GDK). Requires a GPU that supports DirectX 12 Feature Level 11_1.
Metal: Supported on macOS 10.14+ and iOS/tvOS 13.0+. Hardware requirements vary by operating system:
- macOS requires an Apple Silicon or Intel Mac2 family GPU
- iOS/tvOS requires an A9 GPU or newer
- iOS Simulator and tvOS Simulator are unsupported
§Uniform Data
Uniforms are for passing data to shaders. The uniform data will be constant across all executions of the shader.
There are 4 available uniform slots per shader stage (where the stages are vertex, fragment, and compute). Uniform data pushed to a slot on a stage keeps its value throughout the command buffer until you call the relevant Push function on that slot again.
For example, you could write your vertex shaders to read a camera matrix from uniform binding slot 0, push the camera matrix at the start of the command buffer, and that data will be used for every subsequent draw call.
It is valid to push uniform data during a render or compute pass.
Uniforms are best for pushing small amounts of data. If you are pushing more than a matrix or two per call you should consider using a storage buffer instead.
§A Note On Cycling
When using a command buffer, operations do not occur immediately - they occur some time after the command buffer is submitted.
When a resource is used in a pending or active command buffer, it is considered to be “bound”. When a resource is no longer used in any pending or active command buffers, it is considered to be “unbound”.
If data resources are bound, it is unspecified when that data will be unbound unless you acquire a fence when submitting the command buffer and wait on it. However, this doesn’t mean you need to track resource usage manually.
All of the functions and structs that involve writing to a resource have a
“cycle” bool. SDL_GPUTransferBuffer
, SDL_GPUBuffer
, and SDL_GPUTexture
all
effectively function as ring buffers on internal resources. When cycle is
true, if the resource is bound, the cycle rotates to the next unbound
internal resource, or if none are available, a new one is created. This
means you don’t have to worry about complex state tracking and
synchronization as long as cycling is correctly employed.
For example: you can call SDL_MapGPUTransferBuffer()
, write texture data,
SDL_UnmapGPUTransferBuffer()
, and then SDL_UploadToGPUTexture()
. The next
time you write texture data to the transfer buffer, if you set the cycle
param to true, you don’t have to worry about overwriting any data that is
not yet uploaded.
Another example: If you are using a texture in a render pass every frame,
this can cause a data dependency between frames. If you set cycle to true
in the SDL_GPUColorTargetInfo
struct, you can prevent this data dependency.
Cycling will never undefine already bound data. When cycling, all data in the resource is considered to be undefined for subsequent commands until that data is written again. You must take care not to read undefined data.
Note that when cycling a texture, the entire texture will be cycled, even if only part of the texture is used in the call, so you must consider the entire texture to contain undefined data after cycling.
You must also take care not to overwrite a section of data that has been referenced in a command without cycling first. It is OK to overwrite unreferenced data in a bound resource without cycling, but overwriting a section of data that has already been referenced will produce unexpected results.
Structs§
- SDL_
GPUBlend Factor - Specifies a blending factor to be used when pixels in a render target are blended with existing pixels in the texture.
- SDL_
GPUBlend Op - Specifies the operator to be used when pixels in a render target are blended with existing pixels in the texture.
- SDL_
GPUBlit Info - A structure containing parameters for a blit command.
- SDL_
GPUBlit Region - A structure specifying a region of a texture used in the blit operation.
- SDL_
GPUBuffer - An opaque handle representing a buffer.
- SDL_
GPUBuffer Binding - A structure specifying parameters in a buffer binding call.
- SDL_
GPUBuffer Create Info - A structure specifying the parameters of a buffer.
- SDL_
GPUBuffer Location - A structure specifying a location in a buffer.
- SDL_
GPUBuffer Region - A structure specifying a region of a buffer.
- SDL_
GPUColor Target Blend State - A structure specifying the blend state of a color target.
- SDL_
GPUColor Target Description - A structure specifying the parameters of color targets used in a graphics pipeline.
- SDL_
GPUColor Target Info - A structure specifying the parameters of a color target used by a render pass.
- SDL_
GPUCommand Buffer - An opaque handle representing a command buffer.
- SDL_
GPUCompare Op - Specifies a comparison operator for depth, stencil and sampler operations.
- SDL_
GPUCompute Pass - An opaque handle representing a compute pass.
- SDL_
GPUCompute Pipeline - An opaque handle representing a compute pipeline.
- SDL_
GPUCompute Pipeline Create Info - A structure specifying the parameters of a compute pipeline state.
- SDL_
GPUCopy Pass - An opaque handle representing a copy pass.
- SDL_
GPUCube MapFace - Specifies the face of a cube map.
- SDL_
GPUCull Mode - Specifies the facing direction in which triangle faces will be culled.
- SDL_
GPUDepth Stencil State - A structure specifying the parameters of the graphics pipeline depth stencil state.
- SDL_
GPUDepth Stencil Target Info - A structure specifying the parameters of a depth-stencil target used by a render pass.
- SDL_
GPUDevice - An opaque handle representing the SDL_GPU context.
- SDL_
GPUFence - An opaque handle representing a fence.
- SDL_
GPUFill Mode - Specifies the fill mode of the graphics pipeline.
- SDL_
GPUFilter - Specifies a filter operation used by a sampler.
- SDL_
GPUFront Face - Specifies the vertex winding that will cause a triangle to be determined to be front-facing.
- SDL_
GPUGraphics Pipeline - An opaque handle representing a graphics pipeline.
- SDL_
GPUGraphics Pipeline Create Info - A structure specifying the parameters of a graphics pipeline state.
- SDL_
GPUGraphics Pipeline Target Info - A structure specifying the descriptions of render targets used in a graphics pipeline.
- SDL_
GPUIndex Element Size - Specifies the size of elements in an index buffer.
- SDL_
GPUIndexed Indirect Draw Command - A structure specifying the parameters of an indexed indirect draw command.
- SDL_
GPUIndirect Dispatch Command - A structure specifying the parameters of an indexed dispatch command.
- SDL_
GPUIndirect Draw Command - A structure specifying the parameters of an indirect draw command.
- SDL_
GPULoad Op - Specifies how the contents of a texture attached to a render pass are treated at the beginning of the render pass.
- SDL_
GPUMultisample State - A structure specifying the parameters of the graphics pipeline multisample state.
- SDL_
GPUPresent Mode - Specifies the timing that will be used to present swapchain textures to the OS.
- SDL_
GPUPrimitive Type - Specifies the primitive topology of a graphics pipeline.
- SDL_
GPURasterizer State - A structure specifying the parameters of the graphics pipeline rasterizer state.
- SDL_
GPURender Pass - An opaque handle representing a render pass.
- SDL_
GPUSample Count - Specifies the sample count of a texture.
- SDL_
GPUSampler - An opaque handle representing a sampler.
- SDL_
GPUSampler Address Mode - Specifies behavior of texture sampling when the coordinates exceed the 0-1 range.
- SDL_
GPUSampler Create Info - A structure specifying the parameters of a sampler.
- SDL_
GPUSampler Mipmap Mode - Specifies a mipmap mode used by a sampler.
- SDL_
GPUShader - An opaque handle representing a compiled shader object.
- SDL_
GPUShader Create Info - A structure specifying code and metadata for creating a shader object.
- SDL_
GPUShader Stage - Specifies which stage a shader program corresponds to.
- SDL_
GPUStencil Op - Specifies what happens to a stored stencil value if stencil tests fail or pass.
- SDL_
GPUStencil OpState - A structure specifying the stencil operation state of a graphics pipeline.
- SDL_
GPUStorage Buffer Read Write Binding - A structure specifying parameters related to binding buffers in a compute pass.
- SDL_
GPUStorage Texture Read Write Binding - A structure specifying parameters related to binding textures in a compute pass.
- SDL_
GPUStore Op - Specifies how the contents of a texture attached to a render pass are treated at the end of the render pass.
- SDL_
GPUSwapchain Composition - Specifies the texture format and colorspace of the swapchain textures.
- SDL_
GPUTexture - An opaque handle representing a texture.
- SDL_
GPUTexture Create Info - A structure specifying the parameters of a texture.
- SDL_
GPUTexture Format - Specifies the pixel format of a texture.
- SDL_
GPUTexture Location - A structure specifying a location in a texture.
- SDL_
GPUTexture Region - A structure specifying a region of a texture.
- SDL_
GPUTexture Sampler Binding - A structure specifying parameters in a sampler binding call.
- SDL_
GPUTexture Transfer Info - A structure specifying parameters related to transferring data to or from a texture.
- SDL_
GPUTexture Type - Specifies the type of a texture.
- SDL_
GPUTransfer Buffer - An opaque handle representing a transfer buffer.
- SDL_
GPUTransfer Buffer Create Info - A structure specifying the parameters of a transfer buffer.
- SDL_
GPUTransfer Buffer Location - A structure specifying a location in a transfer buffer.
- SDL_
GPUTransfer Buffer Usage - Specifies how a transfer buffer is intended to be used by the client.
- SDL_
GPUVertex Attribute - A structure specifying a vertex attribute.
- SDL_
GPUVertex Buffer Description - A structure specifying the parameters of vertex buffers used in a graphics pipeline.
- SDL_
GPUVertex Element Format - Specifies the format of a vertex attribute.
- SDL_
GPUVertex Input Rate - Specifies the rate at which vertex attributes are pulled from buffers.
- SDL_
GPUVertex Input State - A structure specifying the parameters of a graphics pipeline vertex input state.
- SDL_
GPUViewport - A structure specifying a viewport.
Constants§
- SDL_
GPU_ BLENDFACTOR_ CONSTANT_ COLOR - blend constant
- SDL_
GPU_ BLENDFACTOR_ DST_ ALPHA - destination alpha
- SDL_
GPU_ BLENDFACTOR_ DST_ COLOR - destination color
- SDL_
GPU_ BLENDFACTOR_ INVALID - SDL_
GPU_ BLENDFACTOR_ ONE - 1
- SDL_
GPU_ BLENDFACTOR_ ONE_ MINUS_ CONSTANT_ COLOR - 1 - blend constant
- SDL_
GPU_ BLENDFACTOR_ ONE_ MINUS_ DST_ ALPHA - 1 - destination alpha
- SDL_
GPU_ BLENDFACTOR_ ONE_ MINUS_ DST_ COLOR - 1 - destination color
- SDL_
GPU_ BLENDFACTOR_ ONE_ MINUS_ SRC_ ALPHA - 1 - source alpha
- SDL_
GPU_ BLENDFACTOR_ ONE_ MINUS_ SRC_ COLOR - 1 - source color
- SDL_
GPU_ BLENDFACTOR_ SRC_ ALPHA - source alpha
- SDL_
GPU_ BLENDFACTOR_ SRC_ ALPHA_ SATURATE - min(source alpha, 1 - destination alpha)
- SDL_
GPU_ BLENDFACTOR_ SRC_ COLOR - source color
- SDL_
GPU_ BLENDFACTOR_ ZERO - 0
- SDL_
GPU_ BLENDOP_ ADD - (source * source_factor) + (destination * destination_factor)
- SDL_
GPU_ BLENDOP_ INVALID - SDL_
GPU_ BLENDOP_ MAX - max(source, destination)
- SDL_
GPU_ BLENDOP_ MIN - min(source, destination)
- SDL_
GPU_ BLENDOP_ REVERSE_ SUBTRACT - (destination * destination_factor) - (source * source_factor)
- SDL_
GPU_ BLENDOP_ SUBTRACT - (source * source_factor) - (destination * destination_factor)
- SDL_
GPU_ BUFFERUSAGE_ COMPUTE_ STORAGE_ READ - Buffer supports storage reads in the compute stage.
- SDL_
GPU_ BUFFERUSAGE_ COMPUTE_ STORAGE_ WRITE - Buffer supports storage writes in the compute stage.
- SDL_
GPU_ BUFFERUSAGE_ GRAPHICS_ STORAGE_ READ - Buffer supports storage reads in graphics stages.
- SDL_
GPU_ BUFFERUSAGE_ INDEX - Buffer is an index buffer.
- SDL_
GPU_ BUFFERUSAGE_ INDIRECT - Buffer is an indirect buffer.
- SDL_
GPU_ BUFFERUSAGE_ VERTEX - Buffer is a vertex buffer.
- SDL_
GPU_ COLORCOMPONENT_ A - the alpha component
- SDL_
GPU_ COLORCOMPONENT_ B - the blue component
- SDL_
GPU_ COLORCOMPONENT_ G - the green component
- SDL_
GPU_ COLORCOMPONENT_ R - the red component
- SDL_
GPU_ COMPAREOP_ ALWAYS - The comparison always evaluates true.
- SDL_
GPU_ COMPAREOP_ EQUAL - The comparison evaluates reference == test.
- SDL_
GPU_ COMPAREOP_ GREATER - The comparison evaluates reference > test.
- SDL_
GPU_ COMPAREOP_ GREATER_ OR_ EQUAL - The comparison evalutes reference >= test.
- SDL_
GPU_ COMPAREOP_ INVALID - SDL_
GPU_ COMPAREOP_ LESS - The comparison evaluates reference < test.
- SDL_
GPU_ COMPAREOP_ LESS_ OR_ EQUAL - The comparison evaluates reference <= test.
- SDL_
GPU_ COMPAREOP_ NEVER - The comparison always evaluates false.
- SDL_
GPU_ COMPAREOP_ NOT_ EQUAL - The comparison evaluates reference != test.
- SDL_
GPU_ CUBEMAPFACE_ NEGATIVEX - SDL_
GPU_ CUBEMAPFACE_ NEGATIVEY - SDL_
GPU_ CUBEMAPFACE_ NEGATIVEZ - SDL_
GPU_ CUBEMAPFACE_ POSITIVEX - SDL_
GPU_ CUBEMAPFACE_ POSITIVEY - SDL_
GPU_ CUBEMAPFACE_ POSITIVEZ - SDL_
GPU_ CULLMODE_ BACK - Back-facing triangles are culled.
- SDL_
GPU_ CULLMODE_ FRONT - Front-facing triangles are culled.
- SDL_
GPU_ CULLMODE_ NONE - No triangles are culled.
- SDL_
GPU_ FILLMODE_ FILL - Polygons will be rendered via rasterization.
- SDL_
GPU_ FILLMODE_ LINE - Polygon edges will be drawn as line segments.
- SDL_
GPU_ FILTER_ LINEAR - Linear filtering.
- SDL_
GPU_ FILTER_ NEAREST - Point filtering.
- SDL_
GPU_ FRONTFACE_ CLOCKWISE - A triangle with clockwise vertex winding will be considered front-facing.
- SDL_
GPU_ FRONTFACE_ COUNTER_ CLOCKWISE - A triangle with counter-clockwise vertex winding will be considered front-facing.
- SDL_
GPU_ INDEXELEMENTSIZE_ 16BIT - The index elements are 16-bit.
- SDL_
GPU_ INDEXELEMENTSIZE_ 32BIT - The index elements are 32-bit.
- SDL_
GPU_ LOADOP_ CLEAR - The contents of the texture will be cleared to a color.
- SDL_
GPU_ LOADOP_ DONT_ CARE - The previous contents of the texture need not be preserved. The contents will be undefined.
- SDL_
GPU_ LOADOP_ LOAD - The previous contents of the texture will be preserved.
- SDL_
GPU_ PRESENTMODE_ IMMEDIATE - SDL_
GPU_ PRESENTMODE_ MAILBOX - SDL_
GPU_ PRESENTMODE_ VSYNC - SDL_
GPU_ PRIMITIVETYPE_ LINELIST - A series of separate lines.
- SDL_
GPU_ PRIMITIVETYPE_ LINESTRIP - A series of connected lines.
- SDL_
GPU_ PRIMITIVETYPE_ POINTLIST - A series of separate points.
- SDL_
GPU_ PRIMITIVETYPE_ TRIANGLELIST - A series of separate triangles.
- SDL_
GPU_ PRIMITIVETYPE_ TRIANGLESTRIP - A series of connected triangles.
- SDL_
GPU_ SAMPLECOUNT_ 1 - No multisampling.
- SDL_
GPU_ SAMPLECOUNT_ 2 - MSAA 2x
- SDL_
GPU_ SAMPLECOUNT_ 4 - MSAA 4x
- SDL_
GPU_ SAMPLECOUNT_ 8 - MSAA 8x
- SDL_
GPU_ SAMPLERADDRESSMODE_ CLAMP_ TO_ EDGE - Specifies that the coordinates will clamp to the 0-1 range.
- SDL_
GPU_ SAMPLERADDRESSMODE_ MIRRORED_ REPEAT - Specifies that the coordinates will wrap around mirrored.
- SDL_
GPU_ SAMPLERADDRESSMODE_ REPEAT - Specifies that the coordinates will wrap around.
- SDL_
GPU_ SAMPLERMIPMAPMODE_ LINEAR - Linear filtering.
- SDL_
GPU_ SAMPLERMIPMAPMODE_ NEAREST - Point filtering.
- SDL_
GPU_ SHADERFORMAT_ DXBC - DXBC SM5_1 shaders for D3D12.
- SDL_
GPU_ SHADERFORMAT_ DXIL - DXIL SM6_0 shaders for D3D12.
- SDL_
GPU_ SHADERFORMAT_ INVALID - SDL_
GPU_ SHADERFORMAT_ METALLIB - Precompiled metallib shaders for Metal.
- SDL_
GPU_ SHADERFORMAT_ MSL - MSL shaders for Metal.
- SDL_
GPU_ SHADERFORMAT_ PRIVATE - Shaders for NDA’d platforms.
- SDL_
GPU_ SHADERFORMAT_ SPIRV - SPIR-V shaders for Vulkan.
- SDL_
GPU_ SHADERSTAGE_ FRAGMENT - SDL_
GPU_ SHADERSTAGE_ VERTEX - SDL_
GPU_ STENCILOP_ DECREMENT_ AND_ CLAMP - Decrements the current value and clamps to 0.
- SDL_
GPU_ STENCILOP_ DECREMENT_ AND_ WRAP - Decrements the current value and wraps to the maximum value.
- SDL_
GPU_ STENCILOP_ INCREMENT_ AND_ CLAMP - Increments the current value and clamps to the maximum value.
- SDL_
GPU_ STENCILOP_ INCREMENT_ AND_ WRAP - Increments the current value and wraps back to 0.
- SDL_
GPU_ STENCILOP_ INVALID - SDL_
GPU_ STENCILOP_ INVERT - Bitwise-inverts the current value.
- SDL_
GPU_ STENCILOP_ KEEP - Keeps the current value.
- SDL_
GPU_ STENCILOP_ REPLACE - Sets the value to reference.
- SDL_
GPU_ STENCILOP_ ZERO - Sets the value to 0.
- SDL_
GPU_ STOREOP_ DONT_ CARE - The contents generated during the render pass are not needed and may be discarded. The contents will be undefined.
- SDL_
GPU_ STOREOP_ RESOLVE - The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture may then be discarded and will be undefined.
- SDL_
GPU_ STOREOP_ RESOLVE_ AND_ STORE - The multisample contents generated during the render pass will be resolved to a non-multisample texture. The contents in the multisample texture will be written to memory.
- SDL_
GPU_ STOREOP_ STORE - The contents generated during the render pass will be written to memory.
- SDL_
GPU_ SWAPCHAINCOMPOSITION_ HDR10_ ST2084 - SDL_
GPU_ SWAPCHAINCOMPOSITION_ HDR_ EXTENDED_ LINEAR - SDL_
GPU_ SWAPCHAINCOMPOSITION_ SDR - SDL_
GPU_ SWAPCHAINCOMPOSITION_ SDR_ LINEAR - SDL_
GPU_ TEXTUREFORMAT_ A8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 4x4_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 4x4_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 4x4_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 5x4_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 5x4_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 5x4_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 5x5_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 5x5_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 5x5_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 6x5_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 6x5_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 6x5_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 6x6_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 6x6_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 6x6_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x5_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x5_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x5_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x6_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x6_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x6_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x8_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 8x8_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x5_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x5_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x5_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x6_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x6_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x6_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x8_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x8_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x10_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x10_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 10x10_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 12x10_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 12x10_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 12x10_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 12x12_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 12x12_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ ASTC_ 12x12_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ B4G4 R4A4_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ B5G5 R5A1_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ B5G6 R5_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ B8G8 R8A8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ B8G8 R8A8_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ BC1_ RGBA_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ BC1_ RGBA_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ BC2_ RGBA_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ BC2_ RGBA_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ BC3_ RGBA_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ BC3_ RGBA_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ BC4_ R_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ BC5_ RG_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ BC6H_ RGB_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ BC6H_ RGB_ UFLOAT - SDL_
GPU_ TEXTUREFORMAT_ BC7_ RGBA_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ BC7_ RGBA_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ D16_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ D24_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ D24_ UNORM_ S8_ UINT - SDL_
GPU_ TEXTUREFORMAT_ D32_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ D32_ FLOAT_ S8_ UINT - SDL_
GPU_ TEXTUREFORMAT_ INVALID - SDL_
GPU_ TEXTUREFORMAT_ R8G8 B8A8_ INT - SDL_
GPU_ TEXTUREFORMAT_ R8G8 B8A8_ SNORM - SDL_
GPU_ TEXTUREFORMAT_ R8G8 B8A8_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R8G8 B8A8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R8G8 B8A8_ UNORM_ SRGB - SDL_
GPU_ TEXTUREFORMAT_ R8G8_ INT - SDL_
GPU_ TEXTUREFORMAT_ R8G8_ SNORM - SDL_
GPU_ TEXTUREFORMAT_ R8G8_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R8G8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R8_ INT - SDL_
GPU_ TEXTUREFORMAT_ R8_ SNORM - SDL_
GPU_ TEXTUREFORMAT_ R8_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R8_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R10G10 B10A2_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R11G11 B10_ UFLOAT - SDL_
GPU_ TEXTUREFORMAT_ R16G16 B16A16_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ R16G16 B16A16_ INT - SDL_
GPU_ TEXTUREFORMAT_ R16G16 B16A16_ SNORM - SDL_
GPU_ TEXTUREFORMAT_ R16G16 B16A16_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R16G16 B16A16_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R16G16_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ R16G16_ INT - SDL_
GPU_ TEXTUREFORMAT_ R16G16_ SNORM - SDL_
GPU_ TEXTUREFORMAT_ R16G16_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R16G16_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R16_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ R16_ INT - SDL_
GPU_ TEXTUREFORMAT_ R16_ SNORM - SDL_
GPU_ TEXTUREFORMAT_ R16_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R16_ UNORM - SDL_
GPU_ TEXTUREFORMAT_ R32G32 B32A32_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ R32G32 B32A32_ INT - SDL_
GPU_ TEXTUREFORMAT_ R32G32 B32A32_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R32G32_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ R32G32_ INT - SDL_
GPU_ TEXTUREFORMAT_ R32G32_ UINT - SDL_
GPU_ TEXTUREFORMAT_ R32_ FLOAT - SDL_
GPU_ TEXTUREFORMAT_ R32_ INT - SDL_
GPU_ TEXTUREFORMAT_ R32_ UINT - SDL_
GPU_ TEXTURETYPE_ 2D - The texture is a 2-dimensional image.
- SDL_
GPU_ TEXTURETYPE_ 2D_ ARRAY - The texture is a 2-dimensional array image.
- SDL_
GPU_ TEXTURETYPE_ 3D - The texture is a 3-dimensional image.
- SDL_
GPU_ TEXTURETYPE_ CUBE - The texture is a cube image.
- SDL_
GPU_ TEXTURETYPE_ CUBE_ ARRAY - The texture is a cube array image.
- SDL_
GPU_ TEXTUREUSAGE_ COLOR_ TARGET - Texture is a color render target.
- SDL_
GPU_ TEXTUREUSAGE_ COMPUTE_ STORAGE_ READ - Texture supports storage reads in the compute stage.
- SDL_
GPU_ TEXTUREUSAGE_ COMPUTE_ STORAGE_ SIMULTANEOUS_ READ_ WRITE - Texture supports reads and writes in the same compute shader. This is NOT equivalent to READ | WRITE.
- SDL_
GPU_ TEXTUREUSAGE_ COMPUTE_ STORAGE_ WRITE - Texture supports storage writes in the compute stage.
- SDL_
GPU_ TEXTUREUSAGE_ DEPTH_ STENCIL_ TARGET - Texture is a depth stencil target.
- SDL_
GPU_ TEXTUREUSAGE_ GRAPHICS_ STORAGE_ READ - Texture supports storage reads in graphics stages.
- SDL_
GPU_ TEXTUREUSAGE_ SAMPLER - Texture supports sampling.
- SDL_
GPU_ TRANSFERBUFFERUSAGE_ DOWNLOAD - SDL_
GPU_ TRANSFERBUFFERUSAGE_ UPLOAD - SDL_
GPU_ VERTEXELEMENTFORMAT_ BYTE2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ BYTE4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ BYTE2_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ BYTE4_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ FLOAT - SDL_
GPU_ VERTEXELEMENTFORMAT_ FLOA T2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ FLOA T3 - SDL_
GPU_ VERTEXELEMENTFORMAT_ FLOA T4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ HALF2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ HALF4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ INT - SDL_
GPU_ VERTEXELEMENTFORMAT_ INT2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ INT3 - SDL_
GPU_ VERTEXELEMENTFORMAT_ INT4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ INVALID - SDL_
GPU_ VERTEXELEMENTFORMAT_ SHOR T2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ SHOR T4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ SHOR T2_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ SHOR T4_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ UBYT E2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ UBYT E4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ UBYT E2_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ UBYT E4_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ UINT - SDL_
GPU_ VERTEXELEMENTFORMAT_ UINT2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ UINT3 - SDL_
GPU_ VERTEXELEMENTFORMAT_ UINT4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ USHOR T2 - SDL_
GPU_ VERTEXELEMENTFORMAT_ USHOR T4 - SDL_
GPU_ VERTEXELEMENTFORMAT_ USHOR T2_ NORM - SDL_
GPU_ VERTEXELEMENTFORMAT_ USHOR T4_ NORM - SDL_
GPU_ VERTEXINPUTRATE_ INSTANCE - Attribute addressing is a function of the instance index.
- SDL_
GPU_ VERTEXINPUTRATE_ VERTEX - Attribute addressing is a function of the vertex index.
- SDL_
PROP_ GPU_ BUFFER_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ COMPUTEPIPELINE_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ DEVICE_ CREATE_ D3D12_ SEMANTIC_ NAME_ STRING - SDL_
PROP_ GPU_ DEVICE_ CREATE_ DEBUGMODE_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ DEVICE_ CREATE_ PREFERLOWPOWER_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ SHADERS_ DXBC_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ SHADERS_ DXIL_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ SHADERS_ METALLIB_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ SHADERS_ MSL_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ SHADERS_ PRIVATE_ BOOLEAN - SDL_
PROP_ GPU_ DEVICE_ CREATE_ SHADERS_ SPIRV_ BOOLEAN - SDL_
PROP_ GPU_ GRAPHICSPIPELINE_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ SAMPLER_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ SHADER_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ D3D12_ CLEAR_ A_ FLOAT - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ D3D12_ CLEAR_ B_ FLOAT - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ D3D12_ CLEAR_ DEPTH_ FLOAT - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ D3D12_ CLEAR_ G_ FLOAT - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ D3D12_ CLEAR_ R_ FLOAT - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ D3D12_ CLEAR_ STENCIL_ UINT8 - SDL_
PROP_ GPU_ TEXTURE_ CREATE_ NAME_ STRING - SDL_
PROP_ GPU_ TRANSFERBUFFER_ CREATE_ NAME_ STRING
Functions§
- SDL_
AcquireGPU ⚠Command Buffer - Acquire a command buffer.
- SDL_
AcquireGPU ⚠Swapchain Texture - Acquire a texture to use in presentation.
- SDL_
BeginGPU ⚠Compute Pass - Begins a compute pass on a command buffer.
- SDL_
BeginGPU ⚠Copy Pass - Begins a copy pass on a command buffer.
- SDL_
BeginGPU ⚠Render Pass - Begins a render pass on a command buffer.
- SDL_
BindGPU ⚠Compute Pipeline - Binds a compute pipeline on a command buffer for use in compute dispatch.
- SDL_
BindGPU ⚠Compute Samplers - Binds texture-sampler pairs for use on the compute shader.
- SDL_
BindGPU ⚠Compute Storage Buffers - Binds storage buffers as readonly for use on the compute pipeline.
- SDL_
BindGPU ⚠Compute Storage Textures - Binds storage textures as readonly for use on the compute pipeline.
- SDL_
BindGPU ⚠Fragment Samplers - Binds texture-sampler pairs for use on the fragment shader.
- SDL_
BindGPU ⚠Fragment Storage Buffers - Binds storage buffers for use on the fragment shader.
- SDL_
BindGPU ⚠Fragment Storage Textures - Binds storage textures for use on the fragment shader.
- SDL_
BindGPU ⚠Graphics Pipeline - Binds a graphics pipeline on a render pass to be used in rendering.
- SDL_
BindGPU ⚠Index Buffer - Binds an index buffer on a command buffer for use with subsequent draw calls.
- SDL_
BindGPU ⚠Vertex Buffers - Binds vertex buffers on a command buffer for use with subsequent draw calls.
- SDL_
BindGPU ⚠Vertex Samplers - Binds texture-sampler pairs for use on the vertex shader.
- SDL_
BindGPU ⚠Vertex Storage Buffers - Binds storage buffers for use on the vertex shader.
- SDL_
BindGPU ⚠Vertex Storage Textures - Binds storage textures for use on the vertex shader.
- SDL_
BlitGPU ⚠Texture - Blits from a source texture region to a destination texture region.
- SDL_
CalculateGPU ⚠Texture Format Size - Calculate the size in bytes of a texture format with dimensions.
- SDL_
CancelGPU ⚠Command Buffer - Cancels a command buffer.
- SDL_
Claim ⚠Window ForGPU Device - Claims a window, creating a swapchain structure for it.
- SDL_
CopyGPU ⚠Buffer ToBuffer - Performs a buffer-to-buffer copy.
- SDL_
CopyGPU ⚠Texture ToTexture - Performs a texture-to-texture copy.
- SDL_
CreateGPU ⚠Buffer - Creates a buffer object to be used in graphics or compute workflows.
- SDL_
CreateGPU ⚠Compute Pipeline - Creates a pipeline object to be used in a compute workflow.
- SDL_
CreateGPU ⚠Device - Creates a GPU context.
- SDL_
CreateGPU ⚠Device With Properties - Creates a GPU context.
- SDL_
CreateGPU ⚠Graphics Pipeline - Creates a pipeline object to be used in a graphics workflow.
- SDL_
CreateGPU ⚠Sampler - Creates a sampler object to be used when binding textures in a graphics workflow.
- SDL_
CreateGPU ⚠Shader - Creates a shader to be used when creating a graphics pipeline.
- SDL_
CreateGPU ⚠Texture - Creates a texture object to be used in graphics or compute workflows.
- SDL_
CreateGPU ⚠Transfer Buffer - Creates a transfer buffer to be used when uploading to or downloading from graphics resources.
- SDL_
DestroyGPU ⚠Device - Destroys a GPU context previously returned by
SDL_CreateGPUDevice
. - SDL_
DispatchGPU ⚠Compute - Dispatches compute work.
- SDL_
DispatchGPU ⚠Compute Indirect - Dispatches compute work with parameters set from a buffer.
- SDL_
Download ⚠FromGPU Buffer - Copies data from a buffer to a transfer buffer on the GPU timeline.
- SDL_
Download ⚠FromGPU Texture - Copies data from a texture to a transfer buffer on the GPU timeline.
- SDL_
DrawGPU ⚠Indexed Primitives - Draws data using bound graphics state with an index buffer and instancing enabled.
- SDL_
DrawGPU ⚠Indexed Primitives Indirect - Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer.
- SDL_
DrawGPU ⚠Primitives - Draws data using bound graphics state.
- SDL_
DrawGPU ⚠Primitives Indirect - Draws data using bound graphics state and with draw parameters set from a buffer.
- SDL_
EndGPU ⚠Compute Pass - Ends the current compute pass.
- SDL_
EndGPU ⚠Copy Pass - Ends the current copy pass.
- SDL_
EndGPU ⚠Render Pass - Ends the given render pass.
- SDL_
GPUSupports ⚠Properties - Checks for GPU runtime support.
- SDL_
GPUSupports ⚠Shader Formats - Checks for GPU runtime support.
- SDL_
GPUTexture ⚠Format Texel Block Size - Obtains the texel block size for a texture format.
- SDL_
GPUTexture ⚠Supports Format - Determines whether a texture format is supported for a given type and usage.
- SDL_
GPUTexture ⚠Supports Sample Count - Determines if a sample count for a texture format is supported.
- SDL_
Generate ⚠Mipmaps ForGPU Texture - Generates mipmaps for the given texture.
- SDL_
GetGPU ⚠Device Driver - Returns the name of the backend used to create this GPU context.
- SDL_
GetGPU ⚠Driver - Get the name of a built in GPU driver.
- SDL_
GetGPU ⚠Shader Formats - Returns the supported shader formats for this GPU context.
- SDL_
GetGPU ⚠Swapchain Texture Format - Obtains the texture format of the swapchain for the given window.
- SDL_
GetNumGPU ⚠Drivers - Get the number of GPU drivers compiled into SDL.
- SDL_
InsertGPU ⚠Debug Label - Inserts an arbitrary string label into the command buffer callstream.
- SDL_
MapGPU ⚠Transfer Buffer - Maps a transfer buffer into application address space.
- SDL_
PopGPU ⚠Debug Group - Ends the most-recently pushed debug group.
- SDL_
PushGPU ⚠Compute Uniform Data - Pushes data to a uniform slot on the command buffer.
- SDL_
PushGPU ⚠Debug Group - Begins a debug group with an arbitary name.
- SDL_
PushGPU ⚠Fragment Uniform Data - Pushes data to a fragment uniform slot on the command buffer.
- SDL_
PushGPU ⚠Vertex Uniform Data - Pushes data to a vertex uniform slot on the command buffer.
- SDL_
QueryGPU ⚠Fence - Checks the status of a fence.
- SDL_
ReleaseGPU ⚠Buffer - Frees the given buffer as soon as it is safe to do so.
- SDL_
ReleaseGPU ⚠Compute Pipeline - Frees the given compute pipeline as soon as it is safe to do so.
- SDL_
ReleaseGPU ⚠Fence - Releases a fence obtained from
SDL_SubmitGPUCommandBufferAndAcquireFence
. - SDL_
ReleaseGPU ⚠Graphics Pipeline - Frees the given graphics pipeline as soon as it is safe to do so.
- SDL_
ReleaseGPU ⚠Sampler - Frees the given sampler as soon as it is safe to do so.
- SDL_
ReleaseGPU ⚠Shader - Frees the given shader as soon as it is safe to do so.
- SDL_
ReleaseGPU ⚠Texture - Frees the given texture as soon as it is safe to do so.
- SDL_
ReleaseGPU ⚠Transfer Buffer - Frees the given transfer buffer as soon as it is safe to do so.
- SDL_
Release ⚠Window FromGPU Device - Unclaims a window, destroying its swapchain structure.
- SDL_
SetGPU ⚠Allowed Frames InFlight - Configures the maximum allowed number of frames in flight.
- SDL_
SetGPU ⚠Blend Constants - Sets the current blend constants on a command buffer.
- SDL_
SetGPU ⚠Buffer Name - Sets an arbitrary string constant to label a buffer.
- SDL_
SetGPU ⚠Scissor - Sets the current scissor state on a command buffer.
- SDL_
SetGPU ⚠Stencil Reference - Sets the current stencil reference value on a command buffer.
- SDL_
SetGPU ⚠Swapchain Parameters - Changes the swapchain parameters for the given claimed window.
- SDL_
SetGPU ⚠Texture Name - Sets an arbitrary string constant to label a texture.
- SDL_
SetGPU ⚠Viewport - Sets the current viewport state on a command buffer.
- SDL_
SubmitGPU ⚠Command Buffer - Submits a command buffer so its commands can be processed on the GPU.
- SDL_
SubmitGPU ⚠Command Buffer AndAcquire Fence - Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer.
- SDL_
UnmapGPU ⚠Transfer Buffer - Unmaps a previously mapped transfer buffer.
- SDL_
Upload ⚠ToGPU Buffer - Uploads data from a transfer buffer to a buffer.
- SDL_
Upload ⚠ToGPU Texture - Uploads data from a transfer buffer to a texture.
- SDL_
Wait ⚠AndAcquireGPU Swapchain Texture - Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.
- SDL_
Wait ⚠ForGPU Fences - Blocks the thread until the given fences are signaled.
- SDL_
Wait ⚠ForGPU Idle - Blocks the thread until the GPU is completely idle.
- SDL_
Wait ⚠ForGPU Swapchain - Blocks the thread until a swapchain texture is available to be acquired.
- SDL_
Window ⚠SupportsGPU Present Mode - Determines whether a presentation mode is supported by the window.
- SDL_
Window ⚠SupportsGPU Swapchain Composition - Determines whether a swapchain composition is supported by the window.
Type Aliases§
- SDL_
GPUBuffer Usage Flags - Specifies how a buffer is intended to be used by the client.
- SDL_
GPUColor Component Flags - Specifies which color components are written in a graphics pipeline.
- SDL_
GPUShader Format - Specifies the format of shader code.
- SDL_
GPUTexture Usage Flags - Specifies how a texture is intended to be used by the client.