SDL3pp
A slim C++ wrapper for SDL3
Loading...
Searching...
No Matches
Classes | Typedefs | Functions | Variables
3D Rendering and GPU Compute

The GPU API offers a cross-platform way for apps to talk to modern graphics hardware. More...

Collaboration diagram for 3D Rendering and GPU Compute:

Classes

struct  SDL::GPUDeviceParam
 Safely wrap GPUDevice for non owning parameters. More...
 
class  SDL::GPUBuffer
 An opaque handle representing a buffer. More...
 
class  SDL::GPUTransferBuffer
 An opaque handle representing a transfer buffer. More...
 
class  SDL::GPUTexture
 An opaque handle representing a texture. More...
 
class  SDL::GPUSampler
 An opaque handle representing a sampler. More...
 
class  SDL::GPUShader
 An opaque handle representing a compiled shader object. More...
 
class  SDL::GPUComputePipeline
 An opaque handle representing a compute pipeline. More...
 
class  SDL::GPUGraphicsPipeline
 An opaque handle representing a graphics pipeline. More...
 
class  SDL::GPURenderPass
 An opaque handle representing a render pass. More...
 
class  SDL::GPUComputePass
 An opaque handle representing a compute pass. More...
 
class  SDL::GPUCopyPass
 An opaque handle representing a copy pass. More...
 
class  SDL::GPUCommandBuffer
 An opaque handle representing a command buffer. More...
 
class  SDL::GPUDevice
 An opaque handle representing the SDL_GPU context. More...
 
struct  SDL::GPUDeviceRef
 Semi-safe reference for GPUDevice. More...
 

Typedefs

using SDL::GPUDeviceRaw = SDL_GPUDevice *
 Alias to raw representation for GPUDevice.
 
using SDL::GPUBufferRaw = SDL_GPUBuffer *
 Alias to raw representation for GPUBuffer.
 
using SDL::GPUTransferBufferRaw = SDL_GPUTransferBuffer *
 Alias to raw representation for GPUTransferBuffer.
 
using SDL::GPUTextureRaw = SDL_GPUTexture *
 Alias to raw representation for GPUTexture.
 
using SDL::GPUSamplerRaw = SDL_GPUSampler *
 Alias to raw representation for GPUSampler.
 
using SDL::GPUShaderRaw = SDL_GPUShader *
 Alias to raw representation for GPUShader.
 
using SDL::GPUComputePipelineRaw = SDL_GPUComputePipeline *
 Alias to raw representation for GPUComputePipeline.
 
using SDL::GPUGraphicsPipelineRaw = SDL_GPUGraphicsPipeline *
 Alias to raw representation for GPUGraphicsPipeline.
 
using SDL::GPUCommandBufferRaw = SDL_GPUCommandBuffer *
 Alias to raw representation for GPUCommandBuffer.
 
using SDL::GPURenderPassRaw = SDL_GPURenderPass *
 Alias to raw representation for GPURenderPass.
 
using SDL::GPUComputePassRaw = SDL_GPUComputePass *
 Alias to raw representation for GPUComputePass.
 
using SDL::GPUCopyPassRaw = SDL_GPUCopyPass *
 Alias to raw representation for GPUCopyPass.
 
using SDL::GPUBufferCreateInfo = SDL_GPUBufferCreateInfo
 A structure specifying the parameters of a buffer. More...
 
using SDL::GPUTransferBufferCreateInfo = SDL_GPUTransferBufferCreateInfo
 A structure specifying the parameters of a transfer buffer. More...
 
using SDL::GPUTextureCreateInfo = SDL_GPUTextureCreateInfo
 A structure specifying the parameters of a texture. More...
 
using SDL::GPUSamplerCreateInfo = SDL_GPUSamplerCreateInfo
 A structure specifying the parameters of a sampler. More...
 
using SDL::GPUShaderCreateInfo = SDL_GPUShaderCreateInfo
 A structure specifying code and metadata for creating a shader object. More...
 
using SDL::GPUComputePipelineCreateInfo = SDL_GPUComputePipelineCreateInfo
 A structure specifying the parameters of a compute pipeline state. More...
 
using SDL::GPUGraphicsPipelineCreateInfo = SDL_GPUGraphicsPipelineCreateInfo
 A structure specifying the parameters of a graphics pipeline state. More...
 
using SDL::GPUViewport = SDL_GPUViewport
 A structure specifying a viewport. More...
 
using SDL::GPUBufferBinding = SDL_GPUBufferBinding
 A structure specifying parameters in a buffer binding call. More...
 
using SDL::GPUIndexElementSize = SDL_GPUIndexElementSize
 Specifies the size of elements in an index buffer. More...
 
using SDL::GPUTextureSamplerBinding = SDL_GPUTextureSamplerBinding
 A structure specifying parameters in a sampler binding call. More...
 
using SDL::GPUBufferRegion = SDL_GPUBufferRegion
 A structure specifying a region of a buffer. More...
 
using SDL::GPUTextureLocation = SDL_GPUTextureLocation
 A structure specifying a location in a texture. More...
 
using SDL::GPUBufferLocation = SDL_GPUBufferLocation
 A structure specifying a location in a buffer. More...
 
using SDL::GPUTextureRegion = SDL_GPUTextureRegion
 A structure specifying a region of a texture. More...
 
using SDL::GPUTextureTransferInfo = SDL_GPUTextureTransferInfo
 A structure specifying parameters related to transferring data to or from a texture. More...
 
using SDL::GPUTransferBufferLocation = SDL_GPUTransferBufferLocation
 A structure specifying a location in a transfer buffer. More...
 
using SDL::GPUColorTargetInfo = SDL_GPUColorTargetInfo
 A structure specifying the parameters of a color target used by a render pass. More...
 
using SDL::GPUDepthStencilTargetInfo = SDL_GPUDepthStencilTargetInfo
 A structure specifying the parameters of a depth-stencil target used by a render pass. More...
 
using SDL::GPUStorageTextureReadWriteBinding = SDL_GPUStorageTextureReadWriteBinding
 A structure specifying parameters related to binding textures in a compute pass. More...
 
using SDL::GPUStorageBufferReadWriteBinding = SDL_GPUStorageBufferReadWriteBinding
 A structure specifying parameters related to binding buffers in a compute pass. More...
 
using SDL::GPUBlitInfo = SDL_GPUBlitInfo
 A structure containing parameters for a blit command. More...
 
using SDL::GPUFence = SDL_GPUFence
 An opaque handle representing a fence. More...
 
using SDL::GPUShaderFormat = Uint32
 Specifies the format of shader code. More...
 
using SDL::GPUSwapchainComposition = SDL_GPUSwapchainComposition
 Specifies the texture format and colorspace of the swapchain textures. More...
 
using SDL::GPUPresentMode = SDL_GPUPresentMode
 Specifies the timing that will be used to present swapchain textures to the OS. More...
 
using SDL::GPUTextureFormat = SDL_GPUTextureFormat
 Specifies the pixel format of a texture. More...
 
using SDL::GPUTextureType = SDL_GPUTextureType
 Specifies the type of a texture. More...
 
using SDL::GPUTextureUsageFlags = Uint32
 Specifies how a texture is intended to be used by the client. More...
 
using SDL::GPUSampleCount = SDL_GPUSampleCount
 Specifies the sample count of a texture. More...
 
using SDL::GPUPrimitiveType = SDL_GPUPrimitiveType
 Specifies the primitive topology of a graphics pipeline. More...
 
using SDL::GPULoadOp = SDL_GPULoadOp
 Specifies how the contents of a texture attached to a render pass are treated at the beginning of the render pass. More...
 
using SDL::GPUStoreOp = SDL_GPUStoreOp
 Specifies how the contents of a texture attached to a render pass are treated at the end of the render pass. More...
 
using SDL::GPUCubeMapFace = SDL_GPUCubeMapFace
 Specifies the face of a cube map. More...
 
using SDL::GPUBufferUsageFlags = Uint32
 Specifies how a buffer is intended to be used by the client. More...
 
using SDL::GPUTransferBufferUsage = SDL_GPUTransferBufferUsage
 Specifies how a transfer buffer is intended to be used by the client. More...
 
using SDL::GPUShaderStage = SDL_GPUShaderStage
 Specifies which stage a shader program corresponds to. More...
 
using SDL::GPUVertexElementFormat = SDL_GPUVertexElementFormat
 Specifies the format of a vertex attribute. More...
 
using SDL::GPUVertexInputRate = SDL_GPUVertexInputRate
 Specifies the rate at which vertex attributes are pulled from buffers. More...
 
using SDL::GPUFillMode = SDL_GPUFillMode
 Specifies the fill mode of the graphics pipeline. More...
 
using SDL::GPUCullMode = SDL_GPUCullMode
 Specifies the facing direction in which triangle faces will be culled. More...
 
using SDL::GPUFrontFace = SDL_GPUFrontFace
 Specifies the vertex winding that will cause a triangle to be determined to be front-facing. More...
 
using SDL::GPUCompareOp = SDL_GPUCompareOp
 Specifies a comparison operator for depth, stencil and sampler operations. More...
 
using SDL::GPUStencilOp = SDL_GPUStencilOp
 Specifies what happens to a stored stencil value if stencil tests fail or pass. More...
 
using SDL::GPUBlendOp = SDL_GPUBlendOp
 Specifies the operator to be used when pixels in a render target are blended with existing pixels in the texture. More...
 
using SDL::GPUBlendFactor = SDL_GPUBlendFactor
 Specifies a blending factor to be used when pixels in a render target are blended with existing pixels in the texture. More...
 
using SDL::GPUColorComponentFlags = Uint8
 Specifies which color components are written in a graphics pipeline. More...
 
using SDL::GPUFilter = SDL_GPUFilter
 Specifies a filter operation used by a sampler. More...
 
using SDL::GPUSamplerMipmapMode = SDL_GPUSamplerMipmapMode
 Specifies a mipmap mode used by a sampler. More...
 
using SDL::GPUSamplerAddressMode = SDL_GPUSamplerAddressMode
 Specifies behavior of texture sampling when the coordinates exceed the 0-1 range. More...
 
using SDL::GPUBlitRegion = SDL_GPUBlitRegion
 A structure specifying a region of a texture used in the blit operation. More...
 
using SDL::GPUIndirectDrawCommand = SDL_GPUIndirectDrawCommand
 A structure specifying the parameters of an indirect draw command. More...
 
using SDL::GPUIndexedIndirectDrawCommand = SDL_GPUIndexedIndirectDrawCommand
 A structure specifying the parameters of an indexed indirect draw command. More...
 
using SDL::GPUIndirectDispatchCommand = SDL_GPUIndirectDispatchCommand
 A structure specifying the parameters of an indexed dispatch command. More...
 
using SDL::GPUVertexBufferDescription = SDL_GPUVertexBufferDescription
 A structure specifying the parameters of vertex buffers used in a graphics pipeline. More...
 
using SDL::GPUVertexAttribute = SDL_GPUVertexAttribute
 A structure specifying a vertex attribute. More...
 
using SDL::GPUVertexInputState = SDL_GPUVertexInputState
 A structure specifying the parameters of a graphics pipeline vertex input state. More...
 
using SDL::GPUStencilOpState = SDL_GPUStencilOpState
 A structure specifying the stencil operation state of a graphics pipeline. More...
 
using SDL::GPUColorTargetBlendState = SDL_GPUColorTargetBlendState
 A structure specifying the blend state of a color target. More...
 
using SDL::GPURasterizerState = SDL_GPURasterizerState
 A structure specifying the parameters of the graphics pipeline rasterizer state. More...
 
using SDL::GPUMultisampleState = SDL_GPUMultisampleState
 A structure specifying the parameters of the graphics pipeline multisample state. More...
 
using SDL::GPUDepthStencilState = SDL_GPUDepthStencilState
 A structure specifying the parameters of the graphics pipeline depth stencil state. More...
 
using SDL::GPUColorTargetDescription = SDL_GPUColorTargetDescription
 A structure specifying the parameters of color targets used in a graphics pipeline. More...
 
using SDL::GPUGraphicsPipelineTargetInfo = SDL_GPUGraphicsPipelineTargetInfo
 A structure specifying the descriptions of render targets used in a graphics pipeline. More...
 

Functions

bool SDL::GPUSupportsShaderFormats (GPUShaderFormat format_flags, StringParam name)
 Checks for GPU runtime support. More...
 
bool SDL::GPUSupportsProperties (PropertiesParam props)
 Checks for GPU runtime support. More...
 
GPUDevice SDL::CreateGPUDevice (GPUShaderFormat format_flags, bool debug_mode, StringParam name)
 Creates a GPU context. More...
 
GPUDevice SDL::CreateGPUDeviceWithProperties (PropertiesParam props)
 Creates a GPU context. More...
 
void SDL::DestroyGPUDevice (GPUDeviceRaw device)
 Destroys a GPU context previously returned by GPUDevice.GPUDevice. More...
 
int SDL::GetNumGPUDrivers ()
 Get the number of GPU drivers compiled into SDL. More...
 
const char * SDL::GetGPUDriver (int index)
 Get the name of a built in GPU driver. More...
 
const char * SDL::GetGPUDeviceDriver (GPUDeviceParam device)
 Returns the name of the backend used to create this GPU context. More...
 
GPUShaderFormat SDL::GetGPUShaderFormats (GPUDeviceParam device)
 Returns the supported shader formats for this GPU context. More...
 
GPUComputePipeline SDL::CreateGPUComputePipeline (GPUDeviceParam device, const GPUComputePipelineCreateInfo &createinfo)
 Creates a pipeline object to be used in a compute workflow. More...
 
GPUGraphicsPipeline SDL::CreateGPUGraphicsPipeline (GPUDeviceParam device, const GPUGraphicsPipelineCreateInfo &createinfo)
 Creates a pipeline object to be used in a graphics workflow. More...
 
GPUSampler SDL::CreateGPUSampler (GPUDeviceParam device, const GPUSamplerCreateInfo &createinfo)
 Creates a sampler object to be used when binding textures in a graphics workflow. More...
 
GPUShader SDL::CreateGPUShader (GPUDeviceParam device, const GPUShaderCreateInfo &createinfo)
 Creates a shader to be used when creating a graphics pipeline. More...
 
GPUTexture SDL::CreateGPUTexture (GPUDeviceParam device, const GPUTextureCreateInfo &createinfo)
 Creates a texture object to be used in graphics or compute workflows. More...
 
GPUBuffer SDL::CreateGPUBuffer (GPUDeviceParam device, const GPUBufferCreateInfo &createinfo)
 Creates a buffer object to be used in graphics or compute workflows. More...
 
GPUTransferBuffer SDL::CreateGPUTransferBuffer (GPUDeviceParam device, const GPUTransferBufferCreateInfo &createinfo)
 Creates a transfer buffer to be used when uploading to or downloading from graphics resources. More...
 
void SDL::SetGPUBufferName (GPUDeviceParam device, GPUBuffer buffer, StringParam text)
 Sets an arbitrary string constant to label a buffer. More...
 
void SDL::SetGPUTextureName (GPUDeviceParam device, GPUTexture texture, StringParam text)
 Sets an arbitrary string constant to label a texture. More...
 
void SDL::InsertGPUDebugLabel (GPUCommandBuffer command_buffer, StringParam text)
 Inserts an arbitrary string label into the command buffer callstream. More...
 
void SDL::PushGPUDebugGroup (GPUCommandBuffer command_buffer, StringParam name)
 Begins a debug group with an arbitrary name. More...
 
void SDL::PopGPUDebugGroup (GPUCommandBuffer command_buffer)
 Ends the most-recently pushed debug group. More...
 
void SDL::ReleaseGPUTexture (GPUDeviceParam device, GPUTexture texture)
 Frees the given texture as soon as it is safe to do so. More...
 
void SDL::ReleaseGPUSampler (GPUDeviceParam device, GPUSampler sampler)
 Frees the given sampler as soon as it is safe to do so. More...
 
void SDL::ReleaseGPUBuffer (GPUDeviceParam device, GPUBuffer buffer)
 Frees the given buffer as soon as it is safe to do so. More...
 
void SDL::ReleaseGPUTransferBuffer (GPUDeviceParam device, GPUTransferBuffer transfer_buffer)
 Frees the given transfer buffer as soon as it is safe to do so. More...
 
void SDL::ReleaseGPUComputePipeline (GPUDeviceParam device, GPUComputePipeline compute_pipeline)
 Frees the given compute pipeline as soon as it is safe to do so. More...
 
void SDL::ReleaseGPUShader (GPUDeviceParam device, GPUShader shader)
 Frees the given shader as soon as it is safe to do so. More...
 
void SDL::ReleaseGPUGraphicsPipeline (GPUDeviceParam device, GPUGraphicsPipeline graphics_pipeline)
 Frees the given graphics pipeline as soon as it is safe to do so. More...
 
GPUCommandBuffer SDL::AcquireGPUCommandBuffer (GPUDeviceParam device)
 Acquire a command buffer. More...
 
void SDL::PushGPUVertexUniformData (GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
 Pushes data to a vertex uniform slot on the command buffer. More...
 
void SDL::PushGPUFragmentUniformData (GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
 Pushes data to a fragment uniform slot on the command buffer. More...
 
void SDL::PushGPUComputeUniformData (GPUCommandBuffer command_buffer, Uint32 slot_index, SourceBytes data)
 Pushes data to a uniform slot on the command buffer. More...
 
GPURenderPass SDL::BeginGPURenderPass (GPUCommandBuffer command_buffer, std::span< const GPUColorTargetInfo > color_target_infos, OptionalRef< const GPUDepthStencilTargetInfo > depth_stencil_target_info)
 Begins a render pass on a command buffer. More...
 
void SDL::BindGPUGraphicsPipeline (GPURenderPass render_pass, GPUGraphicsPipeline graphics_pipeline)
 Binds a graphics pipeline on a render pass to be used in rendering. More...
 
void SDL::SetGPUViewport (GPURenderPass render_pass, const GPUViewport &viewport)
 Sets the current viewport state on a command buffer. More...
 
void SDL::SetGPUScissor (GPURenderPass render_pass, const RectRaw &scissor)
 Sets the current scissor state on a command buffer. More...
 
void SDL::SetGPUBlendConstants (GPURenderPass render_pass, FColorRaw blend_constants)
 Sets the current blend constants on a command buffer. More...
 
void SDL::SetGPUStencilReference (GPURenderPass render_pass, Uint8 reference)
 Sets the current stencil reference value on a command buffer. More...
 
void SDL::BindGPUVertexBuffers (GPURenderPass render_pass, Uint32 first_slot, std::span< const GPUBufferBinding > bindings)
 Binds vertex buffers on a command buffer for use with subsequent draw calls. More...
 
void SDL::BindGPUIndexBuffer (GPURenderPass render_pass, const GPUBufferBinding &binding, GPUIndexElementSize index_element_size)
 Binds an index buffer on a command buffer for use with subsequent draw calls. More...
 
void SDL::BindGPUVertexSamplers (GPURenderPass render_pass, Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
 Binds texture-sampler pairs for use on the vertex shader. More...
 
void SDL::BindGPUVertexStorageTextures (GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
 Binds storage textures for use on the vertex shader. More...
 
void SDL::BindGPUVertexStorageBuffers (GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
 Binds storage buffers for use on the vertex shader. More...
 
void SDL::BindGPUFragmentSamplers (GPURenderPass render_pass, Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
 Binds texture-sampler pairs for use on the fragment shader. More...
 
void SDL::BindGPUFragmentStorageTextures (GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
 Binds storage textures for use on the fragment shader. More...
 
void SDL::BindGPUFragmentStorageBuffers (GPURenderPass render_pass, Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
 Binds storage buffers for use on the fragment shader. More...
 
void SDL::DrawGPUIndexedPrimitives (GPURenderPass render_pass, Uint32 num_indices, Uint32 num_instances, Uint32 first_index, Sint32 vertex_offset, Uint32 first_instance)
 Draws data using bound graphics state with an index buffer and instancing enabled. More...
 
void SDL::DrawGPUPrimitives (GPURenderPass render_pass, Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)
 Draws data using bound graphics state. More...
 
void SDL::DrawGPUPrimitivesIndirect (GPURenderPass render_pass, GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
 Draws data using bound graphics state and with draw parameters set from a buffer. More...
 
void SDL::DrawGPUIndexedPrimitivesIndirect (GPURenderPass render_pass, GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
 Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer. More...
 
void SDL::EndGPURenderPass (GPURenderPass render_pass)
 Ends the given render pass. More...
 
GPUComputePass SDL::BeginGPUComputePass (GPUCommandBuffer command_buffer, std::span< const GPUStorageTextureReadWriteBinding > storage_texture_bindings, std::span< const GPUStorageBufferReadWriteBinding > storage_buffer_bindings)
 Begins a compute pass on a command buffer. More...
 
void SDL::BindGPUComputePipeline (GPUComputePass compute_pass, GPUComputePipeline compute_pipeline)
 Binds a compute pipeline on a command buffer for use in compute dispatch. More...
 
void SDL::BindGPUComputeSamplers (GPUComputePass compute_pass, Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
 Binds texture-sampler pairs for use on the compute shader. More...
 
void SDL::BindGPUComputeStorageTextures (GPUComputePass compute_pass, Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
 Binds storage textures as readonly for use on the compute pipeline. More...
 
void SDL::BindGPUComputeStorageBuffers (GPUComputePass compute_pass, Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
 Binds storage buffers as readonly for use on the compute pipeline. More...
 
void SDL::DispatchGPUCompute (GPUComputePass compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
 Dispatches compute work. More...
 
void SDL::DispatchGPUComputeIndirect (GPUComputePass compute_pass, GPUBuffer buffer, Uint32 offset)
 Dispatches compute work with parameters set from a buffer. More...
 
void SDL::EndGPUComputePass (GPUComputePass compute_pass)
 Ends the current compute pass. More...
 
void * SDL::MapGPUTransferBuffer (GPUDeviceParam device, GPUTransferBuffer transfer_buffer, bool cycle)
 Maps a transfer buffer into application address space. More...
 
void SDL::UnmapGPUTransferBuffer (GPUDeviceParam device, GPUTransferBuffer transfer_buffer)
 Unmaps a previously mapped transfer buffer. More...
 
GPUCopyPass SDL::BeginGPUCopyPass (GPUCommandBuffer command_buffer)
 Begins a copy pass on a command buffer. More...
 
void SDL::UploadToGPUTexture (GPUCopyPass copy_pass, const GPUTextureTransferInfo &source, const GPUTextureRegion &destination, bool cycle)
 Uploads data from a transfer buffer to a texture. More...
 
void SDL::UploadToGPUBuffer (GPUCopyPass copy_pass, const GPUTransferBufferLocation &source, const GPUBufferRegion &destination, bool cycle)
 Uploads data from a transfer buffer to a buffer. More...
 
void SDL::CopyGPUTextureToTexture (GPUCopyPass copy_pass, const GPUTextureLocation &source, const GPUTextureLocation &destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)
 Performs a texture-to-texture copy. More...
 
void SDL::CopyGPUBufferToBuffer (GPUCopyPass copy_pass, const GPUBufferLocation &source, const GPUBufferLocation &destination, Uint32 size, bool cycle)
 Performs a buffer-to-buffer copy. More...
 
void SDL::DownloadFromGPUTexture (GPUCopyPass copy_pass, const GPUTextureRegion &source, const GPUTextureTransferInfo &destination)
 Copies data from a texture to a transfer buffer on the GPU timeline. More...
 
void SDL::DownloadFromGPUBuffer (GPUCopyPass copy_pass, const GPUBufferRegion &source, const GPUTransferBufferLocation &destination)
 Copies data from a buffer to a transfer buffer on the GPU timeline. More...
 
void SDL::EndGPUCopyPass (GPUCopyPass copy_pass)
 Ends the current copy pass. More...
 
void SDL::GenerateMipmapsForGPUTexture (GPUCommandBuffer command_buffer, GPUTexture texture)
 Generates mipmaps for the given texture. More...
 
void SDL::BlitGPUTexture (GPUCommandBuffer command_buffer, const GPUBlitInfo &info)
 Blits from a source texture region to a destination texture region. More...
 
bool SDL::WindowSupportsGPUSwapchainComposition (GPUDeviceParam device, WindowParam window, GPUSwapchainComposition swapchain_composition)
 Determines whether a swapchain composition is supported by the window. More...
 
bool SDL::WindowSupportsGPUPresentMode (GPUDeviceParam device, WindowParam window, GPUPresentMode present_mode)
 Determines whether a presentation mode is supported by the window. More...
 
void SDL::ClaimWindowForGPUDevice (GPUDeviceParam device, WindowParam window)
 Claims a window, creating a swapchain structure for it. More...
 
void SDL::ReleaseWindowFromGPUDevice (GPUDeviceParam device, WindowParam window)
 Unclaims a window, destroying its swapchain structure. More...
 
bool SDL::SetGPUSwapchainParameters (GPUDeviceParam device, WindowParam window, GPUSwapchainComposition swapchain_composition, GPUPresentMode present_mode)
 Changes the swapchain parameters for the given claimed window. More...
 
bool SDL::SetGPUAllowedFramesInFlight (GPUDeviceParam device, Uint32 allowed_frames_in_flight)
 Configures the maximum allowed number of frames in flight. More...
 
GPUTextureFormat SDL::GetGPUSwapchainTextureFormat (GPUDeviceParam device, WindowParam window)
 Obtains the texture format of the swapchain for the given window. More...
 
GPUTexture SDL::AcquireGPUSwapchainTexture (GPUCommandBuffer command_buffer, WindowParam window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
 Acquire a texture to use in presentation. More...
 
void SDL::WaitForGPUSwapchain (GPUDeviceParam device, WindowParam window)
 Blocks the thread until a swapchain texture is available to be acquired. More...
 
GPUTexture SDL::WaitAndAcquireGPUSwapchainTexture (GPUCommandBuffer command_buffer, WindowParam window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
 Blocks the thread until a swapchain texture is available to be acquired, and then acquires it. More...
 
void SDL::SubmitGPUCommandBuffer (GPUCommandBuffer command_buffer)
 Submits a command buffer so its commands can be processed on the GPU. More...
 
GPUFenceSDL::SubmitGPUCommandBufferAndAcquireFence (GPUCommandBuffer command_buffer)
 Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer. More...
 
void SDL::CancelGPUCommandBuffer (GPUCommandBuffer command_buffer)
 Cancels a command buffer. More...
 
void SDL::WaitForGPUIdle (GPUDeviceParam device)
 Blocks the thread until the GPU is completely idle. More...
 
void SDL::WaitForGPUFences (GPUDeviceParam device, bool wait_all, std::span< GPUFence *const > fences)
 Blocks the thread until the given fences are signaled. More...
 
bool SDL::QueryGPUFence (GPUDeviceParam device, GPUFence *fence)
 Checks the status of a fence. More...
 
void SDL::ReleaseGPUFence (GPUDeviceParam device, GPUFence *fence)
 Releases a fence obtained from GPUCommandBuffer.SubmitAndAcquireFence. More...
 
Uint32 SDL::GPUTextureFormatTexelBlockSize (GPUTextureFormat format)
 Obtains the texel block size for a texture format. More...
 
bool SDL::GPUTextureSupportsFormat (GPUDeviceParam device, GPUTextureFormat format, GPUTextureType type, GPUTextureUsageFlags usage)
 Determines whether a texture format is supported for a given type and usage. More...
 
bool SDL::GPUTextureSupportsSampleCount (GPUDeviceParam device, GPUTextureFormat format, GPUSampleCount sample_count)
 Determines if a sample count for a texture format is supported. More...
 
Uint32 SDL::CalculateGPUTextureFormatSize (GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count)
 Calculate the size in bytes of a texture format with dimensions. More...
 
void SDL::GPUDevice::Destroy ()
 Destroys a GPU context previously returned by GPUDevice.GPUDevice. More...
 
const char * SDL::GPUDevice::GetDriver ()
 Returns the name of the backend used to create this GPU context. More...
 
GPUShaderFormat SDL::GPUDevice::GetShaderFormats ()
 Returns the supported shader formats for this GPU context. More...
 
GPUComputePipeline SDL::GPUDevice::CreateComputePipeline (const GPUComputePipelineCreateInfo &createinfo)
 Creates a pipeline object to be used in a compute workflow. More...
 
GPUGraphicsPipeline SDL::GPUDevice::CreateGraphicsPipeline (const GPUGraphicsPipelineCreateInfo &createinfo)
 Creates a pipeline object to be used in a graphics workflow. More...
 
GPUSampler SDL::GPUDevice::CreateSampler (const GPUSamplerCreateInfo &createinfo)
 Creates a sampler object to be used when binding textures in a graphics workflow. More...
 
GPUShader SDL::GPUDevice::CreateShader (const GPUShaderCreateInfo &createinfo)
 Creates a shader to be used when creating a graphics pipeline. More...
 
GPUTexture SDL::GPUDevice::CreateTexture (const GPUTextureCreateInfo &createinfo)
 Creates a texture object to be used in graphics or compute workflows. More...
 
GPUBuffer SDL::GPUDevice::CreateBuffer (const GPUBufferCreateInfo &createinfo)
 Creates a buffer object to be used in graphics or compute workflows. More...
 
GPUTransferBuffer SDL::GPUDevice::CreateTransferBuffer (const GPUTransferBufferCreateInfo &createinfo)
 Creates a transfer buffer to be used when uploading to or downloading from graphics resources. More...
 
void SDL::GPUDevice::SetBufferName (GPUBuffer buffer, StringParam text)
 Sets an arbitrary string constant to label a buffer. More...
 
void SDL::GPUDevice::SetTextureName (GPUTexture texture, StringParam text)
 Sets an arbitrary string constant to label a texture. More...
 
void SDL::GPUCommandBuffer::InsertDebugLabel (StringParam text)
 Inserts an arbitrary string label into the command buffer callstream. More...
 
void SDL::GPUCommandBuffer::PushDebugGroup (StringParam name)
 Begins a debug group with an arbitrary name. More...
 
void SDL::GPUCommandBuffer::PopDebugGroup ()
 Ends the most-recently pushed debug group. More...
 
void SDL::GPUDevice::ReleaseTexture (GPUTexture texture)
 Frees the given texture as soon as it is safe to do so. More...
 
void SDL::GPUDevice::ReleaseSampler (GPUSampler sampler)
 Frees the given sampler as soon as it is safe to do so. More...
 
void SDL::GPUDevice::ReleaseBuffer (GPUBuffer buffer)
 Frees the given buffer as soon as it is safe to do so. More...
 
void SDL::GPUDevice::ReleaseTransferBuffer (GPUTransferBuffer transfer_buffer)
 Frees the given transfer buffer as soon as it is safe to do so. More...
 
void SDL::GPUDevice::ReleaseComputePipeline (GPUComputePipeline compute_pipeline)
 Frees the given compute pipeline as soon as it is safe to do so. More...
 
void SDL::GPUDevice::ReleaseShader (GPUShader shader)
 Frees the given shader as soon as it is safe to do so. More...
 
void SDL::GPUDevice::ReleaseGraphicsPipeline (GPUGraphicsPipeline graphics_pipeline)
 Frees the given graphics pipeline as soon as it is safe to do so. More...
 
GPUCommandBuffer SDL::GPUDevice::AcquireCommandBuffer ()
 Acquire a command buffer. More...
 
void SDL::GPUCommandBuffer::PushVertexUniformData (Uint32 slot_index, SourceBytes data)
 Pushes data to a vertex uniform slot on the command buffer. More...
 
void SDL::GPUCommandBuffer::PushFragmentUniformData (Uint32 slot_index, SourceBytes data)
 Pushes data to a fragment uniform slot on the command buffer. More...
 
void SDL::GPUCommandBuffer::PushComputeUniformData (Uint32 slot_index, SourceBytes data)
 Pushes data to a uniform slot on the command buffer. More...
 
GPURenderPass SDL::GPUCommandBuffer::BeginRenderPass (std::span< const GPUColorTargetInfo > color_target_infos, OptionalRef< const GPUDepthStencilTargetInfo > depth_stencil_target_info)
 Begins a render pass on a command buffer. More...
 
void SDL::GPURenderPass::BindPipeline (GPUGraphicsPipeline graphics_pipeline)
 Binds a graphics pipeline on a render pass to be used in rendering. More...
 
void SDL::GPURenderPass::SetViewport (const GPUViewport &viewport)
 Sets the current viewport state on a command buffer. More...
 
void SDL::GPURenderPass::SetScissor (const RectRaw &scissor)
 Sets the current scissor state on a command buffer. More...
 
void SDL::GPURenderPass::SetBlendConstants (FColorRaw blend_constants)
 Sets the current blend constants on a command buffer. More...
 
void SDL::GPURenderPass::SetStencilReference (Uint8 reference)
 Sets the current stencil reference value on a command buffer. More...
 
void SDL::GPURenderPass::BindVertexBuffers (Uint32 first_slot, std::span< const GPUBufferBinding > bindings)
 Binds vertex buffers on a command buffer for use with subsequent draw calls. More...
 
void SDL::GPURenderPass::BindIndexBuffer (const GPUBufferBinding &binding, GPUIndexElementSize index_element_size)
 Binds an index buffer on a command buffer for use with subsequent draw calls. More...
 
void SDL::GPURenderPass::BindVertexSamplers (Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
 Binds texture-sampler pairs for use on the vertex shader. More...
 
void SDL::GPURenderPass::BindVertexStorageTextures (Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
 Binds storage textures for use on the vertex shader. More...
 
void SDL::GPURenderPass::BindVertexStorageBuffers (Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
 Binds storage buffers for use on the vertex shader. More...
 
void SDL::GPURenderPass::BindFragmentSamplers (Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
 Binds texture-sampler pairs for use on the fragment shader. More...
 
void SDL::GPURenderPass::BindFragmentStorageTextures (Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
 Binds storage textures for use on the fragment shader. More...
 
void SDL::GPURenderPass::BindFragmentStorageBuffers (Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
 Binds storage buffers for use on the fragment shader. More...
 
void SDL::GPURenderPass::DrawIndexedPrimitives (Uint32 num_indices, Uint32 num_instances, Uint32 first_index, Sint32 vertex_offset, Uint32 first_instance)
 Draws data using bound graphics state with an index buffer and instancing enabled. More...
 
void SDL::GPURenderPass::DrawPrimitives (Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)
 Draws data using bound graphics state. More...
 
void SDL::GPURenderPass::DrawPrimitivesIndirect (GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
 Draws data using bound graphics state and with draw parameters set from a buffer. More...
 
void SDL::GPURenderPass::DrawIndexedPrimitivesIndirect (GPUBuffer buffer, Uint32 offset, Uint32 draw_count)
 Draws data using bound graphics state with an index buffer enabled and with draw parameters set from a buffer. More...
 
void SDL::GPURenderPass::End ()
 Ends the given render pass. More...
 
GPUComputePass SDL::GPUCommandBuffer::BeginComputePass (std::span< const GPUStorageTextureReadWriteBinding > storage_texture_bindings, std::span< const GPUStorageBufferReadWriteBinding > storage_buffer_bindings)
 Begins a compute pass on a command buffer. More...
 
void SDL::GPUComputePass::BindPipeline (GPUComputePipeline compute_pipeline)
 Binds a compute pipeline on a command buffer for use in compute dispatch. More...
 
void SDL::GPUComputePass::BindSamplers (Uint32 first_slot, std::span< const GPUTextureSamplerBinding > texture_sampler_bindings)
 Binds texture-sampler pairs for use on the compute shader. More...
 
void SDL::GPUComputePass::BindStorageTextures (Uint32 first_slot, SpanRef< const GPUTextureRaw > storage_textures)
 Binds storage textures as readonly for use on the compute pipeline. More...
 
void SDL::GPUComputePass::BindStorageBuffers (Uint32 first_slot, SpanRef< const GPUBufferRaw > storage_buffers)
 Binds storage buffers as readonly for use on the compute pipeline. More...
 
void SDL::GPUComputePass::Dispatch (Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)
 Dispatches compute work. More...
 
void SDL::GPUComputePass::DispatchIndirect (GPUBuffer buffer, Uint32 offset)
 Dispatches compute work with parameters set from a buffer. More...
 
void SDL::GPUComputePass::End ()
 Ends the current compute pass. More...
 
void * SDL::GPUDevice::MapTransferBuffer (GPUTransferBuffer transfer_buffer, bool cycle)
 Maps a transfer buffer into application address space. More...
 
void SDL::GPUDevice::UnmapTransferBuffer (GPUTransferBuffer transfer_buffer)
 Unmaps a previously mapped transfer buffer. More...
 
GPUCopyPass SDL::GPUCommandBuffer::BeginCopyPass ()
 Begins a copy pass on a command buffer. More...
 
void SDL::GPUCopyPass::UploadToTexture (const GPUTextureTransferInfo &source, const GPUTextureRegion &destination, bool cycle)
 Uploads data from a transfer buffer to a texture. More...
 
void SDL::GPUCopyPass::UploadToBuffer (const GPUTransferBufferLocation &source, const GPUBufferRegion &destination, bool cycle)
 Uploads data from a transfer buffer to a buffer. More...
 
void SDL::GPUCopyPass::CopyTextureToTexture (const GPUTextureLocation &source, const GPUTextureLocation &destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)
 Performs a texture-to-texture copy. More...
 
void SDL::GPUCopyPass::CopyBufferToBuffer (const GPUBufferLocation &source, const GPUBufferLocation &destination, Uint32 size, bool cycle)
 Performs a buffer-to-buffer copy. More...
 
void SDL::GPUCopyPass::DownloadFromTexture (const GPUTextureRegion &source, const GPUTextureTransferInfo &destination)
 Copies data from a texture to a transfer buffer on the GPU timeline. More...
 
void SDL::GPUCopyPass::DownloadFromBuffer (const GPUBufferRegion &source, const GPUTransferBufferLocation &destination)
 Copies data from a buffer to a transfer buffer on the GPU timeline. More...
 
void SDL::GPUCopyPass::End ()
 Ends the current copy pass. More...
 
void SDL::GPUCommandBuffer::GenerateMipmapsForTexture (GPUTexture texture)
 Generates mipmaps for the given texture. More...
 
void SDL::GPUCommandBuffer::BlitTexture (const GPUBlitInfo &info)
 Blits from a source texture region to a destination texture region. More...
 
bool SDL::GPUDevice::WindowSupportsSwapchainComposition (WindowParam window, GPUSwapchainComposition swapchain_composition)
 Determines whether a swapchain composition is supported by the window. More...
 
bool SDL::GPUDevice::WindowSupportsPresentMode (WindowParam window, GPUPresentMode present_mode)
 Determines whether a presentation mode is supported by the window. More...
 
void SDL::GPUDevice::ClaimWindow (WindowParam window)
 Claims a window, creating a swapchain structure for it. More...
 
void SDL::GPUDevice::ReleaseWindow (WindowParam window)
 Unclaims a window, destroying its swapchain structure. More...
 
bool SDL::GPUDevice::SetSwapchainParameters (WindowParam window, GPUSwapchainComposition swapchain_composition, GPUPresentMode present_mode)
 Changes the swapchain parameters for the given claimed window. More...
 
bool SDL::GPUDevice::SetAllowedFramesInFlight (Uint32 allowed_frames_in_flight)
 Configures the maximum allowed number of frames in flight. More...
 
GPUTextureFormat SDL::GPUDevice::GetSwapchainTextureFormat (WindowParam window)
 Obtains the texture format of the swapchain for the given window. More...
 
GPUTexture SDL::GPUCommandBuffer::AcquireSwapchainTexture (WindowParam window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
 Acquire a texture to use in presentation. More...
 
void SDL::GPUDevice::WaitForSwapchain (WindowParam window)
 Blocks the thread until a swapchain texture is available to be acquired. More...
 
GPUTexture SDL::GPUCommandBuffer::WaitAndAcquireSwapchainTexture (WindowParam window, Uint32 *swapchain_texture_width=nullptr, Uint32 *swapchain_texture_height=nullptr)
 Blocks the thread until a swapchain texture is available to be acquired, and then acquires it. More...
 
void SDL::GPUCommandBuffer::Submit ()
 Submits a command buffer so its commands can be processed on the GPU. More...
 
GPUFenceSDL::GPUCommandBuffer::SubmitAndAcquireFence ()
 Submits a command buffer so its commands can be processed on the GPU, and acquires a fence associated with the command buffer. More...
 
void SDL::GPUCommandBuffer::Cancel ()
 Cancels a command buffer. More...
 
void SDL::GPUDevice::WaitForIdle ()
 Blocks the thread until the GPU is completely idle. More...
 
void SDL::GPUDevice::WaitForFences (bool wait_all, std::span< GPUFence *const > fences)
 Blocks the thread until the given fences are signaled. More...
 
bool SDL::GPUDevice::QueryFence (GPUFence *fence)
 Checks the status of a fence. More...
 
void SDL::GPUDevice::ReleaseFence (GPUFence *fence)
 Releases a fence obtained from GPUCommandBuffer.SubmitAndAcquireFence. More...
 
bool SDL::GPUDevice::TextureSupportsFormat (GPUTextureFormat format, GPUTextureType type, GPUTextureUsageFlags usage)
 Determines whether a texture format is supported for a given type and usage. More...
 
bool SDL::GPUDevice::TextureSupportsSampleCount (GPUTextureFormat format, GPUSampleCount sample_count)
 Determines if a sample count for a texture format is supported. More...
 

Variables

constexpr GPUIndexElementSize SDL::GPU_INDEXELEMENTSIZE_16BIT
 The index elements are 16-bit. More...
 
constexpr GPUIndexElementSize SDL::GPU_INDEXELEMENTSIZE_32BIT
 The index elements are 32-bit. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_INVALID
 INVALID. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_PRIVATE
 Shaders for NDA'd platforms. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_SPIRV
 SPIR-V shaders for Vulkan. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_DXBC
 DXBC SM5_1 shaders for D3D12. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_DXIL
 DXIL SM6_0 shaders for D3D12. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_MSL
 MSL shaders for Metal. More...
 
constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_METALLIB
 Precompiled metallib shaders for Metal. More...
 
constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_SDR
 GPU_SWAPCHAINCOMPOSITION_SDR. More...
 
constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR
 GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR. More...
 
constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR
 GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR. More...
 
constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084
 GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084. More...
 
constexpr GPUPresentMode SDL::GPU_PRESENTMODE_VSYNC
 GPU_PRESENTMODE_VSYNC. More...
 
constexpr GPUPresentMode SDL::GPU_PRESENTMODE_IMMEDIATE
 GPU_PRESENTMODE_IMMEDIATE. More...
 
constexpr GPUPresentMode SDL::GPU_PRESENTMODE_MAILBOX
 GPU_PRESENTMODE_MAILBOX. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_INVALID
 GPU_TEXTUREFORMAT_INVALID. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_A8_UNORM
 GPU_TEXTUREFORMAT_A8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_UNORM
 GPU_TEXTUREFORMAT_R8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_UNORM
 GPU_TEXTUREFORMAT_R8G8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
 GPU_TEXTUREFORMAT_R8G8B8A8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_UNORM
 GPU_TEXTUREFORMAT_R16_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_UNORM
 GPU_TEXTUREFORMAT_R16G16_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_UNORM
 GPU_TEXTUREFORMAT_R16G16B16A16_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R10G10B10A2_UNORM
 GPU_TEXTUREFORMAT_R10G10B10A2_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B5G6R5_UNORM
 GPU_TEXTUREFORMAT_B5G6R5_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B5G5R5A1_UNORM
 GPU_TEXTUREFORMAT_B5G5R5A1_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B4G4R4A4_UNORM
 GPU_TEXTUREFORMAT_B4G4R4A4_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B8G8R8A8_UNORM
 GPU_TEXTUREFORMAT_B8G8R8A8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC1_RGBA_UNORM
 GPU_TEXTUREFORMAT_BC1_RGBA_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC2_RGBA_UNORM
 GPU_TEXTUREFORMAT_BC2_RGBA_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC3_RGBA_UNORM
 GPU_TEXTUREFORMAT_BC3_RGBA_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC4_R_UNORM
 GPU_TEXTUREFORMAT_BC4_R_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC5_RG_UNORM
 GPU_TEXTUREFORMAT_BC5_RG_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC7_RGBA_UNORM
 GPU_TEXTUREFORMAT_BC7_RGBA_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT
 GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT
 GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_SNORM
 GPU_TEXTUREFORMAT_R8_SNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_SNORM
 GPU_TEXTUREFORMAT_R8G8_SNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_SNORM
 GPU_TEXTUREFORMAT_R8G8B8A8_SNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_SNORM
 GPU_TEXTUREFORMAT_R16_SNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_SNORM
 GPU_TEXTUREFORMAT_R16G16_SNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_SNORM
 GPU_TEXTUREFORMAT_R16G16B16A16_SNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_FLOAT
 GPU_TEXTUREFORMAT_R16_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_FLOAT
 GPU_TEXTUREFORMAT_R16G16_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT
 GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32_FLOAT
 GPU_TEXTUREFORMAT_R32_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32_FLOAT
 GPU_TEXTUREFORMAT_R32G32_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT
 GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R11G11B10_UFLOAT
 GPU_TEXTUREFORMAT_R11G11B10_UFLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_UINT
 GPU_TEXTUREFORMAT_R8_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_UINT
 GPU_TEXTUREFORMAT_R8G8_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_UINT
 GPU_TEXTUREFORMAT_R8G8B8A8_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_UINT
 GPU_TEXTUREFORMAT_R16_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_UINT
 GPU_TEXTUREFORMAT_R16G16_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_UINT
 GPU_TEXTUREFORMAT_R16G16B16A16_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32_UINT
 GPU_TEXTUREFORMAT_R32_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32_UINT
 GPU_TEXTUREFORMAT_R32G32_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32B32A32_UINT
 GPU_TEXTUREFORMAT_R32G32B32A32_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_INT
 GPU_TEXTUREFORMAT_R8_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_INT
 GPU_TEXTUREFORMAT_R8G8_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_INT
 GPU_TEXTUREFORMAT_R8G8B8A8_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_INT
 GPU_TEXTUREFORMAT_R16_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_INT
 GPU_TEXTUREFORMAT_R16G16_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_INT
 GPU_TEXTUREFORMAT_R16G16B16A16_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32_INT
 GPU_TEXTUREFORMAT_R32_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32_INT
 GPU_TEXTUREFORMAT_R32G32_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32B32A32_INT
 GPU_TEXTUREFORMAT_R32G32B32A32_INT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB
 GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB
 GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB
 GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB
 GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB
 GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB
 GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D16_UNORM
 GPU_TEXTUREFORMAT_D16_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D24_UNORM
 GPU_TEXTUREFORMAT_D24_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D32_FLOAT
 GPU_TEXTUREFORMAT_D32_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT
 GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT
 GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_4x4_UNORM
 GPU_TEXTUREFORMAT_ASTC_4x4_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x4_UNORM
 GPU_TEXTUREFORMAT_ASTC_5x4_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x5_UNORM
 GPU_TEXTUREFORMAT_ASTC_5x5_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x5_UNORM
 GPU_TEXTUREFORMAT_ASTC_6x5_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x6_UNORM
 GPU_TEXTUREFORMAT_ASTC_6x6_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x5_UNORM
 GPU_TEXTUREFORMAT_ASTC_8x5_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x6_UNORM
 GPU_TEXTUREFORMAT_ASTC_8x6_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x8_UNORM
 GPU_TEXTUREFORMAT_ASTC_8x8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x5_UNORM
 GPU_TEXTUREFORMAT_ASTC_10x5_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x6_UNORM
 GPU_TEXTUREFORMAT_ASTC_10x6_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x8_UNORM
 GPU_TEXTUREFORMAT_ASTC_10x8_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x10_UNORM
 GPU_TEXTUREFORMAT_ASTC_10x10_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x10_UNORM
 GPU_TEXTUREFORMAT_ASTC_12x10_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x12_UNORM
 GPU_TEXTUREFORMAT_ASTC_12x12_UNORM. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB
 GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT
 GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT
 GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT
 GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT
 GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT
 GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT
 GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT
 GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT
 GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT
 GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT
 GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT
 GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT
 GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT
 GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT. More...
 
constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT
 GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT. More...
 
constexpr GPUTextureType SDL::GPU_TEXTURETYPE_2D
 The texture is a 2-dimensional image. More...
 
constexpr GPUTextureType SDL::GPU_TEXTURETYPE_2D_ARRAY
 The texture is a 2-dimensional array image. More...
 
constexpr GPUTextureType SDL::GPU_TEXTURETYPE_3D
 The texture is a 3-dimensional image. More...
 
constexpr GPUTextureType SDL::GPU_TEXTURETYPE_CUBE
 The texture is a cube image. More...
 
constexpr GPUTextureType SDL::GPU_TEXTURETYPE_CUBE_ARRAY
 The texture is a cube array image. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_SAMPLER
 Texture supports sampling. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COLOR_TARGET
 Texture is a color render target. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET
 Texture is a depth stencil target. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ
 Texture supports storage reads in graphics stages. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ
 Texture supports storage reads in the compute stage. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE
 Texture supports storage writes in the compute stage. More...
 
constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE
 Texture supports reads and writes in the same compute shader. More...
 
constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_1
 No multisampling. More...
 
constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_2
 MSAA 2x. More...
 
constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_4
 MSAA 4x. More...
 
constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_8
 MSAA 8x. More...
 
constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_TRIANGLELIST
 A series of separate triangles. More...
 
constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_TRIANGLESTRIP
 A series of connected triangles. More...
 
constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_LINELIST
 A series of separate lines. More...
 
constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_LINESTRIP
 A series of connected lines. More...
 
constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_POINTLIST
 A series of separate points. More...
 
constexpr GPULoadOp SDL::GPU_LOADOP_LOAD = SDL_GPU_LOADOP_LOAD
 The previous contents of the texture will be preserved.
 
constexpr GPULoadOp SDL::GPU_LOADOP_CLEAR = SDL_GPU_LOADOP_CLEAR
 The contents of the texture will be cleared to a color.
 
constexpr GPULoadOp SDL::GPU_LOADOP_DONT_CARE = SDL_GPU_LOADOP_DONT_CARE
 The previous contents of the texture need not be preserved. More...
 
constexpr GPUStoreOp SDL::GPU_STOREOP_STORE = SDL_GPU_STOREOP_STORE
 The contents generated during the render pass will be written to memory.
 
constexpr GPUStoreOp SDL::GPU_STOREOP_DONT_CARE = SDL_GPU_STOREOP_DONT_CARE
 The contents generated during the render pass are not needed and may be discarded. More...
 
constexpr GPUStoreOp SDL::GPU_STOREOP_RESOLVE = SDL_GPU_STOREOP_RESOLVE
 The multisample contents generated during the render pass will be resolved to a non-multisample texture. More...
 
constexpr GPUStoreOp SDL::GPU_STOREOP_RESOLVE_AND_STORE
 The multisample contents generated during the render pass will be resolved to a non-multisample texture. More...
 
constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_POSITIVEX
 GPU_CUBEMAPFACE_POSITIVEX. More...
 
constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_NEGATIVEX
 GPU_CUBEMAPFACE_NEGATIVEX. More...
 
constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_POSITIVEY
 GPU_CUBEMAPFACE_POSITIVEY. More...
 
constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_NEGATIVEY
 GPU_CUBEMAPFACE_NEGATIVEY. More...
 
constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_POSITIVEZ
 GPU_CUBEMAPFACE_POSITIVEZ. More...
 
constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_NEGATIVEZ
 GPU_CUBEMAPFACE_NEGATIVEZ. More...
 
constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_VERTEX
 Buffer is a vertex buffer. More...
 
constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_INDEX
 Buffer is an index buffer. More...
 
constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_INDIRECT
 Buffer is an indirect buffer. More...
 
constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ
 Buffer supports storage reads in graphics stages. More...
 
constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ
 Buffer supports storage reads in the compute stage. More...
 
constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE
 Buffer supports storage writes in the compute stage. More...
 
constexpr GPUTransferBufferUsage SDL::GPU_TRANSFERBUFFERUSAGE_UPLOAD
 GPU_TRANSFERBUFFERUSAGE_UPLOAD. More...
 
constexpr GPUTransferBufferUsage SDL::GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
 GPU_TRANSFERBUFFERUSAGE_DOWNLOAD. More...
 
constexpr GPUShaderStage SDL::GPU_SHADERSTAGE_VERTEX
 GPU_SHADERSTAGE_VERTEX. More...
 
constexpr GPUShaderStage SDL::GPU_SHADERSTAGE_FRAGMENT
 GPU_SHADERSTAGE_FRAGMENT. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INVALID
 GPU_VERTEXELEMENTFORMAT_INVALID. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT
 GPU_VERTEXELEMENTFORMAT_INT. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT2
 GPU_VERTEXELEMENTFORMAT_INT2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT3
 GPU_VERTEXELEMENTFORMAT_INT3. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT4
 GPU_VERTEXELEMENTFORMAT_INT4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT
 GPU_VERTEXELEMENTFORMAT_UINT. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT2
 GPU_VERTEXELEMENTFORMAT_UINT2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT3
 GPU_VERTEXELEMENTFORMAT_UINT3. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT4
 GPU_VERTEXELEMENTFORMAT_UINT4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT
 GPU_VERTEXELEMENTFORMAT_FLOAT. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT2
 GPU_VERTEXELEMENTFORMAT_FLOAT2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT3
 GPU_VERTEXELEMENTFORMAT_FLOAT3. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT4
 GPU_VERTEXELEMENTFORMAT_FLOAT4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE2
 GPU_VERTEXELEMENTFORMAT_BYTE2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE4
 GPU_VERTEXELEMENTFORMAT_BYTE4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE2
 GPU_VERTEXELEMENTFORMAT_UBYTE2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE4
 GPU_VERTEXELEMENTFORMAT_UBYTE4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE2_NORM
 GPU_VERTEXELEMENTFORMAT_BYTE2_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE4_NORM
 GPU_VERTEXELEMENTFORMAT_BYTE4_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM
 GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM
 GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT2
 GPU_VERTEXELEMENTFORMAT_SHORT2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT4
 GPU_VERTEXELEMENTFORMAT_SHORT4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT2
 GPU_VERTEXELEMENTFORMAT_USHORT2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT4
 GPU_VERTEXELEMENTFORMAT_USHORT4. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT2_NORM
 GPU_VERTEXELEMENTFORMAT_SHORT2_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT4_NORM
 GPU_VERTEXELEMENTFORMAT_SHORT4_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT2_NORM
 GPU_VERTEXELEMENTFORMAT_USHORT2_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT4_NORM
 GPU_VERTEXELEMENTFORMAT_USHORT4_NORM. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_HALF2
 GPU_VERTEXELEMENTFORMAT_HALF2. More...
 
constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_HALF4
 GPU_VERTEXELEMENTFORMAT_HALF4. More...
 
constexpr GPUVertexInputRate SDL::GPU_VERTEXINPUTRATE_VERTEX
 Attribute addressing is a function of the vertex index. More...
 
constexpr GPUVertexInputRate SDL::GPU_VERTEXINPUTRATE_INSTANCE
 Attribute addressing is a function of the instance index. More...
 
constexpr GPUFillMode SDL::GPU_FILLMODE_FILL
 Polygons will be rendered via rasterization. More...
 
constexpr GPUFillMode SDL::GPU_FILLMODE_LINE
 Polygon edges will be drawn as line segments. More...
 
constexpr GPUCullMode SDL::GPU_CULLMODE_NONE
 No triangles are culled. More...
 
constexpr GPUCullMode SDL::GPU_CULLMODE_FRONT
 Front-facing triangles are culled. More...
 
constexpr GPUCullMode SDL::GPU_CULLMODE_BACK
 Back-facing triangles are culled. More...
 
constexpr GPUFrontFace SDL::GPU_FRONTFACE_COUNTER_CLOCKWISE
 A triangle with counter-clockwise vertex winding will be considered front-facing. More...
 
constexpr GPUFrontFace SDL::GPU_FRONTFACE_CLOCKWISE = SDL_GPU_FRONTFACE_CLOCKWISE
 A triangle with clockwise vertex winding will be considered front-facing.
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_INVALID
 GPU_COMPAREOP_INVALID. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_NEVER
 The comparison always evaluates false. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_LESS
 The comparison evaluates reference < test. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_EQUAL
 The comparison evaluates reference == test. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_LESS_OR_EQUAL
 The comparison evaluates reference <= test. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_GREATER
 The comparison evaluates reference > test. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_NOT_EQUAL
 The comparison evaluates reference != test. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_GREATER_OR_EQUAL
 The comparison evaluates reference >= test. More...
 
constexpr GPUCompareOp SDL::GPU_COMPAREOP_ALWAYS
 The comparison always evaluates true. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_INVALID
 GPU_STENCILOP_INVALID. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_KEEP
 Keeps the current value. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_ZERO
 Sets the value to 0. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_REPLACE
 Sets the value to reference. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_INCREMENT_AND_CLAMP
 Increments the current value and clamps to the maximum value. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_DECREMENT_AND_CLAMP
 Decrements the current value and clamps to 0. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_INVERT
 Bitwise-inverts the current value. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_INCREMENT_AND_WRAP
 Increments the current value and wraps back to 0. More...
 
constexpr GPUStencilOp SDL::GPU_STENCILOP_DECREMENT_AND_WRAP
 Decrements the current value and wraps to the maximum value. More...
 
constexpr GPUBlendOp SDL::GPU_BLENDOP_INVALID
 GPU_BLENDOP_INVALID. More...
 
constexpr GPUBlendOp SDL::GPU_BLENDOP_ADD = SDL_GPU_BLENDOP_ADD
 (source * source_factor) + (destination * destination_factor)
 
constexpr GPUBlendOp SDL::GPU_BLENDOP_SUBTRACT = SDL_GPU_BLENDOP_SUBTRACT
 (source * source_factor) - (destination * destination_factor)
 
constexpr GPUBlendOp SDL::GPU_BLENDOP_REVERSE_SUBTRACT
 (destination * destination_factor) - (source * source_factor) More...
 
constexpr GPUBlendOp SDL::GPU_BLENDOP_MIN
 min(source, destination) More...
 
constexpr GPUBlendOp SDL::GPU_BLENDOP_MAX
 max(source, destination) More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_INVALID
 GPU_BLENDFACTOR_INVALID. More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ZERO = SDL_GPU_BLENDFACTOR_ZERO
 0
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE = SDL_GPU_BLENDFACTOR_ONE
 1
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_SRC_COLOR
 source color More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR
 1 - source color More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_DST_COLOR
 destination color More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR
 1 - destination color More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_SRC_ALPHA
 source alpha More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
 1 - source alpha More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_DST_ALPHA
 destination alpha More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA
 1 - destination alpha More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_CONSTANT_COLOR
 blend constant More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR
 1 - blend constant More...
 
constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_SRC_ALPHA_SATURATE
 min(source alpha, 1 - destination alpha) More...
 
constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_R
 the red component More...
 
constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_G
 the green component More...
 
constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_B
 the blue component More...
 
constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_A
 the alpha component More...
 
constexpr GPUFilter SDL::GPU_FILTER_NEAREST
 Point filtering. More...
 
constexpr GPUFilter SDL::GPU_FILTER_LINEAR
 Linear filtering. More...
 
constexpr GPUSamplerMipmapMode SDL::GPU_SAMPLERMIPMAPMODE_NEAREST
 Point filtering. More...
 
constexpr GPUSamplerMipmapMode SDL::GPU_SAMPLERMIPMAPMODE_LINEAR
 Linear filtering. More...
 
constexpr GPUSamplerAddressMode SDL::GPU_SAMPLERADDRESSMODE_REPEAT
 Specifies that the coordinates will wrap around. More...
 
constexpr GPUSamplerAddressMode SDL::GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT
 Specifies that the coordinates will wrap around mirrored. More...
 
constexpr GPUSamplerAddressMode SDL::GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE
 Specifies that the coordinates will clamp to the 0-1 range. More...
 

Detailed Description

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 GPUDevice.GPUDevice(), and assigns it to a window with GPUDevice.ClaimWindow()–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:

To render, the app creates one or more command buffers, with GPUDevice.AcquireCommandBuffer(). 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 GPUCommandBuffer.WaitAndAcquireSwapchainTexture() 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 GPUCommandBuffer.BeginRenderPass(). Then it sets states it needs for each draw:

Then, make the actual draw commands with these states:

After all the drawing commands for a pass are complete, the app should call GPURenderPass.End(). 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 GPUCommandBuffer.Submit() 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 GPUCopyPass.DownloadFromTexture() or GPUCopyPass.DownloadFromBuffer(), submitting the command buffer with GPUCommandBuffer.SubmitAndAcquireFence() 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 GPUDevice.ReleaseFence() when done with the fence.

The API also has "compute" support. The app calls GPUCommandBuffer.BeginComputePass() 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.

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 GPUShader.GPUShader() and GPUComputePipeline.GPUComputePipeline() for information on the expected layout.

Another common issue is not setting the correct number of samplers, textures, and buffers in 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:

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_0 and Resource Binding Tier 2 or above.

Metal: Supported on macOS 10.14+ and iOS/tvOS 13.0+. Hardware requirements vary by operating system:

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. GPUTransferBuffer, GPUBuffer, and 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 GPUDevice.MapTransferBuffer(), write texture data, GPUDevice.UnmapTransferBuffer(), and then GPUCopyPass.UploadToTexture(). 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 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.

Typedef Documentation

◆ GPUBlendFactor

using SDL::GPUBlendFactor = typedef SDL_GPUBlendFactor

The source color is the value written by the fragment shader. The destination color is the value currently existing in the texture.

Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUBlendOp

using SDL::GPUBlendOp = typedef SDL_GPUBlendOp

The source color is the value written by the fragment shader. The destination color is the value currently existing in the texture.

Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUBlitInfo

using SDL::GPUBlitInfo = typedef SDL_GPUBlitInfo
Since
This struct is available since SDL 3.2.0.
See also
GPUCommandBuffer.BlitTexture

◆ GPUBlitRegion

using SDL::GPUBlitRegion = typedef SDL_GPUBlitRegion
Since
This struct is available since SDL 3.2.0.
See also
GPUCommandBuffer.BlitTexture

◆ GPUBufferBinding

using SDL::GPUBufferBinding = typedef SDL_GPUBufferBinding
Since
This struct is available since SDL 3.2.0.
See also
GPURenderPass.BindVertexBuffers
GPURenderPass.BindIndexBuffer

◆ GPUBufferCreateInfo

using SDL::GPUBufferCreateInfo = typedef SDL_GPUBufferCreateInfo

Usage flags can be bitwise OR'd together for combinations of usages. Note that certain combinations are invalid, for example VERTEX and INDEX.

Since
This struct is available since SDL 3.2.0.
See also
GPUBuffer.GPUBuffer
GPUBufferUsageFlags

◆ GPUBufferLocation

using SDL::GPUBufferLocation = typedef SDL_GPUBufferLocation

Used when copying data between buffers.

Since
This struct is available since SDL 3.2.0.
See also
GPUCopyPass.CopyBufferToBuffer

◆ GPUBufferRegion

using SDL::GPUBufferRegion = typedef SDL_GPUBufferRegion

Used when transferring data to or from buffers.

Since
This struct is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToBuffer
GPUCopyPass.DownloadFromBuffer

◆ GPUBufferUsageFlags

A buffer must have at least one usage flag. Note that some usage flag combinations are invalid.

Unlike textures, READ | WRITE can be used for simultaneous read-write usage. The same data synchronization concerns as textures apply.

If you use a STORAGE flag, the data in the buffer must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Since
This datatype is available since SDL 3.2.0.
See also
GPUBuffer.GPUBuffer

◆ GPUColorComponentFlags

Since
This datatype is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUColorTargetBlendState

using SDL::GPUColorTargetBlendState = typedef SDL_GPUColorTargetBlendState
Since
This struct is available since SDL 3.2.0.
See also
GPUColorTargetDescription

◆ GPUColorTargetDescription

using SDL::GPUColorTargetDescription = typedef SDL_GPUColorTargetDescription
Since
This struct is available since SDL 3.2.0.
See also
GPUGraphicsPipelineTargetInfo

◆ GPUColorTargetInfo

using SDL::GPUColorTargetInfo = typedef SDL_GPUColorTargetInfo

The load_op field determines what is done with the texture at the beginning of the render pass.

  • LOAD: Loads the data currently in the texture. Not recommended for multisample textures as it requires significant memory bandwidth.
  • CLEAR: Clears the texture to a single color.
  • DONT_CARE: The driver will do whatever it wants with the texture memory. This is a good option if you know that every single pixel will be touched in the render pass.

The store_op field determines what is done with the color results of the render pass.

  • STORE: Stores the results of the render pass in the texture. Not recommended for multisample textures as it requires significant memory bandwidth.
  • DONT_CARE: The driver will do whatever it wants with the texture memory. This is often a good option for depth/stencil textures.
  • RESOLVE: Resolves a multisample texture into resolve_texture, which must have a sample count of 1. Then the driver may discard the multisample texture memory. This is the most performant method of resolving a multisample target.
  • RESOLVE_AND_STORE: Resolves a multisample texture into the resolve_texture, which must have a sample count of 1. Then the driver stores the multisample texture's contents. Not recommended as it requires significant memory bandwidth.
Since
This struct is available since SDL 3.2.0.
See also
GPUCommandBuffer.BeginRenderPass

◆ GPUCompareOp

using SDL::GPUCompareOp = typedef SDL_GPUCompareOp
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUComputePipelineCreateInfo

using SDL::GPUComputePipelineCreateInfo = typedef SDL_GPUComputePipelineCreateInfo
Since
This struct is available since SDL 3.2.0.
See also
GPUComputePipeline.GPUComputePipeline
GPUShaderFormat

◆ GPUCubeMapFace

using SDL::GPUCubeMapFace = typedef SDL_GPUCubeMapFace

Can be passed in as the layer field in texture-related structs.

Since
This enum is available since SDL 3.2.0.

◆ GPUCullMode

using SDL::GPUCullMode = typedef SDL_GPUCullMode
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUDepthStencilState

using SDL::GPUDepthStencilState = typedef SDL_GPUDepthStencilState
Since
This struct is available since SDL 3.2.0.
See also
GPUGraphicsPipelineCreateInfo

◆ GPUDepthStencilTargetInfo

using SDL::GPUDepthStencilTargetInfo = typedef SDL_GPUDepthStencilTargetInfo

The load_op field determines what is done with the depth contents of the texture at the beginning of the render pass.

  • LOAD: Loads the depth values currently in the texture.
  • CLEAR: Clears the texture to a single depth.
  • DONT_CARE: The driver will do whatever it wants with the memory. This is a good option if you know that every single pixel will be touched in the render pass.

The store_op field determines what is done with the depth results of the render pass.

  • STORE: Stores the depth results in the texture.
  • DONT_CARE: The driver will do whatever it wants with the depth results. This is often a good option for depth/stencil textures that don't need to be reused again.

The stencil_load_op field determines what is done with the stencil contents of the texture at the beginning of the render pass.

  • LOAD: Loads the stencil values currently in the texture.
  • CLEAR: Clears the stencil values to a single value.
  • DONT_CARE: The driver will do whatever it wants with the memory. This is a good option if you know that every single pixel will be touched in the render pass.

The stencil_store_op field determines what is done with the stencil results of the render pass.

  • STORE: Stores the stencil results in the texture.
  • DONT_CARE: The driver will do whatever it wants with the stencil results. This is often a good option for depth/stencil textures that don't need to be reused again.

Note that depth/stencil targets do not support multisample resolves.

Since
This struct is available since SDL 3.2.0.
See also
GPUCommandBuffer.BeginRenderPass

◆ GPUFence

using SDL::GPUFence = typedef SDL_GPUFence

◆ GPUFillMode

using SDL::GPUFillMode = typedef SDL_GPUFillMode
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUFilter

using SDL::GPUFilter = typedef SDL_GPUFilter
Since
This enum is available since SDL 3.2.0.
See also
GPUSampler.GPUSampler

◆ GPUFrontFace

using SDL::GPUFrontFace = typedef SDL_GPUFrontFace
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUGraphicsPipelineCreateInfo

using SDL::GPUGraphicsPipelineCreateInfo = typedef SDL_GPUGraphicsPipelineCreateInfo

◆ GPUGraphicsPipelineTargetInfo

using SDL::GPUGraphicsPipelineTargetInfo = typedef SDL_GPUGraphicsPipelineTargetInfo
Since
This struct is available since SDL 3.2.0.
See also
GPUGraphicsPipelineCreateInfo
GPUColorTargetDescription
GPUTextureFormat

◆ GPUIndexedIndirectDrawCommand

using SDL::GPUIndexedIndirectDrawCommand = typedef SDL_GPUIndexedIndirectDrawCommand

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Since
This struct is available since SDL 3.2.0.
See also
GPURenderPass.DrawIndexedPrimitivesIndirect

◆ GPUIndexElementSize

using SDL::GPUIndexElementSize = typedef SDL_GPUIndexElementSize
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUIndirectDispatchCommand

using SDL::GPUIndirectDispatchCommand = typedef SDL_GPUIndirectDispatchCommand
Since
This struct is available since SDL 3.2.0.
See also
GPUComputePass.DispatchIndirect

◆ GPUIndirectDrawCommand

using SDL::GPUIndirectDrawCommand = typedef SDL_GPUIndirectDrawCommand

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Since
This struct is available since SDL 3.2.0.
See also
GPURenderPass.DrawPrimitivesIndirect

◆ GPULoadOp

using SDL::GPULoadOp = typedef SDL_GPULoadOp
Since
This enum is available since SDL 3.2.0.
See also
GPUCommandBuffer.BeginRenderPass

◆ GPUMultisampleState

using SDL::GPUMultisampleState = typedef SDL_GPUMultisampleState
Since
This struct is available since SDL 3.2.0.
See also
GPUGraphicsPipelineCreateInfo

◆ GPUPresentMode

using SDL::GPUPresentMode = typedef SDL_GPUPresentMode

VSYNC mode will always be supported. IMMEDIATE and MAILBOX modes may not be supported on certain systems.

It is recommended to query GPUDevice.WindowSupportsPresentMode after claiming the window if you wish to change the present mode to IMMEDIATE or MAILBOX.

  • 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.
  • IMMEDIATE: Immediately presents. Lowest latency option, but tearing may occur.
  • 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.
Since
This enum is available since SDL 3.2.0.
See also
GPUDevice.SetSwapchainParameters
GPUDevice.WindowSupportsPresentMode
GPUCommandBuffer.WaitAndAcquireSwapchainTexture

◆ GPUPrimitiveType

using SDL::GPUPrimitiveType = typedef SDL_GPUPrimitiveType

If you are using POINTLIST you must include a point size output in the vertex shader.

  • For HLSL compiling to SPIRV you must decorate a float output with [[vk::builtin("PointSize")]].
  • For GLSL you must set the gl_PointSize builtin.
  • For MSL you must include a float output with the [[point_size]] decorator.

Note that sized point topology is totally unsupported on D3D12. Any size other than 1 will be ignored. In general, you should avoid using point topology for both compatibility and performance reasons. You WILL regret using it.

Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPURasterizerState

using SDL::GPURasterizerState = typedef SDL_GPURasterizerState

Note that 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.
See also
GPUGraphicsPipelineCreateInfo

◆ GPUSampleCount

using SDL::GPUSampleCount = typedef SDL_GPUSampleCount

Used in multisampling. Note that this value only applies when the texture is used as a render target.

Since
This enum is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture
GPUDevice.TextureSupportsSampleCount

◆ GPUSamplerAddressMode

using SDL::GPUSamplerAddressMode = typedef SDL_GPUSamplerAddressMode
Since
This enum is available since SDL 3.2.0.
See also
GPUSampler.GPUSampler

◆ GPUSamplerCreateInfo

using SDL::GPUSamplerCreateInfo = typedef SDL_GPUSamplerCreateInfo

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.
See also
GPUSampler.GPUSampler
GPUFilter
GPUSamplerMipmapMode
GPUSamplerAddressMode
GPUCompareOp

◆ GPUSamplerMipmapMode

using SDL::GPUSamplerMipmapMode = typedef SDL_GPUSamplerMipmapMode
Since
This enum is available since SDL 3.2.0.
See also
GPUSampler.GPUSampler

◆ GPUShaderCreateInfo

using SDL::GPUShaderCreateInfo = typedef SDL_GPUShaderCreateInfo
Since
This struct is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ GPUShaderFormat

using SDL::GPUShaderFormat = typedef Uint32

Each format corresponds to a specific backend that accepts it.

Since
This datatype is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ GPUShaderStage

using SDL::GPUShaderStage = typedef SDL_GPUShaderStage
Since
This enum is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ GPUStencilOp

using SDL::GPUStencilOp = typedef SDL_GPUStencilOp
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUStencilOpState

using SDL::GPUStencilOpState = typedef SDL_GPUStencilOpState
Since
This struct is available since SDL 3.2.0.
See also
GPUDepthStencilState

◆ GPUStorageBufferReadWriteBinding

using SDL::GPUStorageBufferReadWriteBinding = typedef SDL_GPUStorageBufferReadWriteBinding
Since
This struct is available since SDL 3.2.0.
See also
GPUCommandBuffer.BeginComputePass

◆ GPUStorageTextureReadWriteBinding

using SDL::GPUStorageTextureReadWriteBinding = typedef SDL_GPUStorageTextureReadWriteBinding
Since
This struct is available since SDL 3.2.0.
See also
GPUCommandBuffer.BeginComputePass

◆ GPUStoreOp

using SDL::GPUStoreOp = typedef SDL_GPUStoreOp
Since
This enum is available since SDL 3.2.0.
See also
GPUCommandBuffer.BeginRenderPass

◆ GPUSwapchainComposition

using SDL::GPUSwapchainComposition = typedef SDL_GPUSwapchainComposition

SDR will always be supported. Other compositions may not be supported on certain systems.

It is recommended to query GPUDevice.WindowSupportsSwapchainComposition after claiming the window if you wish to change the swapchain composition from SDR.

  • SDR: B8G8R8A8 or R8G8B8A8 swapchain. Pixel values are in sRGB encoding.
  • SDR_LINEAR: B8G8R8A8_SRGB or R8G8B8A8_SRGB swapchain. Pixel values are stored in memory in sRGB encoding but accessed in shaders in "linear sRGB" encoding which is sRGB but with a linear transfer function.
  • HDR_EXTENDED_LINEAR: R16G16B16A16_FLOAT swapchain. Pixel values are in extended linear sRGB encoding and permits values outside of the [0, 1] range.
  • HDR10_ST2084: A2R10G10B10 or A2B10G10R10 swapchain. Pixel values are in BT.2020 ST2084 (PQ) encoding.
Since
This enum is available since SDL 3.2.0.
See also
GPUDevice.SetSwapchainParameters
GPUDevice.WindowSupportsSwapchainComposition
GPUCommandBuffer.WaitAndAcquireSwapchainTexture

◆ GPUTextureCreateInfo

using SDL::GPUTextureCreateInfo = typedef SDL_GPUTextureCreateInfo

Usage flags can be bitwise OR'd together for combinations of usages. Note that certain usage combinations are invalid, for example SAMPLER and GRAPHICS_STORAGE.

Since
This struct is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture
GPUTextureType
GPUTextureFormat
GPUTextureUsageFlags
GPUSampleCount

◆ GPUTextureFormat

using SDL::GPUTextureFormat = typedef SDL_GPUTextureFormat

Texture format support varies depending on driver, hardware, and usage flags. In general, you should use GPUDevice.TextureSupportsFormat to query if a format is supported before using it. However, there are a few guaranteed formats.

FIXME: Check universal support for 32-bit component formats FIXME: Check universal support for SIMULTANEOUS_READ_WRITE

For SAMPLER usage, the following formats are universally supported:

  • R8G8B8A8_UNORM
  • B8G8R8A8_UNORM
  • R8_UNORM
  • R8_SNORM
  • R8G8_UNORM
  • R8G8_SNORM
  • R8G8B8A8_SNORM
  • R16_FLOAT
  • R16G16_FLOAT
  • R16G16B16A16_FLOAT
  • R32_FLOAT
  • R32G32_FLOAT
  • R32G32B32A32_FLOAT
  • R11G11B10_UFLOAT
  • R8G8B8A8_UNORM_SRGB
  • B8G8R8A8_UNORM_SRGB
  • D16_UNORM

For COLOR_TARGET usage, the following formats are universally supported:

  • R8G8B8A8_UNORM
  • B8G8R8A8_UNORM
  • R8_UNORM
  • R16_FLOAT
  • R16G16_FLOAT
  • R16G16B16A16_FLOAT
  • R32_FLOAT
  • R32G32_FLOAT
  • R32G32B32A32_FLOAT
  • R8_UINT
  • R8G8_UINT
  • R8G8B8A8_UINT
  • R16_UINT
  • R16G16_UINT
  • R16G16B16A16_UINT
  • R8_INT
  • R8G8_INT
  • R8G8B8A8_INT
  • R16_INT
  • R16G16_INT
  • R16G16B16A16_INT
  • R8G8B8A8_UNORM_SRGB
  • B8G8R8A8_UNORM_SRGB

For STORAGE usages, the following formats are universally supported:

  • R8G8B8A8_UNORM
  • R8G8B8A8_SNORM
  • R16G16B16A16_FLOAT
  • R32_FLOAT
  • R32G32_FLOAT
  • R32G32B32A32_FLOAT
  • R8G8B8A8_UINT
  • R16G16B16A16_UINT
  • R8G8B8A8_INT
  • R16G16B16A16_INT

For DEPTH_STENCIL_TARGET usage, the following formats are universally supported:

  • D16_UNORM
  • Either (but not necessarily both!) D24_UNORM or D32_FLOAT
  • Either (but not necessarily both!) D24_UNORM_S8_UINT or D32_FLOAT_S8_UINT

Unless D16_UNORM is sufficient for your purposes, always check which of D24/D32 is supported before creating a depth-stencil texture!

Since
This enum is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture
GPUDevice.TextureSupportsFormat

◆ GPUTextureLocation

using SDL::GPUTextureLocation = typedef SDL_GPUTextureLocation

Used when copying data from one texture to another.

Since
This struct is available since SDL 3.2.0.
See also
GPUCopyPass.CopyTextureToTexture

◆ GPUTextureRegion

using SDL::GPUTextureRegion = typedef SDL_GPUTextureRegion

Used when transferring data to or from a texture.

Since
This struct is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToTexture
GPUCopyPass.DownloadFromTexture
GPUTexture.GPUTexture

◆ GPUTextureSamplerBinding

using SDL::GPUTextureSamplerBinding = typedef SDL_GPUTextureSamplerBinding
Since
This struct is available since SDL 3.2.0.
See also
GPURenderPass.BindVertexSamplers
GPURenderPass.BindFragmentSamplers

◆ GPUTextureTransferInfo

using SDL::GPUTextureTransferInfo = typedef SDL_GPUTextureTransferInfo
Since
This struct is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToTexture
GPUCopyPass.DownloadFromTexture

◆ GPUTextureType

using SDL::GPUTextureType = typedef SDL_GPUTextureType
Since
This enum is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture

◆ GPUTextureUsageFlags

A texture must have at least one usage flag. Note that some usage flag combinations are invalid.

With regards to compute storage usage, READ | WRITE means that you can have shader A that only writes into the texture and shader B that only reads from the texture and bind the same texture to either shader respectively. SIMULTANEOUS means that you can do reads and writes within the same shader or compute pass. It also implies that atomic ops can be used, since those are read-modify-write operations. If you use SIMULTANEOUS, you are responsible for avoiding data races, as there is no data synchronization within a compute pass. Note that SIMULTANEOUS usage is only supported by a limited number of texture formats.

Since
This datatype is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture

◆ GPUTransferBufferCreateInfo

using SDL::GPUTransferBufferCreateInfo = typedef SDL_GPUTransferBufferCreateInfo
Since
This struct is available since SDL 3.2.0.
See also
GPUTransferBuffer.GPUTransferBuffer

◆ GPUTransferBufferLocation

using SDL::GPUTransferBufferLocation = typedef SDL_GPUTransferBufferLocation

Used when transferring buffer data to or from a transfer buffer.

Since
This struct is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToBuffer
GPUCopyPass.DownloadFromBuffer

◆ GPUTransferBufferUsage

using SDL::GPUTransferBufferUsage = typedef SDL_GPUTransferBufferUsage

Note that mapping and copying FROM an upload transfer buffer or TO a download transfer buffer is undefined behavior.

Since
This enum is available since SDL 3.2.0.
See also
GPUTransferBuffer.GPUTransferBuffer

◆ GPUVertexAttribute

using SDL::GPUVertexAttribute = typedef SDL_GPUVertexAttribute

All vertex attribute locations provided to an GPUVertexInputState must be unique.

Since
This struct is available since SDL 3.2.0.
See also
GPUVertexBufferDescription
GPUVertexInputState
GPUVertexElementFormat

◆ GPUVertexBufferDescription

using SDL::GPUVertexBufferDescription = typedef SDL_GPUVertexBufferDescription

When you call GPURenderPass.BindVertexBuffers, you specify the binding slots of the vertex buffers. For example if you called GPURenderPass.BindVertexBuffers with a first_slot of 2 and num_bindings of 3, the binding slots 2, 3, 4 would be used by the vertex buffers you pass in.

Vertex attributes are linked to buffers via the buffer_slot field of GPUVertexAttribute. For example, if an attribute has a buffer_slot of 0, then that attribute belongs to the vertex buffer bound at slot 0.

Since
This struct is available since SDL 3.2.0.
See also
GPUVertexAttribute
GPUVertexInputRate

◆ GPUVertexElementFormat

using SDL::GPUVertexElementFormat = typedef SDL_GPUVertexElementFormat
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUVertexInputRate

using SDL::GPUVertexInputRate = typedef SDL_GPUVertexInputRate
Since
This enum is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline

◆ GPUVertexInputState

using SDL::GPUVertexInputState = typedef SDL_GPUVertexInputState
Since
This struct is available since SDL 3.2.0.
See also
GPUGraphicsPipelineCreateInfo
GPUVertexBufferDescription
GPUVertexAttribute

◆ GPUViewport

using SDL::GPUViewport = typedef SDL_GPUViewport
Since
This struct is available since SDL 3.2.0.
See also
GPURenderPass.SetViewport

Function Documentation

◆ AcquireCommandBuffer()

GPUCommandBuffer SDL::GPUDevice::AcquireCommandBuffer ( )
inline

This command buffer is managed by the implementation and should not be freed by the user. The command buffer may only be used on the thread it was acquired on. The command buffer should be submitted on the thread it was acquired on.

It is valid to acquire multiple command buffers on the same thread at once. In fact a common design pattern is to acquire two command buffers per frame where one is dedicated to render and compute passes and the other is dedicated to copy passes and other preparatory work such as generating mipmaps. Interleaving commands between the two command buffers reduces the total amount of passes overall which improves rendering performance.

Returns
a command buffer, or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.Submit
GPUCommandBuffer.SubmitAndAcquireFence

◆ AcquireGPUCommandBuffer()

GPUCommandBuffer SDL::AcquireGPUCommandBuffer ( GPUDeviceParam  device)
inline

This command buffer is managed by the implementation and should not be freed by the user. The command buffer may only be used on the thread it was acquired on. The command buffer should be submitted on the thread it was acquired on.

It is valid to acquire multiple command buffers on the same thread at once. In fact a common design pattern is to acquire two command buffers per frame where one is dedicated to render and compute passes and the other is dedicated to copy passes and other preparatory work such as generating mipmaps. Interleaving commands between the two command buffers reduces the total amount of passes overall which improves rendering performance.

Parameters
devicea GPU context.
Returns
a command buffer, or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.Submit
GPUCommandBuffer.SubmitAndAcquireFence

◆ AcquireGPUSwapchainTexture()

GPUTexture SDL::AcquireGPUSwapchainTexture ( GPUCommandBuffer  command_buffer,
WindowParam  window,
Uint32 swapchain_texture_width = nullptr,
Uint32 swapchain_texture_height = nullptr 
)
inline

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.

This function will fill the swapchain texture handle with nullptr if too many frames are in flight. This is not an error.

If you use this function, it is possible to create a situation where many command buffers are allocated while the rendering context waits for the GPU to catch up, which will cause memory usage to grow. You should use GPUCommandBuffer.WaitAndAcquireSwapchainTexture() unless you know what you are doing with timing.

The swapchain texture is managed by the implementation and must not be freed by the user. You MUST NOT call this function from any thread other than the one that created the window.

Parameters
command_buffera command buffer.
windowa window that has been claimed.
swapchain_texture_widtha pointer filled in with the swapchain texture width, may be nullptr.
swapchain_texture_heighta pointer filled in with the swapchain texture height, may be nullptr.
Returns
a swapchain texture handle.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow
GPUCommandBuffer.Submit
GPUCommandBuffer.SubmitAndAcquireFence
GPUCommandBuffer.Cancel
Window.GetSizeInPixels
GPUDevice.WaitForSwapchain
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.SetAllowedFramesInFlight

◆ AcquireSwapchainTexture()

GPUTexture SDL::GPUCommandBuffer::AcquireSwapchainTexture ( WindowParam  window,
Uint32 swapchain_texture_width = nullptr,
Uint32 swapchain_texture_height = nullptr 
)
inline

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.

This function will fill the swapchain texture handle with nullptr if too many frames are in flight. This is not an error.

If you use this function, it is possible to create a situation where many command buffers are allocated while the rendering context waits for the GPU to catch up, which will cause memory usage to grow. You should use GPUCommandBuffer.WaitAndAcquireSwapchainTexture() unless you know what you are doing with timing.

The swapchain texture is managed by the implementation and must not be freed by the user. You MUST NOT call this function from any thread other than the one that created the window.

Parameters
windowa window that has been claimed.
swapchain_texture_widtha pointer filled in with the swapchain texture width, may be nullptr.
swapchain_texture_heighta pointer filled in with the swapchain texture height, may be nullptr.
Returns
a swapchain texture handle.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow
GPUCommandBuffer.Submit
GPUCommandBuffer.SubmitAndAcquireFence
GPUCommandBuffer.Cancel
Window.GetSizeInPixels
GPUDevice.WaitForSwapchain
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.SetAllowedFramesInFlight

◆ BeginComputePass()

GPUComputePass SDL::GPUCommandBuffer::BeginComputePass ( std::span< const GPUStorageTextureReadWriteBinding storage_texture_bindings,
std::span< const GPUStorageBufferReadWriteBinding storage_buffer_bindings 
)
inline

A compute pass is defined by a set of texture subresources and buffers that may be written to by compute pipelines. These textures and buffers must have been created with the COMPUTE_STORAGE_WRITE bit or the COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE bit. If you do not create a texture with COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE, you must not read from the texture in the compute pass. All operations related to compute pipelines must take place inside of a compute pass. You must not begin another compute pass, or a render pass or copy pass before ending the compute pass.

A VERY IMPORTANT NOTE - Reads and writes in compute passes are NOT implicitly synchronized. This means you may cause data races by both reading and writing a resource region in a compute pass, or by writing multiple times to a resource region. If your compute work depends on reading the completed output from a previous dispatch, you MUST end the current compute pass and begin a new one before you can safely access the data. Otherwise you will receive unexpected results. Reading and writing a texture in the same compute pass is only supported by specific texture formats. Make sure you check the format support!

Parameters
storage_texture_bindingsan array of writeable storage texture binding structs.
storage_buffer_bindingsan array of writeable storage buffer binding structs.
Returns
a compute pass handle.
Since
This function is available since SDL 3.2.0.
See also
GPUComputePass.End

◆ BeginCopyPass()

GPUCopyPass SDL::GPUCommandBuffer::BeginCopyPass ( )
inline

All operations related to copying to or from buffers or textures take place inside a copy pass. You must not begin another copy pass, or a render pass or compute pass before ending the copy pass.

Returns
a copy pass handle.
Since
This function is available since SDL 3.2.0.

◆ BeginGPUComputePass()

GPUComputePass SDL::BeginGPUComputePass ( GPUCommandBuffer  command_buffer,
std::span< const GPUStorageTextureReadWriteBinding storage_texture_bindings,
std::span< const GPUStorageBufferReadWriteBinding storage_buffer_bindings 
)
inline

A compute pass is defined by a set of texture subresources and buffers that may be written to by compute pipelines. These textures and buffers must have been created with the COMPUTE_STORAGE_WRITE bit or the COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE bit. If you do not create a texture with COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE, you must not read from the texture in the compute pass. All operations related to compute pipelines must take place inside of a compute pass. You must not begin another compute pass, or a render pass or copy pass before ending the compute pass.

A VERY IMPORTANT NOTE - Reads and writes in compute passes are NOT implicitly synchronized. This means you may cause data races by both reading and writing a resource region in a compute pass, or by writing multiple times to a resource region. If your compute work depends on reading the completed output from a previous dispatch, you MUST end the current compute pass and begin a new one before you can safely access the data. Otherwise you will receive unexpected results. Reading and writing a texture in the same compute pass is only supported by specific texture formats. Make sure you check the format support!

Parameters
command_buffera command buffer.
storage_texture_bindingsan array of writeable storage texture binding structs.
storage_buffer_bindingsan array of writeable storage buffer binding structs.
Returns
a compute pass handle.
Since
This function is available since SDL 3.2.0.
See also
GPUComputePass.End

◆ BeginGPUCopyPass()

GPUCopyPass SDL::BeginGPUCopyPass ( GPUCommandBuffer  command_buffer)
inline

All operations related to copying to or from buffers or textures take place inside a copy pass. You must not begin another copy pass, or a render pass or compute pass before ending the copy pass.

Parameters
command_buffera command buffer.
Returns
a copy pass handle.
Since
This function is available since SDL 3.2.0.

◆ BeginGPURenderPass()

GPURenderPass SDL::BeginGPURenderPass ( GPUCommandBuffer  command_buffer,
std::span< const GPUColorTargetInfo color_target_infos,
OptionalRef< const GPUDepthStencilTargetInfo depth_stencil_target_info 
)
inline

A render pass consists of a set of texture subresources (or depth slices in the 3D texture case) which will be rendered to during the render pass, along with corresponding clear values and load/store operations. All operations related to graphics pipelines must take place inside of a render pass. A default viewport and scissor state are automatically set when this is called. You cannot begin another render pass, or begin a compute pass or copy pass until you have ended the render pass.

Parameters
command_buffera command buffer.
color_target_infosan array of texture subresources with corresponding clear values and load/store ops.
depth_stencil_target_infoa texture subresource with corresponding clear value and load/store ops, may be nullptr.
Returns
a render pass handle.
Since
This function is available since SDL 3.2.0.
See also
GPURenderPass.End

◆ BeginRenderPass()

GPURenderPass SDL::GPUCommandBuffer::BeginRenderPass ( std::span< const GPUColorTargetInfo color_target_infos,
OptionalRef< const GPUDepthStencilTargetInfo depth_stencil_target_info 
)
inline

A render pass consists of a set of texture subresources (or depth slices in the 3D texture case) which will be rendered to during the render pass, along with corresponding clear values and load/store operations. All operations related to graphics pipelines must take place inside of a render pass. A default viewport and scissor state are automatically set when this is called. You cannot begin another render pass, or begin a compute pass or copy pass until you have ended the render pass.

Parameters
color_target_infosan array of texture subresources with corresponding clear values and load/store ops.
depth_stencil_target_infoa texture subresource with corresponding clear value and load/store ops, may be nullptr.
Returns
a render pass handle.
Since
This function is available since SDL 3.2.0.
See also
GPURenderPass.End

◆ BindFragmentSamplers()

void SDL::GPURenderPass::BindFragmentSamplers ( Uint32  first_slot,
std::span< const GPUTextureSamplerBinding texture_sampler_bindings 
)
inline

The textures must have been created with GPU_TEXTUREUSAGE_SAMPLER.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe fragment sampler slot to begin binding from.
texture_sampler_bindingsan array of texture-sampler binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindFragmentStorageBuffers()

void SDL::GPURenderPass::BindFragmentStorageBuffers ( Uint32  first_slot,
SpanRef< const GPUBufferRaw storage_buffers 
)
inline

These buffers must have been created with GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe fragment storage buffer slot to begin binding from.
storage_buffersan array of storage buffers.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindFragmentStorageTextures()

void SDL::GPURenderPass::BindFragmentStorageTextures ( Uint32  first_slot,
SpanRef< const GPUTextureRaw storage_textures 
)
inline

These textures must have been created with GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe fragment storage texture slot to begin binding from.
storage_texturesan array of storage textures.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUComputePipeline()

void SDL::BindGPUComputePipeline ( GPUComputePass  compute_pass,
GPUComputePipeline  compute_pipeline 
)
inline
Parameters
compute_passa compute pass handle.
compute_pipelinea compute pipeline to bind.
Since
This function is available since SDL 3.2.0.

◆ BindGPUComputeSamplers()

void SDL::BindGPUComputeSamplers ( GPUComputePass  compute_pass,
Uint32  first_slot,
std::span< const GPUTextureSamplerBinding texture_sampler_bindings 
)
inline

The textures must have been created with GPU_TEXTUREUSAGE_SAMPLER.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
compute_passa compute pass handle.
first_slotthe compute sampler slot to begin binding from.
texture_sampler_bindingsan array of texture-sampler binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUComputeStorageBuffers()

void SDL::BindGPUComputeStorageBuffers ( GPUComputePass  compute_pass,
Uint32  first_slot,
SpanRef< const GPUBufferRaw storage_buffers 
)
inline

These buffers must have been created with GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
compute_passa compute pass handle.
first_slotthe compute storage buffer slot to begin binding from.
storage_buffersan array of storage buffer binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUComputeStorageTextures()

void SDL::BindGPUComputeStorageTextures ( GPUComputePass  compute_pass,
Uint32  first_slot,
SpanRef< const GPUTextureRaw storage_textures 
)
inline

These textures must have been created with GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
compute_passa compute pass handle.
first_slotthe compute storage texture slot to begin binding from.
storage_texturesan array of storage textures.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUFragmentSamplers()

void SDL::BindGPUFragmentSamplers ( GPURenderPass  render_pass,
Uint32  first_slot,
std::span< const GPUTextureSamplerBinding texture_sampler_bindings 
)
inline

The textures must have been created with GPU_TEXTUREUSAGE_SAMPLER.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
render_passa render pass handle.
first_slotthe fragment sampler slot to begin binding from.
texture_sampler_bindingsan array of texture-sampler binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUFragmentStorageBuffers()

void SDL::BindGPUFragmentStorageBuffers ( GPURenderPass  render_pass,
Uint32  first_slot,
SpanRef< const GPUBufferRaw storage_buffers 
)
inline

These buffers must have been created with GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
render_passa render pass handle.
first_slotthe fragment storage buffer slot to begin binding from.
storage_buffersan array of storage buffers.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUFragmentStorageTextures()

void SDL::BindGPUFragmentStorageTextures ( GPURenderPass  render_pass,
Uint32  first_slot,
SpanRef< const GPUTextureRaw storage_textures 
)
inline

These textures must have been created with GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
render_passa render pass handle.
first_slotthe fragment storage texture slot to begin binding from.
storage_texturesan array of storage textures.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUGraphicsPipeline()

void SDL::BindGPUGraphicsPipeline ( GPURenderPass  render_pass,
GPUGraphicsPipeline  graphics_pipeline 
)
inline

A graphics pipeline must be bound before making any draw calls.

Parameters
render_passa render pass handle.
graphics_pipelinethe graphics pipeline to bind.
Since
This function is available since SDL 3.2.0.

◆ BindGPUIndexBuffer()

void SDL::BindGPUIndexBuffer ( GPURenderPass  render_pass,
const GPUBufferBinding binding,
GPUIndexElementSize  index_element_size 
)
inline
Parameters
render_passa render pass handle.
bindinga pointer to a struct containing an index buffer and offset.
index_element_sizewhether the index values in the buffer are 16- or 32-bit.
Since
This function is available since SDL 3.2.0.

◆ BindGPUVertexBuffers()

void SDL::BindGPUVertexBuffers ( GPURenderPass  render_pass,
Uint32  first_slot,
std::span< const GPUBufferBinding bindings 
)
inline
Parameters
render_passa render pass handle.
first_slotthe vertex buffer slot to begin binding from.
bindingsan array of GPUBufferBinding structs containing vertex buffers and offset values.
Since
This function is available since SDL 3.2.0.

◆ BindGPUVertexSamplers()

void SDL::BindGPUVertexSamplers ( GPURenderPass  render_pass,
Uint32  first_slot,
std::span< const GPUTextureSamplerBinding texture_sampler_bindings 
)
inline

The textures must have been created with GPU_TEXTUREUSAGE_SAMPLER.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
render_passa render pass handle.
first_slotthe vertex sampler slot to begin binding from.
texture_sampler_bindingsan array of texture-sampler binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUVertexStorageBuffers()

void SDL::BindGPUVertexStorageBuffers ( GPURenderPass  render_pass,
Uint32  first_slot,
SpanRef< const GPUBufferRaw storage_buffers 
)
inline

These buffers must have been created with GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
render_passa render pass handle.
first_slotthe vertex storage buffer slot to begin binding from.
storage_buffersan array of buffers.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindGPUVertexStorageTextures()

void SDL::BindGPUVertexStorageTextures ( GPURenderPass  render_pass,
Uint32  first_slot,
SpanRef< const GPUTextureRaw storage_textures 
)
inline

These textures must have been created with GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
render_passa render pass handle.
first_slotthe vertex storage texture slot to begin binding from.
storage_texturesan array of storage textures.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindIndexBuffer()

void SDL::GPURenderPass::BindIndexBuffer ( const GPUBufferBinding binding,
GPUIndexElementSize  index_element_size 
)
inline
Parameters
bindinga pointer to a struct containing an index buffer and offset.
index_element_sizewhether the index values in the buffer are 16- or 32-bit.
Since
This function is available since SDL 3.2.0.

◆ BindPipeline() [1/2]

void SDL::GPUComputePass::BindPipeline ( GPUComputePipeline  compute_pipeline)
inline
Parameters
compute_pipelinea compute pipeline to bind.
Since
This function is available since SDL 3.2.0.

◆ BindPipeline() [2/2]

void SDL::GPURenderPass::BindPipeline ( GPUGraphicsPipeline  graphics_pipeline)
inline

A graphics pipeline must be bound before making any draw calls.

Parameters
graphics_pipelinethe graphics pipeline to bind.
Since
This function is available since SDL 3.2.0.

◆ BindSamplers()

void SDL::GPUComputePass::BindSamplers ( Uint32  first_slot,
std::span< const GPUTextureSamplerBinding texture_sampler_bindings 
)
inline

The textures must have been created with GPU_TEXTUREUSAGE_SAMPLER.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe compute sampler slot to begin binding from.
texture_sampler_bindingsan array of texture-sampler binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindStorageBuffers()

void SDL::GPUComputePass::BindStorageBuffers ( Uint32  first_slot,
SpanRef< const GPUBufferRaw storage_buffers 
)
inline

These buffers must have been created with GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe compute storage buffer slot to begin binding from.
storage_buffersan array of storage buffer binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindStorageTextures()

void SDL::GPUComputePass::BindStorageTextures ( Uint32  first_slot,
SpanRef< const GPUTextureRaw storage_textures 
)
inline

These textures must have been created with GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe compute storage texture slot to begin binding from.
storage_texturesan array of storage textures.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindVertexBuffers()

void SDL::GPURenderPass::BindVertexBuffers ( Uint32  first_slot,
std::span< const GPUBufferBinding bindings 
)
inline
Parameters
first_slotthe vertex buffer slot to begin binding from.
bindingsan array of GPUBufferBinding structs containing vertex buffers and offset values.
Since
This function is available since SDL 3.2.0.

◆ BindVertexSamplers()

void SDL::GPURenderPass::BindVertexSamplers ( Uint32  first_slot,
std::span< const GPUTextureSamplerBinding texture_sampler_bindings 
)
inline

The textures must have been created with GPU_TEXTUREUSAGE_SAMPLER.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe vertex sampler slot to begin binding from.
texture_sampler_bindingsan array of texture-sampler binding structs.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindVertexStorageBuffers()

void SDL::GPURenderPass::BindVertexStorageBuffers ( Uint32  first_slot,
SpanRef< const GPUBufferRaw storage_buffers 
)
inline

These buffers must have been created with GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe vertex storage buffer slot to begin binding from.
storage_buffersan array of buffers.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BindVertexStorageTextures()

void SDL::GPURenderPass::BindVertexStorageTextures ( Uint32  first_slot,
SpanRef< const GPUTextureRaw storage_textures 
)
inline

These textures must have been created with GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ.

Be sure your shader is set up according to the requirements documented in GPUShader.GPUShader().

Parameters
first_slotthe vertex storage texture slot to begin binding from.
storage_texturesan array of storage textures.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader

◆ BlitGPUTexture()

void SDL::BlitGPUTexture ( GPUCommandBuffer  command_buffer,
const GPUBlitInfo info 
)
inline

This function must not be called inside of any pass.

Parameters
command_buffera command buffer.
infothe blit info struct containing the blit parameters.
Since
This function is available since SDL 3.2.0.

◆ BlitTexture()

void SDL::GPUCommandBuffer::BlitTexture ( const GPUBlitInfo info)
inline

This function must not be called inside of any pass.

Parameters
infothe blit info struct containing the blit parameters.
Since
This function is available since SDL 3.2.0.

◆ CalculateGPUTextureFormatSize()

Uint32 SDL::CalculateGPUTextureFormatSize ( GPUTextureFormat  format,
Uint32  width,
Uint32  height,
Uint32  depth_or_layer_count 
)
inline
Parameters
formata texture format.
widthwidth in pixels.
heightheight in pixels.
depth_or_layer_countdepth for 3D textures or layer count otherwise.
Returns
the size of a texture with this format and dimensions.
Since
This function is available since SDL 3.2.0.

◆ Cancel()

void SDL::GPUCommandBuffer::Cancel ( )
inline

None of the enqueued commands are executed.

It is an error to call this function after a swapchain texture has been acquired.

This must be called from the thread the command buffer was acquired on.

You must not reference the command buffer after calling this function.

Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.AcquireCommandBuffer
GPUCommandBuffer.AcquireSwapchainTexture

◆ CancelGPUCommandBuffer()

void SDL::CancelGPUCommandBuffer ( GPUCommandBuffer  command_buffer)
inline

None of the enqueued commands are executed.

It is an error to call this function after a swapchain texture has been acquired.

This must be called from the thread the command buffer was acquired on.

You must not reference the command buffer after calling this function.

Parameters
command_buffera command buffer.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.AcquireCommandBuffer
GPUCommandBuffer.AcquireSwapchainTexture

◆ ClaimWindow()

void SDL::GPUDevice::ClaimWindow ( WindowParam  window)
inline

This must be called before GPUCommandBuffer.AcquireSwapchainTexture is called using the window. You should only call this function from the thread that created the window.

The swapchain will be created with GPU_SWAPCHAINCOMPOSITION_SDR and GPU_PRESENTMODE_VSYNC. If you want to have different swapchain parameters, you must call GPUDevice.SetSwapchainParameters after claiming the window.

Parameters
windowan Window.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.ReleaseWindow
GPUDevice.WindowSupportsPresentMode
GPUDevice.WindowSupportsSwapchainComposition

◆ ClaimWindowForGPUDevice()

void SDL::ClaimWindowForGPUDevice ( GPUDeviceParam  device,
WindowParam  window 
)
inline

This must be called before GPUCommandBuffer.AcquireSwapchainTexture is called using the window. You should only call this function from the thread that created the window.

The swapchain will be created with GPU_SWAPCHAINCOMPOSITION_SDR and GPU_PRESENTMODE_VSYNC. If you want to have different swapchain parameters, you must call GPUDevice.SetSwapchainParameters after claiming the window.

Parameters
devicea GPU context.
windowan Window.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.ReleaseWindow
GPUDevice.WindowSupportsPresentMode
GPUDevice.WindowSupportsSwapchainComposition

◆ CopyBufferToBuffer()

void SDL::GPUCopyPass::CopyBufferToBuffer ( const GPUBufferLocation source,
const GPUBufferLocation destination,
Uint32  size,
bool  cycle 
)
inline

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

Parameters
sourcethe buffer and offset to copy from.
destinationthe buffer and offset to copy to.
sizethe length of the buffer to copy.
cycleif true, cycles the destination buffer if it is already bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ CopyGPUBufferToBuffer()

void SDL::CopyGPUBufferToBuffer ( GPUCopyPass  copy_pass,
const GPUBufferLocation source,
const GPUBufferLocation destination,
Uint32  size,
bool  cycle 
)
inline

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

Parameters
copy_passa copy pass handle.
sourcethe buffer and offset to copy from.
destinationthe buffer and offset to copy to.
sizethe length of the buffer to copy.
cycleif true, cycles the destination buffer if it is already bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ CopyGPUTextureToTexture()

void SDL::CopyGPUTextureToTexture ( GPUCopyPass  copy_pass,
const GPUTextureLocation source,
const GPUTextureLocation destination,
Uint32  w,
Uint32  h,
Uint32  d,
bool  cycle 
)
inline

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

Parameters
copy_passa copy pass handle.
sourcea source texture region.
destinationa destination texture region.
wthe width of the region to copy.
hthe height of the region to copy.
dthe depth of the region to copy.
cycleif true, cycles the destination texture if the destination texture is bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ CopyTextureToTexture()

void SDL::GPUCopyPass::CopyTextureToTexture ( const GPUTextureLocation source,
const GPUTextureLocation destination,
Uint32  w,
Uint32  h,
Uint32  d,
bool  cycle 
)
inline

This copy occurs on the GPU timeline. You may assume the copy has finished in subsequent commands.

Parameters
sourcea source texture region.
destinationa destination texture region.
wthe width of the region to copy.
hthe height of the region to copy.
dthe depth of the region to copy.
cycleif true, cycles the destination texture if the destination texture is bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ CreateBuffer()

GPUBuffer SDL::GPUDevice::CreateBuffer ( const GPUBufferCreateInfo createinfo)
inline

The contents of this buffer are undefined until data is written to the buffer.

Note that certain combinations of usage flags are invalid. For example, a buffer cannot have both the VERTEX and INDEX flags.

If you use a STORAGE flag, the data in the buffer must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

For better understanding of underlying concepts and memory management with SDL GPU API, you may refer this blog post.

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUBuffer.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the buffer to create.
Returns
a buffer object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToBuffer
GPUCopyPass.DownloadFromBuffer
GPUCopyPass.CopyBufferToBuffer
GPURenderPass.BindVertexBuffers
GPURenderPass.BindIndexBuffer
GPURenderPass.BindVertexStorageBuffers
GPURenderPass.BindFragmentStorageBuffers
GPURenderPass.DrawPrimitivesIndirect
GPURenderPass.DrawIndexedPrimitivesIndirect
GPUComputePass.BindStorageBuffers
GPUComputePass.DispatchIndirect
GPUDevice.ReleaseBuffer

◆ CreateComputePipeline()

GPUComputePipeline SDL::GPUDevice::CreateComputePipeline ( const GPUComputePipelineCreateInfo createinfo)
inline

Shader resource bindings must be authored to follow a particular order depending on the shader format.

For SPIR-V shaders, use the following resource sets:

  • 0: Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
  • 1: Read-write storage textures, followed by read-write storage buffers
  • 2: Uniform buffers

For DXBC and DXIL shaders, use the following register order:

  • (t[n], space0): Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
  • (u[n], space1): Read-write storage textures, followed by read-write storage buffers
  • (b[n], space2): Uniform buffers

For MSL/metallib, use the following order:

  • [[buffer]]: Uniform buffers, followed by read-only storage buffers, followed by read-write storage buffers
  • [[texture]]: Sampled textures, followed by read-only storage textures, followed by read-write storage textures

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUComputePipeline.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the compute pipeline to create.
Returns
a compute pipeline object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUComputePass.BindPipeline
GPUDevice.ReleaseComputePipeline

◆ CreateGPUBuffer()

GPUBuffer SDL::CreateGPUBuffer ( GPUDeviceParam  device,
const GPUBufferCreateInfo createinfo 
)
inline

The contents of this buffer are undefined until data is written to the buffer.

Note that certain combinations of usage flags are invalid. For example, a buffer cannot have both the VERTEX and INDEX flags.

If you use a STORAGE flag, the data in the buffer must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

For better understanding of underlying concepts and memory management with SDL GPU API, you may refer this blog post.

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUBuffer.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the buffer to create.
Returns
a buffer object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToBuffer
GPUCopyPass.DownloadFromBuffer
GPUCopyPass.CopyBufferToBuffer
GPURenderPass.BindVertexBuffers
GPURenderPass.BindIndexBuffer
GPURenderPass.BindVertexStorageBuffers
GPURenderPass.BindFragmentStorageBuffers
GPURenderPass.DrawPrimitivesIndirect
GPURenderPass.DrawIndexedPrimitivesIndirect
GPUComputePass.BindStorageBuffers
GPUComputePass.DispatchIndirect
GPUDevice.ReleaseBuffer

◆ CreateGPUComputePipeline()

GPUComputePipeline SDL::CreateGPUComputePipeline ( GPUDeviceParam  device,
const GPUComputePipelineCreateInfo createinfo 
)
inline

Shader resource bindings must be authored to follow a particular order depending on the shader format.

For SPIR-V shaders, use the following resource sets:

  • 0: Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
  • 1: Read-write storage textures, followed by read-write storage buffers
  • 2: Uniform buffers

For DXBC and DXIL shaders, use the following register order:

  • (t[n], space0): Sampled textures, followed by read-only storage textures, followed by read-only storage buffers
  • (u[n], space1): Read-write storage textures, followed by read-write storage buffers
  • (b[n], space2): Uniform buffers

For MSL/metallib, use the following order:

  • [[buffer]]: Uniform buffers, followed by read-only storage buffers, followed by read-write storage buffers
  • [[texture]]: Sampled textures, followed by read-only storage textures, followed by read-write storage textures

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUComputePipeline.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the compute pipeline to create.
Returns
a compute pipeline object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUComputePass.BindPipeline
GPUDevice.ReleaseComputePipeline

◆ CreateGPUDevice()

GPUDevice SDL::CreateGPUDevice ( GPUShaderFormat  format_flags,
bool  debug_mode,
StringParam  name 
)
inline
Parameters
format_flagsa bitflag indicating which shader formats the app is able to provide.
debug_modeenable debug mode properties and validations.
namethe preferred GPU driver, or nullptr to let SDL pick the optimal driver.
Returns
a GPU context on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.GetShaderFormats
GPUDevice.GetDriver
GPUDevice.Destroy
GPUSupportsShaderFormats

◆ CreateGPUDeviceWithProperties()

GPUDevice SDL::CreateGPUDeviceWithProperties ( PropertiesParam  props)
inline

These are the supported properties:

  • prop::GpuDevice.CREATE_DEBUGMODE_BOOLEAN: enable debug mode properties and validations, defaults to true.
  • prop::GpuDevice.CREATE_PREFERLOWPOWER_BOOLEAN: enable to prefer energy efficiency over maximum GPU performance, defaults to false.
  • prop::GpuDevice.CREATE_NAME_STRING: the name of the GPU driver to use, if a specific one is desired.

These are the current shader format properties:

  • prop::GpuDevice.CREATE_SHADERS_PRIVATE_BOOLEAN: The app is able to provide shaders for an NDA platform.
  • prop::GpuDevice.CREATE_SHADERS_SPIRV_BOOLEAN: The app is able to provide SPIR-V shaders if applicable.
  • prop::GpuDevice.CREATE_SHADERS_DXBC_BOOLEAN: The app is able to provide DXBC shaders if applicable
  • prop::GpuDevice.CREATE_SHADERS_DXIL_BOOLEAN: The app is able to provide DXIL shaders if applicable.
  • prop::GpuDevice.CREATE_SHADERS_MSL_BOOLEAN: The app is able to provide MSL shaders if applicable.
  • prop::GpuDevice.CREATE_SHADERS_METALLIB_BOOLEAN: The app is able to provide Metal shader libraries if applicable.

With the D3D12 renderer:

  • prop::GpuDevice.CREATE_D3D12_SEMANTIC_NAME_STRING: the prefix to use for all vertex semantics, default is "TEXCOORD".
Parameters
propsthe properties to use.
Returns
a GPU context on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.GetShaderFormats
GPUDevice.GetDriver
GPUDevice.Destroy
GPUSupportsProperties

◆ CreateGPUGraphicsPipeline()

GPUGraphicsPipeline SDL::CreateGPUGraphicsPipeline ( GPUDeviceParam  device,
const GPUGraphicsPipelineCreateInfo createinfo 
)
inline

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUGraphicsPipeline.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the graphics pipeline to create.
Returns
a graphics pipeline object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader
GPURenderPass.BindPipeline
GPUDevice.ReleaseGraphicsPipeline

◆ CreateGPUSampler()

GPUSampler SDL::CreateGPUSampler ( GPUDeviceParam  device,
const GPUSamplerCreateInfo createinfo 
)
inline

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUSampler.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the sampler to create.
Returns
a sampler object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPURenderPass.BindVertexSamplers
GPURenderPass.BindFragmentSamplers
GPUDevice.ReleaseSampler

◆ CreateGPUShader()

GPUShader SDL::CreateGPUShader ( GPUDeviceParam  device,
const GPUShaderCreateInfo createinfo 
)
inline

Shader resource bindings must be authored to follow a particular order depending on the shader format.

For SPIR-V shaders, use the following resource sets:

For vertex shaders:

  • 0: Sampled textures, followed by storage textures, followed by storage buffers
  • 1: Uniform buffers

For fragment shaders:

  • 2: Sampled textures, followed by storage textures, followed by storage buffers
  • 3: Uniform buffers

For DXBC and DXIL shaders, use the following register order:

For vertex shaders:

  • (t[n], space0): Sampled textures, followed by storage textures, followed by storage buffers
  • (s[n], space0): Samplers with indices corresponding to the sampled textures
  • (b[n], space1): Uniform buffers

For pixel shaders:

  • (t[n], space2): Sampled textures, followed by storage textures, followed by storage buffers
  • (s[n], space2): Samplers with indices corresponding to the sampled textures
  • (b[n], space3): Uniform buffers

For MSL/metallib, use the following order:

  • [[texture]]: Sampled textures, followed by storage textures
  • [[sampler]]: Samplers with indices corresponding to the sampled textures
  • [[buffer]]: Uniform buffers, followed by storage buffers. Vertex buffer 0 is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on. Rather than manually authoring vertex buffer indices, use the [[stage_in]] attribute which will automatically use the vertex input information from the GPUGraphicsPipeline.

Shader semantics other than system-value semantics do not matter in D3D12 and for ease of use the SDL implementation assumes that non system-value semantics will all be TEXCOORD. If you are using HLSL as the shader source language, your vertex semantics should start at TEXCOORD0 and increment like so: TEXCOORD1, TEXCOORD2, etc. If you wish to change the semantic prefix to something other than TEXCOORD you can use prop::GpuDevice.CREATE_D3D12_SEMANTIC_NAME_STRING with GPUDevice.GPUDevice().

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUShader.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the shader to create.
Returns
a shader object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline
GPUDevice.ReleaseShader

◆ CreateGPUTexture()

GPUTexture SDL::CreateGPUTexture ( GPUDeviceParam  device,
const GPUTextureCreateInfo createinfo 
)
inline

The contents of this texture are undefined until data is written to the texture.

Note that certain combinations of usage flags are invalid. For example, a texture cannot have both the SAMPLER and GRAPHICS_STORAGE_READ flags.

If you request a sample count higher than the hardware supports, the implementation will automatically fall back to the highest available sample count.

There are optional properties that can be provided through GPUTextureCreateInfo's props. These are the supported properties:

  • prop::GPUTexture.CREATE_D3D12_CLEAR_R_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this red intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_G_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this green intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_B_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this blue intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_A_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this alpha intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_DEPTH_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear the texture to a depth of this value. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_STENCIL_NUMBER: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear the texture to a stencil of this Uint8 value. Defaults to zero.
  • prop::GPUTexture.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the texture to create.
Returns
a texture object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToTexture
GPUCopyPass.DownloadFromTexture
GPURenderPass.BindVertexSamplers
GPURenderPass.BindVertexStorageTextures
GPURenderPass.BindFragmentSamplers
GPURenderPass.BindFragmentStorageTextures
GPUComputePass.BindStorageTextures
GPUCommandBuffer.BlitTexture
GPUDevice.ReleaseTexture
GPUDevice.TextureSupportsFormat

◆ CreateGPUTransferBuffer()

GPUTransferBuffer SDL::CreateGPUTransferBuffer ( GPUDeviceParam  device,
const GPUTransferBufferCreateInfo createinfo 
)
inline

Download buffers can be particularly expensive to create, so it is good practice to reuse them if data will be downloaded regularly.

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUTransferBuffer.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
devicea GPU Context.
createinfoa struct describing the state of the transfer buffer to create.
Returns
a transfer buffer on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToBuffer
GPUCopyPass.DownloadFromBuffer
GPUCopyPass.UploadToTexture
GPUCopyPass.DownloadFromTexture
GPUDevice.ReleaseTransferBuffer

◆ CreateGraphicsPipeline()

GPUGraphicsPipeline SDL::GPUDevice::CreateGraphicsPipeline ( const GPUGraphicsPipelineCreateInfo createinfo)
inline

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUGraphicsPipeline.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the graphics pipeline to create.
Returns
a graphics pipeline object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUShader.GPUShader
GPURenderPass.BindPipeline
GPUDevice.ReleaseGraphicsPipeline

◆ CreateSampler()

GPUSampler SDL::GPUDevice::CreateSampler ( const GPUSamplerCreateInfo createinfo)
inline

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUSampler.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the sampler to create.
Returns
a sampler object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPURenderPass.BindVertexSamplers
GPURenderPass.BindFragmentSamplers
GPUDevice.ReleaseSampler

◆ CreateShader()

GPUShader SDL::GPUDevice::CreateShader ( const GPUShaderCreateInfo createinfo)
inline

Shader resource bindings must be authored to follow a particular order depending on the shader format.

For SPIR-V shaders, use the following resource sets:

For vertex shaders:

  • 0: Sampled textures, followed by storage textures, followed by storage buffers
  • 1: Uniform buffers

For fragment shaders:

  • 2: Sampled textures, followed by storage textures, followed by storage buffers
  • 3: Uniform buffers

For DXBC and DXIL shaders, use the following register order:

For vertex shaders:

  • (t[n], space0): Sampled textures, followed by storage textures, followed by storage buffers
  • (s[n], space0): Samplers with indices corresponding to the sampled textures
  • (b[n], space1): Uniform buffers

For pixel shaders:

  • (t[n], space2): Sampled textures, followed by storage textures, followed by storage buffers
  • (s[n], space2): Samplers with indices corresponding to the sampled textures
  • (b[n], space3): Uniform buffers

For MSL/metallib, use the following order:

  • [[texture]]: Sampled textures, followed by storage textures
  • [[sampler]]: Samplers with indices corresponding to the sampled textures
  • [[buffer]]: Uniform buffers, followed by storage buffers. Vertex buffer 0 is bound at [[buffer(14)]], vertex buffer 1 at [[buffer(15)]], and so on. Rather than manually authoring vertex buffer indices, use the [[stage_in]] attribute which will automatically use the vertex input information from the GPUGraphicsPipeline.

Shader semantics other than system-value semantics do not matter in D3D12 and for ease of use the SDL implementation assumes that non system-value semantics will all be TEXCOORD. If you are using HLSL as the shader source language, your vertex semantics should start at TEXCOORD0 and increment like so: TEXCOORD1, TEXCOORD2, etc. If you wish to change the semantic prefix to something other than TEXCOORD you can use prop::GpuDevice.CREATE_D3D12_SEMANTIC_NAME_STRING with GPUDevice.GPUDevice().

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUShader.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the shader to create.
Returns
a shader object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUGraphicsPipeline.GPUGraphicsPipeline
GPUDevice.ReleaseShader

◆ CreateTexture()

GPUTexture SDL::GPUDevice::CreateTexture ( const GPUTextureCreateInfo createinfo)
inline

The contents of this texture are undefined until data is written to the texture.

Note that certain combinations of usage flags are invalid. For example, a texture cannot have both the SAMPLER and GRAPHICS_STORAGE_READ flags.

If you request a sample count higher than the hardware supports, the implementation will automatically fall back to the highest available sample count.

There are optional properties that can be provided through GPUTextureCreateInfo's props. These are the supported properties:

  • prop::GPUTexture.CREATE_D3D12_CLEAR_R_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this red intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_G_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this green intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_B_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this blue intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_A_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_COLOR_TARGET, clear the texture to a color with this alpha intensity. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_DEPTH_FLOAT: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear the texture to a depth of this value. Defaults to zero.
  • prop::GPUTexture.CREATE_D3D12_CLEAR_STENCIL_NUMBER: (Direct3D 12 only) if the texture usage is GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET, clear the texture to a stencil of this Uint8 value. Defaults to zero.
  • prop::GPUTexture.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the texture to create.
Returns
a texture object on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToTexture
GPUCopyPass.DownloadFromTexture
GPURenderPass.BindVertexSamplers
GPURenderPass.BindVertexStorageTextures
GPURenderPass.BindFragmentSamplers
GPURenderPass.BindFragmentStorageTextures
GPUComputePass.BindStorageTextures
GPUCommandBuffer.BlitTexture
GPUDevice.ReleaseTexture
GPUDevice.TextureSupportsFormat

◆ CreateTransferBuffer()

GPUTransferBuffer SDL::GPUDevice::CreateTransferBuffer ( const GPUTransferBufferCreateInfo createinfo)
inline

Download buffers can be particularly expensive to create, so it is good practice to reuse them if data will be downloaded regularly.

There are optional properties that can be provided through props. These are the supported properties:

  • prop::GPUTransferBuffer.CREATE_NAME_STRING: a name that can be displayed in debugging tools.
Parameters
createinfoa struct describing the state of the transfer buffer to create.
Returns
a transfer buffer on success.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToBuffer
GPUCopyPass.DownloadFromBuffer
GPUCopyPass.UploadToTexture
GPUCopyPass.DownloadFromTexture
GPUDevice.ReleaseTransferBuffer

◆ Destroy()

void SDL::GPUDevice::Destroy ( )
inline
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.GPUDevice

◆ DestroyGPUDevice()

void SDL::DestroyGPUDevice ( GPUDeviceRaw  device)
inline
Parameters
devicea GPU Context to destroy.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.GPUDevice

◆ Dispatch()

void SDL::GPUComputePass::Dispatch ( Uint32  groupcount_x,
Uint32  groupcount_y,
Uint32  groupcount_z 
)
inline

You must not call this function before binding a compute pipeline.

A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

Parameters
groupcount_xnumber of local workgroups to dispatch in the X dimension.
groupcount_ynumber of local workgroups to dispatch in the Y dimension.
groupcount_znumber of local workgroups to dispatch in the Z dimension.
Since
This function is available since SDL 3.2.0.

◆ DispatchGPUCompute()

void SDL::DispatchGPUCompute ( GPUComputePass  compute_pass,
Uint32  groupcount_x,
Uint32  groupcount_y,
Uint32  groupcount_z 
)
inline

You must not call this function before binding a compute pipeline.

A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

Parameters
compute_passa compute pass handle.
groupcount_xnumber of local workgroups to dispatch in the X dimension.
groupcount_ynumber of local workgroups to dispatch in the Y dimension.
groupcount_znumber of local workgroups to dispatch in the Z dimension.
Since
This function is available since SDL 3.2.0.

◆ DispatchGPUComputeIndirect()

void SDL::DispatchGPUComputeIndirect ( GPUComputePass  compute_pass,
GPUBuffer  buffer,
Uint32  offset 
)
inline

The buffer layout should match the layout of GPUIndirectDispatchCommand. You must not call this function before binding a compute pipeline.

A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

Parameters
compute_passa compute pass handle.
buffera buffer containing dispatch parameters.
offsetthe offset to start reading from the dispatch buffer.
Since
This function is available since SDL 3.2.0.

◆ DispatchIndirect()

void SDL::GPUComputePass::DispatchIndirect ( GPUBuffer  buffer,
Uint32  offset 
)
inline

The buffer layout should match the layout of GPUIndirectDispatchCommand. You must not call this function before binding a compute pipeline.

A VERY IMPORTANT NOTE If you dispatch multiple times in a compute pass, and the dispatches write to the same resource region as each other, there is no guarantee of which order the writes will occur. If the write order matters, you MUST end the compute pass and begin another one.

Parameters
buffera buffer containing dispatch parameters.
offsetthe offset to start reading from the dispatch buffer.
Since
This function is available since SDL 3.2.0.

◆ DownloadFromBuffer()

void SDL::GPUCopyPass::DownloadFromBuffer ( const GPUBufferRegion source,
const GPUTransferBufferLocation destination 
)
inline

This data is not guaranteed to be copied until the command buffer fence is signaled.

Parameters
sourcethe source buffer with offset and size.
destinationthe destination transfer buffer with offset.
Since
This function is available since SDL 3.2.0.

◆ DownloadFromGPUBuffer()

void SDL::DownloadFromGPUBuffer ( GPUCopyPass  copy_pass,
const GPUBufferRegion source,
const GPUTransferBufferLocation destination 
)
inline

This data is not guaranteed to be copied until the command buffer fence is signaled.

Parameters
copy_passa copy pass handle.
sourcethe source buffer with offset and size.
destinationthe destination transfer buffer with offset.
Since
This function is available since SDL 3.2.0.

◆ DownloadFromGPUTexture()

void SDL::DownloadFromGPUTexture ( GPUCopyPass  copy_pass,
const GPUTextureRegion source,
const GPUTextureTransferInfo destination 
)
inline

This data is not guaranteed to be copied until the command buffer fence is signaled.

Parameters
copy_passa copy pass handle.
sourcethe source texture region.
destinationthe destination transfer buffer with image layout information.
Since
This function is available since SDL 3.2.0.

◆ DownloadFromTexture()

void SDL::GPUCopyPass::DownloadFromTexture ( const GPUTextureRegion source,
const GPUTextureTransferInfo destination 
)
inline

This data is not guaranteed to be copied until the command buffer fence is signaled.

Parameters
sourcethe source texture region.
destinationthe destination transfer buffer with image layout information.
Since
This function is available since SDL 3.2.0.

◆ DrawGPUIndexedPrimitives()

void SDL::DrawGPUIndexedPrimitives ( GPURenderPass  render_pass,
Uint32  num_indices,
Uint32  num_instances,
Uint32  first_index,
Sint32  vertex_offset,
Uint32  first_instance 
)
inline

You must not call this function before binding a graphics pipeline.

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Parameters
render_passa render pass handle.
num_indicesthe number of indices to draw per instance.
num_instancesthe number of instances to draw.
first_indexthe starting index within the index buffer.
vertex_offsetvalue added to vertex index before indexing into the vertex buffer.
first_instancethe ID of the first instance to draw.
Since
This function is available since SDL 3.2.0.

◆ DrawGPUIndexedPrimitivesIndirect()

void SDL::DrawGPUIndexedPrimitivesIndirect ( GPURenderPass  render_pass,
GPUBuffer  buffer,
Uint32  offset,
Uint32  draw_count 
)
inline

The buffer must consist of tightly-packed draw parameter sets that each match the layout of GPUIndexedIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

Parameters
render_passa render pass handle.
buffera buffer containing draw parameters.
offsetthe offset to start reading from the draw buffer.
draw_countthe number of draw parameter sets that should be read from the draw buffer.
Since
This function is available since SDL 3.2.0.

◆ DrawGPUPrimitives()

void SDL::DrawGPUPrimitives ( GPURenderPass  render_pass,
Uint32  num_vertices,
Uint32  num_instances,
Uint32  first_vertex,
Uint32  first_instance 
)
inline

You must not call this function before binding a graphics pipeline.

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Parameters
render_passa render pass handle.
num_verticesthe number of vertices to draw.
num_instancesthe number of instances that will be drawn.
first_vertexthe index of the first vertex to draw.
first_instancethe ID of the first instance to draw.
Since
This function is available since SDL 3.2.0.

◆ DrawGPUPrimitivesIndirect()

void SDL::DrawGPUPrimitivesIndirect ( GPURenderPass  render_pass,
GPUBuffer  buffer,
Uint32  offset,
Uint32  draw_count 
)
inline

The buffer must consist of tightly-packed draw parameter sets that each match the layout of GPUIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

Parameters
render_passa render pass handle.
buffera buffer containing draw parameters.
offsetthe offset to start reading from the draw buffer.
draw_countthe number of draw parameter sets that should be read from the draw buffer.
Since
This function is available since SDL 3.2.0.

◆ DrawIndexedPrimitives()

void SDL::GPURenderPass::DrawIndexedPrimitives ( Uint32  num_indices,
Uint32  num_instances,
Uint32  first_index,
Sint32  vertex_offset,
Uint32  first_instance 
)
inline

You must not call this function before binding a graphics pipeline.

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Parameters
num_indicesthe number of indices to draw per instance.
num_instancesthe number of instances to draw.
first_indexthe starting index within the index buffer.
vertex_offsetvalue added to vertex index before indexing into the vertex buffer.
first_instancethe ID of the first instance to draw.
Since
This function is available since SDL 3.2.0.

◆ DrawIndexedPrimitivesIndirect()

void SDL::GPURenderPass::DrawIndexedPrimitivesIndirect ( GPUBuffer  buffer,
Uint32  offset,
Uint32  draw_count 
)
inline

The buffer must consist of tightly-packed draw parameter sets that each match the layout of GPUIndexedIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

Parameters
buffera buffer containing draw parameters.
offsetthe offset to start reading from the draw buffer.
draw_countthe number of draw parameter sets that should be read from the draw buffer.
Since
This function is available since SDL 3.2.0.

◆ DrawPrimitives()

void SDL::GPURenderPass::DrawPrimitives ( Uint32  num_vertices,
Uint32  num_instances,
Uint32  first_vertex,
Uint32  first_instance 
)
inline

You must not call this function before binding a graphics pipeline.

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Parameters
num_verticesthe number of vertices to draw.
num_instancesthe number of instances that will be drawn.
first_vertexthe index of the first vertex to draw.
first_instancethe ID of the first instance to draw.
Since
This function is available since SDL 3.2.0.

◆ DrawPrimitivesIndirect()

void SDL::GPURenderPass::DrawPrimitivesIndirect ( GPUBuffer  buffer,
Uint32  offset,
Uint32  draw_count 
)
inline

The buffer must consist of tightly-packed draw parameter sets that each match the layout of GPUIndirectDrawCommand. You must not call this function before binding a graphics pipeline.

Parameters
buffera buffer containing draw parameters.
offsetthe offset to start reading from the draw buffer.
draw_countthe number of draw parameter sets that should be read from the draw buffer.
Since
This function is available since SDL 3.2.0.

◆ End() [1/3]

void SDL::GPURenderPass::End ( )
inline

All bound graphics state on the render pass command buffer is unset. The render pass handle is now invalid.

Since
This function is available since SDL 3.2.0.

◆ End() [2/3]

void SDL::GPUComputePass::End ( )
inline

All bound compute state on the command buffer is unset. The compute pass handle is now invalid.

Since
This function is available since SDL 3.2.0.

◆ End() [3/3]

void SDL::GPUCopyPass::End ( )
inline
Since
This function is available since SDL 3.2.0.

◆ EndGPUComputePass()

void SDL::EndGPUComputePass ( GPUComputePass  compute_pass)
inline

All bound compute state on the command buffer is unset. The compute pass handle is now invalid.

Parameters
compute_passa compute pass handle.
Since
This function is available since SDL 3.2.0.

◆ EndGPUCopyPass()

void SDL::EndGPUCopyPass ( GPUCopyPass  copy_pass)
inline
Parameters
copy_passa copy pass handle.
Since
This function is available since SDL 3.2.0.

◆ EndGPURenderPass()

void SDL::EndGPURenderPass ( GPURenderPass  render_pass)
inline

All bound graphics state on the render pass command buffer is unset. The render pass handle is now invalid.

Parameters
render_passa render pass handle.
Since
This function is available since SDL 3.2.0.

◆ GenerateMipmapsForGPUTexture()

void SDL::GenerateMipmapsForGPUTexture ( GPUCommandBuffer  command_buffer,
GPUTexture  texture 
)
inline

This function must not be called inside of any pass.

Parameters
command_buffera command_buffer.
texturea texture with more than 1 mip level.
Since
This function is available since SDL 3.2.0.

◆ GenerateMipmapsForTexture()

void SDL::GPUCommandBuffer::GenerateMipmapsForTexture ( GPUTexture  texture)
inline

This function must not be called inside of any pass.

Parameters
texturea texture with more than 1 mip level.
Since
This function is available since SDL 3.2.0.

◆ GetDriver()

const char * SDL::GPUDevice::GetDriver ( )
inline
Returns
the name of the device's driver, or nullptr on error.
Since
This function is available since SDL 3.2.0.

◆ GetGPUDeviceDriver()

const char * SDL::GetGPUDeviceDriver ( GPUDeviceParam  device)
inline
Parameters
devicea GPU context to query.
Returns
the name of the device's driver, or nullptr on error.
Since
This function is available since SDL 3.2.0.

◆ GetGPUDriver()

const char * SDL::GetGPUDriver ( int  index)
inline

The GPU drivers are presented in the order in which they are normally checked during initialization.

The names of drivers are all simple, low-ASCII identifiers, like "vulkan", "metal" or "direct3d12". These never have Unicode characters, and are not meant to be proper names.

Parameters
indexthe index of a GPU driver.
Returns
the name of the GPU driver with the given index.
Since
This function is available since SDL 3.2.0.
See also
GetNumGPUDrivers

◆ GetGPUShaderFormats()

GPUShaderFormat SDL::GetGPUShaderFormats ( GPUDeviceParam  device)
inline
Parameters
devicea GPU context to query.
Returns
a bitflag indicating which shader formats the driver is able to consume.
Since
This function is available since SDL 3.2.0.

◆ GetGPUSwapchainTextureFormat()

GPUTextureFormat SDL::GetGPUSwapchainTextureFormat ( GPUDeviceParam  device,
WindowParam  window 
)
inline

Note that this format can change if the swapchain parameters change.

Parameters
devicea GPU context.
windowan Window that has been claimed.
Returns
the texture format of the swapchain.
Since
This function is available since SDL 3.2.0.

◆ GetNumGPUDrivers()

int SDL::GetNumGPUDrivers ( )
inline
Returns
the number of built in GPU drivers.
Since
This function is available since SDL 3.2.0.
See also
GetGPUDriver

◆ GetShaderFormats()

GPUShaderFormat SDL::GPUDevice::GetShaderFormats ( )
inline
Returns
a bitflag indicating which shader formats the driver is able to consume.
Since
This function is available since SDL 3.2.0.

◆ GetSwapchainTextureFormat()

GPUTextureFormat SDL::GPUDevice::GetSwapchainTextureFormat ( WindowParam  window)
inline

Note that this format can change if the swapchain parameters change.

Parameters
windowan Window that has been claimed.
Returns
the texture format of the swapchain.
Since
This function is available since SDL 3.2.0.

◆ GPUSupportsProperties()

bool SDL::GPUSupportsProperties ( PropertiesParam  props)
inline
Parameters
propsthe properties to use.
Returns
true if supported, false otherwise.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.GPUDevice

◆ GPUSupportsShaderFormats()

bool SDL::GPUSupportsShaderFormats ( GPUShaderFormat  format_flags,
StringParam  name 
)
inline
Parameters
format_flagsa bitflag indicating which shader formats the app is able to provide.
namethe preferred GPU driver, or nullptr to let SDL pick the optimal driver.
Returns
true if supported, false otherwise.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.GPUDevice

◆ GPUTextureFormatTexelBlockSize()

Uint32 SDL::GPUTextureFormatTexelBlockSize ( GPUTextureFormat  format)
inline
Parameters
formatthe texture format you want to know the texel size of.
Returns
the texel block size of the texture format.
Since
This function is available since SDL 3.2.0.
See also
GPUCopyPass.UploadToTexture

◆ GPUTextureSupportsFormat()

bool SDL::GPUTextureSupportsFormat ( GPUDeviceParam  device,
GPUTextureFormat  format,
GPUTextureType  type,
GPUTextureUsageFlags  usage 
)
inline
Parameters
devicea GPU context.
formatthe texture format to check.
typethe type of texture (2D, 3D, Cube).
usagea bitmask of all usage scenarios to check.
Returns
whether the texture format is supported for this type and usage.
Since
This function is available since SDL 3.2.0.

◆ GPUTextureSupportsSampleCount()

bool SDL::GPUTextureSupportsSampleCount ( GPUDeviceParam  device,
GPUTextureFormat  format,
GPUSampleCount  sample_count 
)
inline
Parameters
devicea GPU context.
formatthe texture format to check.
sample_countthe sample count to check.
Returns
whether the sample count is supported for this texture format.
Since
This function is available since SDL 3.2.0.

◆ InsertDebugLabel()

void SDL::GPUCommandBuffer::InsertDebugLabel ( StringParam  text)
inline

Useful for debugging.

Parameters
texta UTF-8 string constant to insert as the label.
Since
This function is available since SDL 3.2.0.

◆ InsertGPUDebugLabel()

void SDL::InsertGPUDebugLabel ( GPUCommandBuffer  command_buffer,
StringParam  text 
)
inline

Useful for debugging.

Parameters
command_buffera command buffer.
texta UTF-8 string constant to insert as the label.
Since
This function is available since SDL 3.2.0.

◆ MapGPUTransferBuffer()

void * SDL::MapGPUTransferBuffer ( GPUDeviceParam  device,
GPUTransferBuffer  transfer_buffer,
bool  cycle 
)
inline

You must unmap the transfer buffer before encoding upload commands. The memory is owned by the graphics driver - do NOT call free() on the returned pointer.

Parameters
devicea GPU context.
transfer_buffera transfer buffer.
cycleif true, cycles the transfer buffer if it is already bound.
Returns
the address of the mapped transfer buffer memory, or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.

◆ MapTransferBuffer()

void * SDL::GPUDevice::MapTransferBuffer ( GPUTransferBuffer  transfer_buffer,
bool  cycle 
)
inline

You must unmap the transfer buffer before encoding upload commands. The memory is owned by the graphics driver - do NOT call free() on the returned pointer.

Parameters
transfer_buffera transfer buffer.
cycleif true, cycles the transfer buffer if it is already bound.
Returns
the address of the mapped transfer buffer memory, or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.

◆ PopDebugGroup()

void SDL::GPUCommandBuffer::PopDebugGroup ( )
inline
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.PushDebugGroup

◆ PopGPUDebugGroup()

void SDL::PopGPUDebugGroup ( GPUCommandBuffer  command_buffer)
inline
Parameters
command_buffera command buffer.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.PushDebugGroup

◆ PushComputeUniformData()

void SDL::GPUCommandBuffer::PushComputeUniformData ( Uint32  slot_index,
SourceBytes  data 
)
inline

Subsequent draw calls will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Parameters
slot_indexthe uniform slot to push data to.
dataclient data to write.
Since
This function is available since SDL 3.2.0.

◆ PushDebugGroup()

void SDL::GPUCommandBuffer::PushDebugGroup ( StringParam  name)
inline

Used for denoting groups of calls when viewing the command buffer callstream in a graphics debugging tool.

Each call to GPUCommandBuffer.PushDebugGroup must have a corresponding call to GPUCommandBuffer.PopDebugGroup.

On some backends (e.g. Metal), pushing a debug group during a render/blit/compute pass will create a group that is scoped to the native pass rather than the command buffer. For best results, if you push a debug group during a pass, always pop it in the same pass.

Parameters
namea UTF-8 string constant that names the group.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.PopDebugGroup

◆ PushFragmentUniformData()

void SDL::GPUCommandBuffer::PushFragmentUniformData ( Uint32  slot_index,
SourceBytes  data 
)
inline

Subsequent draw calls will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Parameters
slot_indexthe fragment uniform slot to push data to.
dataclient data to write.
Since
This function is available since SDL 3.2.0.

◆ PushGPUComputeUniformData()

void SDL::PushGPUComputeUniformData ( GPUCommandBuffer  command_buffer,
Uint32  slot_index,
SourceBytes  data 
)
inline

Subsequent draw calls will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Parameters
command_buffera command buffer.
slot_indexthe uniform slot to push data to.
dataclient data to write.
Since
This function is available since SDL 3.2.0.

◆ PushGPUDebugGroup()

void SDL::PushGPUDebugGroup ( GPUCommandBuffer  command_buffer,
StringParam  name 
)
inline

Used for denoting groups of calls when viewing the command buffer callstream in a graphics debugging tool.

Each call to GPUCommandBuffer.PushDebugGroup must have a corresponding call to GPUCommandBuffer.PopDebugGroup.

On some backends (e.g. Metal), pushing a debug group during a render/blit/compute pass will create a group that is scoped to the native pass rather than the command buffer. For best results, if you push a debug group during a pass, always pop it in the same pass.

Parameters
command_buffera command buffer.
namea UTF-8 string constant that names the group.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.PopDebugGroup

◆ PushGPUFragmentUniformData()

void SDL::PushGPUFragmentUniformData ( GPUCommandBuffer  command_buffer,
Uint32  slot_index,
SourceBytes  data 
)
inline

Subsequent draw calls will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Parameters
command_buffera command buffer.
slot_indexthe fragment uniform slot to push data to.
dataclient data to write.
Since
This function is available since SDL 3.2.0.

◆ PushGPUVertexUniformData()

void SDL::PushGPUVertexUniformData ( GPUCommandBuffer  command_buffer,
Uint32  slot_index,
SourceBytes  data 
)
inline

Subsequent draw calls will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Parameters
command_buffera command buffer.
slot_indexthe vertex uniform slot to push data to.
dataclient data to write.
Since
This function is available since SDL 3.2.0.

◆ PushVertexUniformData()

void SDL::GPUCommandBuffer::PushVertexUniformData ( Uint32  slot_index,
SourceBytes  data 
)
inline

Subsequent draw calls will use this uniform data.

The data being pushed must respect std140 layout conventions. In practical terms this means you must ensure that vec3 and vec4 fields are 16-byte aligned.

Parameters
slot_indexthe vertex uniform slot to push data to.
dataclient data to write.
Since
This function is available since SDL 3.2.0.

◆ QueryFence()

bool SDL::GPUDevice::QueryFence ( GPUFence fence)
inline
Parameters
fencea fence.
Returns
true if the fence is signaled, false if it is not.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.SubmitAndAcquireFence

◆ QueryGPUFence()

bool SDL::QueryGPUFence ( GPUDeviceParam  device,
GPUFence fence 
)
inline
Parameters
devicea GPU context.
fencea fence.
Returns
true if the fence is signaled, false if it is not.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.SubmitAndAcquireFence

◆ ReleaseBuffer()

void SDL::GPUDevice::ReleaseBuffer ( GPUBuffer  buffer)
inline

You must not reference the buffer after calling this function.

Parameters
buffera buffer to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseComputePipeline()

void SDL::GPUDevice::ReleaseComputePipeline ( GPUComputePipeline  compute_pipeline)
inline

You must not reference the compute pipeline after calling this function.

Parameters
compute_pipelinea compute pipeline to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseFence()

void SDL::GPUDevice::ReleaseFence ( GPUFence fence)
inline

You must not reference the fence after calling this function.

Parameters
fencea fence.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.SubmitAndAcquireFence

◆ ReleaseGPUBuffer()

void SDL::ReleaseGPUBuffer ( GPUDeviceParam  device,
GPUBuffer  buffer 
)
inline

You must not reference the buffer after calling this function.

Parameters
devicea GPU context.
buffera buffer to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGPUComputePipeline()

void SDL::ReleaseGPUComputePipeline ( GPUDeviceParam  device,
GPUComputePipeline  compute_pipeline 
)
inline

You must not reference the compute pipeline after calling this function.

Parameters
devicea GPU context.
compute_pipelinea compute pipeline to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGPUFence()

void SDL::ReleaseGPUFence ( GPUDeviceParam  device,
GPUFence fence 
)
inline

You must not reference the fence after calling this function.

Parameters
devicea GPU context.
fencea fence.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.SubmitAndAcquireFence

◆ ReleaseGPUGraphicsPipeline()

void SDL::ReleaseGPUGraphicsPipeline ( GPUDeviceParam  device,
GPUGraphicsPipeline  graphics_pipeline 
)
inline

You must not reference the graphics pipeline after calling this function.

Parameters
devicea GPU context.
graphics_pipelinea graphics pipeline to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGPUSampler()

void SDL::ReleaseGPUSampler ( GPUDeviceParam  device,
GPUSampler  sampler 
)
inline

You must not reference the sampler after calling this function.

Parameters
devicea GPU context.
samplera sampler to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGPUShader()

void SDL::ReleaseGPUShader ( GPUDeviceParam  device,
GPUShader  shader 
)
inline

You must not reference the shader after calling this function.

Parameters
devicea GPU context.
shadera shader to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGPUTexture()

void SDL::ReleaseGPUTexture ( GPUDeviceParam  device,
GPUTexture  texture 
)
inline

You must not reference the texture after calling this function.

Parameters
devicea GPU context.
texturea texture to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGPUTransferBuffer()

void SDL::ReleaseGPUTransferBuffer ( GPUDeviceParam  device,
GPUTransferBuffer  transfer_buffer 
)
inline

You must not reference the transfer buffer after calling this function.

Parameters
devicea GPU context.
transfer_buffera transfer buffer to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseGraphicsPipeline()

void SDL::GPUDevice::ReleaseGraphicsPipeline ( GPUGraphicsPipeline  graphics_pipeline)
inline

You must not reference the graphics pipeline after calling this function.

Parameters
graphics_pipelinea graphics pipeline to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseSampler()

void SDL::GPUDevice::ReleaseSampler ( GPUSampler  sampler)
inline

You must not reference the sampler after calling this function.

Parameters
samplera sampler to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseShader()

void SDL::GPUDevice::ReleaseShader ( GPUShader  shader)
inline

You must not reference the shader after calling this function.

Parameters
shadera shader to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseTexture()

void SDL::GPUDevice::ReleaseTexture ( GPUTexture  texture)
inline

You must not reference the texture after calling this function.

Parameters
texturea texture to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseTransferBuffer()

void SDL::GPUDevice::ReleaseTransferBuffer ( GPUTransferBuffer  transfer_buffer)
inline

You must not reference the transfer buffer after calling this function.

Parameters
transfer_buffera transfer buffer to be destroyed.
Since
This function is available since SDL 3.2.0.

◆ ReleaseWindow()

void SDL::GPUDevice::ReleaseWindow ( WindowParam  window)
inline
Parameters
windowan Window that has been claimed.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow

◆ ReleaseWindowFromGPUDevice()

void SDL::ReleaseWindowFromGPUDevice ( GPUDeviceParam  device,
WindowParam  window 
)
inline
Parameters
devicea GPU context.
windowan Window that has been claimed.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow

◆ SetAllowedFramesInFlight()

bool SDL::GPUDevice::SetAllowedFramesInFlight ( Uint32  allowed_frames_in_flight)
inline

The default value when the device is created is 2. This means that after you have submitted 2 frames for presentation, if the GPU has not finished working on the first frame, GPUCommandBuffer.AcquireSwapchainTexture() will fill the swapchain texture pointer with nullptr, and GPUCommandBuffer.WaitAndAcquireSwapchainTexture() will block.

Higher values increase throughput at the expense of visual latency. Lower values decrease visual latency at the expense of throughput.

Note that calling this function will stall and flush the command queue to prevent synchronization issues.

The minimum value of allowed frames in flight is 1, and the maximum is 3.

Parameters
allowed_frames_in_flightthe maximum number of frames that can be pending on the GPU.
Returns
true if successful, false on error; call GetError() for more information.
Since
This function is available since SDL 3.2.0.

◆ SetBlendConstants()

void SDL::GPURenderPass::SetBlendConstants ( FColorRaw  blend_constants)
inline
Parameters
blend_constantsthe blend constant color.
Since
This function is available since SDL 3.2.0.
See also
GPU_BLENDFACTOR_CONSTANT_COLOR
GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR

◆ SetBufferName()

void SDL::GPUDevice::SetBufferName ( GPUBuffer  buffer,
StringParam  text 
)
inline

You should use prop::GPUBuffer.CREATE_NAME_STRING with GPUBuffer.GPUBuffer instead of this function to avoid thread safety issues.

Parameters
buffera buffer to attach the name to.
texta UTF-8 string constant to mark as the name of the buffer.
Thread safety:
This function is not thread safe, you must make sure the buffer is not simultaneously used by any other thread.
Since
This function is available since SDL 3.2.0.
See also
GPUBuffer.GPUBuffer

◆ SetGPUAllowedFramesInFlight()

bool SDL::SetGPUAllowedFramesInFlight ( GPUDeviceParam  device,
Uint32  allowed_frames_in_flight 
)
inline

The default value when the device is created is 2. This means that after you have submitted 2 frames for presentation, if the GPU has not finished working on the first frame, GPUCommandBuffer.AcquireSwapchainTexture() will fill the swapchain texture pointer with nullptr, and GPUCommandBuffer.WaitAndAcquireSwapchainTexture() will block.

Higher values increase throughput at the expense of visual latency. Lower values decrease visual latency at the expense of throughput.

Note that calling this function will stall and flush the command queue to prevent synchronization issues.

The minimum value of allowed frames in flight is 1, and the maximum is 3.

Parameters
devicea GPU context.
allowed_frames_in_flightthe maximum number of frames that can be pending on the GPU.
Returns
true if successful, false on error; call GetError() for more information.
Since
This function is available since SDL 3.2.0.

◆ SetGPUBlendConstants()

void SDL::SetGPUBlendConstants ( GPURenderPass  render_pass,
FColorRaw  blend_constants 
)
inline
Parameters
render_passa render pass handle.
blend_constantsthe blend constant color.
Since
This function is available since SDL 3.2.0.
See also
GPU_BLENDFACTOR_CONSTANT_COLOR
GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR

◆ SetGPUBufferName()

void SDL::SetGPUBufferName ( GPUDeviceParam  device,
GPUBuffer  buffer,
StringParam  text 
)
inline

You should use prop::GPUBuffer.CREATE_NAME_STRING with GPUBuffer.GPUBuffer instead of this function to avoid thread safety issues.

Parameters
devicea GPU Context.
buffera buffer to attach the name to.
texta UTF-8 string constant to mark as the name of the buffer.
Thread safety:
This function is not thread safe, you must make sure the buffer is not simultaneously used by any other thread.
Since
This function is available since SDL 3.2.0.
See also
GPUBuffer.GPUBuffer

◆ SetGPUScissor()

void SDL::SetGPUScissor ( GPURenderPass  render_pass,
const RectRaw scissor 
)
inline
Parameters
render_passa render pass handle.
scissorthe scissor area to set.
Since
This function is available since SDL 3.2.0.

◆ SetGPUStencilReference()

void SDL::SetGPUStencilReference ( GPURenderPass  render_pass,
Uint8  reference 
)
inline
Parameters
render_passa render pass handle.
referencethe stencil reference value to set.
Since
This function is available since SDL 3.2.0.

◆ SetGPUSwapchainParameters()

bool SDL::SetGPUSwapchainParameters ( GPUDeviceParam  device,
WindowParam  window,
GPUSwapchainComposition  swapchain_composition,
GPUPresentMode  present_mode 
)
inline

This function will fail if the requested present mode or swapchain composition are unsupported by the device. Check if the parameters are supported via GPUDevice.WindowSupportsPresentMode / GPUDevice.WindowSupportsSwapchainComposition prior to calling this function.

GPU_PRESENTMODE_VSYNC with GPU_SWAPCHAINCOMPOSITION_SDR are always supported.

Parameters
devicea GPU context.
windowan Window that has been claimed.
swapchain_compositionthe desired composition of the swapchain.
present_modethe desired present mode for the swapchain.
Returns
true if successful, false on error; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.WindowSupportsPresentMode
GPUDevice.WindowSupportsSwapchainComposition

◆ SetGPUTextureName()

void SDL::SetGPUTextureName ( GPUDeviceParam  device,
GPUTexture  texture,
StringParam  text 
)
inline

You should use prop::GPUTexture.CREATE_NAME_STRING with GPUTexture.GPUTexture instead of this function to avoid thread safety issues.

Parameters
devicea GPU Context.
texturea texture to attach the name to.
texta UTF-8 string constant to mark as the name of the texture.
Thread safety:
This function is not thread safe, you must make sure the texture is not simultaneously used by any other thread.
Since
This function is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture

◆ SetGPUViewport()

void SDL::SetGPUViewport ( GPURenderPass  render_pass,
const GPUViewport viewport 
)
inline
Parameters
render_passa render pass handle.
viewportthe viewport to set.
Since
This function is available since SDL 3.2.0.

◆ SetScissor()

void SDL::GPURenderPass::SetScissor ( const RectRaw scissor)
inline
Parameters
scissorthe scissor area to set.
Since
This function is available since SDL 3.2.0.

◆ SetStencilReference()

void SDL::GPURenderPass::SetStencilReference ( Uint8  reference)
inline
Parameters
referencethe stencil reference value to set.
Since
This function is available since SDL 3.2.0.

◆ SetSwapchainParameters()

bool SDL::GPUDevice::SetSwapchainParameters ( WindowParam  window,
GPUSwapchainComposition  swapchain_composition,
GPUPresentMode  present_mode 
)
inline

This function will fail if the requested present mode or swapchain composition are unsupported by the device. Check if the parameters are supported via GPUDevice.WindowSupportsPresentMode / GPUDevice.WindowSupportsSwapchainComposition prior to calling this function.

GPU_PRESENTMODE_VSYNC with GPU_SWAPCHAINCOMPOSITION_SDR are always supported.

Parameters
windowan Window that has been claimed.
swapchain_compositionthe desired composition of the swapchain.
present_modethe desired present mode for the swapchain.
Returns
true if successful, false on error; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.WindowSupportsPresentMode
GPUDevice.WindowSupportsSwapchainComposition

◆ SetTextureName()

void SDL::GPUDevice::SetTextureName ( GPUTexture  texture,
StringParam  text 
)
inline

You should use prop::GPUTexture.CREATE_NAME_STRING with GPUTexture.GPUTexture instead of this function to avoid thread safety issues.

Parameters
texturea texture to attach the name to.
texta UTF-8 string constant to mark as the name of the texture.
Thread safety:
This function is not thread safe, you must make sure the texture is not simultaneously used by any other thread.
Since
This function is available since SDL 3.2.0.
See also
GPUTexture.GPUTexture

◆ SetViewport()

void SDL::GPURenderPass::SetViewport ( const GPUViewport viewport)
inline
Parameters
viewportthe viewport to set.
Since
This function is available since SDL 3.2.0.

◆ Submit()

void SDL::GPUCommandBuffer::Submit ( )
inline

It is invalid to use the command buffer after this is called.

This must be called from the thread the command buffer was acquired on.

All commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing.

Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.AcquireCommandBuffer
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUCommandBuffer.AcquireSwapchainTexture
GPUCommandBuffer.SubmitAndAcquireFence

◆ SubmitAndAcquireFence()

GPUFence * SDL::GPUCommandBuffer::SubmitAndAcquireFence ( )
inline

You must release this fence when it is no longer needed or it will cause a leak. It is invalid to use the command buffer after this is called.

This must be called from the thread the command buffer was acquired on.

All commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing.

Returns
a fence associated with the command buffer, or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.AcquireCommandBuffer
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUCommandBuffer.AcquireSwapchainTexture
GPUCommandBuffer.Submit
GPUDevice.ReleaseFence

◆ SubmitGPUCommandBuffer()

void SDL::SubmitGPUCommandBuffer ( GPUCommandBuffer  command_buffer)
inline

It is invalid to use the command buffer after this is called.

This must be called from the thread the command buffer was acquired on.

All commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing.

Parameters
command_buffera command buffer.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.AcquireCommandBuffer
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUCommandBuffer.AcquireSwapchainTexture
GPUCommandBuffer.SubmitAndAcquireFence

◆ SubmitGPUCommandBufferAndAcquireFence()

GPUFence * SDL::SubmitGPUCommandBufferAndAcquireFence ( GPUCommandBuffer  command_buffer)
inline

You must release this fence when it is no longer needed or it will cause a leak. It is invalid to use the command buffer after this is called.

This must be called from the thread the command buffer was acquired on.

All commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing.

Parameters
command_buffera command buffer.
Returns
a fence associated with the command buffer, or nullptr on failure; call GetError() for more information.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.AcquireCommandBuffer
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUCommandBuffer.AcquireSwapchainTexture
GPUCommandBuffer.Submit
GPUDevice.ReleaseFence

◆ TextureSupportsFormat()

bool SDL::GPUDevice::TextureSupportsFormat ( GPUTextureFormat  format,
GPUTextureType  type,
GPUTextureUsageFlags  usage 
)
inline
Parameters
formatthe texture format to check.
typethe type of texture (2D, 3D, Cube).
usagea bitmask of all usage scenarios to check.
Returns
whether the texture format is supported for this type and usage.
Since
This function is available since SDL 3.2.0.

◆ TextureSupportsSampleCount()

bool SDL::GPUDevice::TextureSupportsSampleCount ( GPUTextureFormat  format,
GPUSampleCount  sample_count 
)
inline
Parameters
formatthe texture format to check.
sample_countthe sample count to check.
Returns
whether the sample count is supported for this texture format.
Since
This function is available since SDL 3.2.0.

◆ UnmapGPUTransferBuffer()

void SDL::UnmapGPUTransferBuffer ( GPUDeviceParam  device,
GPUTransferBuffer  transfer_buffer 
)
inline
Parameters
devicea GPU context.
transfer_buffera previously mapped transfer buffer.
Since
This function is available since SDL 3.2.0.

◆ UnmapTransferBuffer()

void SDL::GPUDevice::UnmapTransferBuffer ( GPUTransferBuffer  transfer_buffer)
inline
Parameters
transfer_buffera previously mapped transfer buffer.
Since
This function is available since SDL 3.2.0.

◆ UploadToBuffer()

void SDL::GPUCopyPass::UploadToBuffer ( const GPUTransferBufferLocation source,
const GPUBufferRegion destination,
bool  cycle 
)
inline

The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

Parameters
sourcethe source transfer buffer with offset.
destinationthe destination buffer with offset and size.
cycleif true, cycles the buffer if it is already bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ UploadToGPUBuffer()

void SDL::UploadToGPUBuffer ( GPUCopyPass  copy_pass,
const GPUTransferBufferLocation source,
const GPUBufferRegion destination,
bool  cycle 
)
inline

The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

Parameters
copy_passa copy pass handle.
sourcethe source transfer buffer with offset.
destinationthe destination buffer with offset and size.
cycleif true, cycles the buffer if it is already bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ UploadToGPUTexture()

void SDL::UploadToGPUTexture ( GPUCopyPass  copy_pass,
const GPUTextureTransferInfo source,
const GPUTextureRegion destination,
bool  cycle 
)
inline

The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

You must align the data in the transfer buffer to a multiple of the texel size of the texture format.

Parameters
copy_passa copy pass handle.
sourcethe source transfer buffer with image layout information.
destinationthe destination texture region.
cycleif true, cycles the texture if the texture is bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ UploadToTexture()

void SDL::GPUCopyPass::UploadToTexture ( const GPUTextureTransferInfo source,
const GPUTextureRegion destination,
bool  cycle 
)
inline

The upload occurs on the GPU timeline. You may assume that the upload has finished in subsequent commands.

You must align the data in the transfer buffer to a multiple of the texel size of the texture format.

Parameters
sourcethe source transfer buffer with image layout information.
destinationthe destination texture region.
cycleif true, cycles the texture if the texture is bound, otherwise overwrites the data.
Since
This function is available since SDL 3.2.0.

◆ WaitAndAcquireGPUSwapchainTexture()

GPUTexture SDL::WaitAndAcquireGPUSwapchainTexture ( GPUCommandBuffer  command_buffer,
WindowParam  window,
Uint32 swapchain_texture_width = nullptr,
Uint32 swapchain_texture_height = nullptr 
)
inline

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. It is an error to call GPUCommandBuffer.Cancel() after a swapchain texture is acquired.

This function can fill the swapchain texture handle with nullptr in certain cases, for example if the window is minimized. This is not an error. You should always make sure to check whether the pointer is nullptr before actually using it.

The swapchain texture is managed by the implementation and must not be freed by the user. You MUST NOT call this function from any thread other than the one that created the window.

The swapchain texture is write-only and cannot be used as a sampler or for another reading operation.

Parameters
command_buffera command buffer.
windowa window that has been claimed.
swapchain_texture_widtha pointer filled in with the swapchain texture width, may be nullptr.
swapchain_texture_heighta pointer filled in with the swapchain texture height, may be nullptr.
Returns
a swapchain texture handle.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.Submit
GPUCommandBuffer.SubmitAndAcquireFence
GPUCommandBuffer.AcquireSwapchainTexture

◆ WaitAndAcquireSwapchainTexture()

GPUTexture SDL::GPUCommandBuffer::WaitAndAcquireSwapchainTexture ( WindowParam  window,
Uint32 swapchain_texture_width = nullptr,
Uint32 swapchain_texture_height = nullptr 
)
inline

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. It is an error to call GPUCommandBuffer.Cancel() after a swapchain texture is acquired.

This function can fill the swapchain texture handle with nullptr in certain cases, for example if the window is minimized. This is not an error. You should always make sure to check whether the pointer is nullptr before actually using it.

The swapchain texture is managed by the implementation and must not be freed by the user. You MUST NOT call this function from any thread other than the one that created the window.

The swapchain texture is write-only and cannot be used as a sampler or for another reading operation.

Parameters
windowa window that has been claimed.
swapchain_texture_widtha pointer filled in with the swapchain texture width, may be nullptr.
swapchain_texture_heighta pointer filled in with the swapchain texture height, may be nullptr.
Returns
a swapchain texture handle.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.Submit
GPUCommandBuffer.SubmitAndAcquireFence
GPUCommandBuffer.AcquireSwapchainTexture

◆ WaitForFences()

void SDL::GPUDevice::WaitForFences ( bool  wait_all,
std::span< GPUFence *const >  fences 
)
inline
Parameters
wait_allif 0, wait for any fence to be signaled, if 1, wait for all fences to be signaled.
fencesan array of fences to wait on.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.SubmitAndAcquireFence
GPUDevice.WaitForIdle

◆ WaitForGPUFences()

void SDL::WaitForGPUFences ( GPUDeviceParam  device,
bool  wait_all,
std::span< GPUFence *const >  fences 
)
inline
Parameters
devicea GPU context.
wait_allif 0, wait for any fence to be signaled, if 1, wait for all fences to be signaled.
fencesan array of fences to wait on.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.SubmitAndAcquireFence
GPUDevice.WaitForIdle

◆ WaitForGPUIdle()

void SDL::WaitForGPUIdle ( GPUDeviceParam  device)
inline
Parameters
devicea GPU context.
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.WaitForFences

◆ WaitForGPUSwapchain()

void SDL::WaitForGPUSwapchain ( GPUDeviceParam  device,
WindowParam  window 
)
inline
Parameters
devicea GPU context.
windowa window that has been claimed.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.AcquireSwapchainTexture
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.SetAllowedFramesInFlight

◆ WaitForIdle()

void SDL::GPUDevice::WaitForIdle ( )
inline
Exceptions
Erroron failure.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.WaitForFences

◆ WaitForSwapchain()

void SDL::GPUDevice::WaitForSwapchain ( WindowParam  window)
inline
Parameters
windowa window that has been claimed.
Exceptions
Erroron failure.
Thread safety:
This function should only be called from the thread that created the window.
Since
This function is available since SDL 3.2.0.
See also
GPUCommandBuffer.AcquireSwapchainTexture
GPUCommandBuffer.WaitAndAcquireSwapchainTexture
GPUDevice.SetAllowedFramesInFlight

◆ WindowSupportsGPUPresentMode()

bool SDL::WindowSupportsGPUPresentMode ( GPUDeviceParam  device,
WindowParam  window,
GPUPresentMode  present_mode 
)
inline

The window must be claimed before calling this function.

Parameters
devicea GPU context.
windowan Window.
present_modethe presentation mode to check.
Returns
true if supported, false if unsupported.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow

◆ WindowSupportsGPUSwapchainComposition()

bool SDL::WindowSupportsGPUSwapchainComposition ( GPUDeviceParam  device,
WindowParam  window,
GPUSwapchainComposition  swapchain_composition 
)
inline

The window must be claimed before calling this function.

Parameters
devicea GPU context.
windowan Window.
swapchain_compositionthe swapchain composition to check.
Returns
true if supported, false if unsupported.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow

◆ WindowSupportsPresentMode()

bool SDL::GPUDevice::WindowSupportsPresentMode ( WindowParam  window,
GPUPresentMode  present_mode 
)
inline

The window must be claimed before calling this function.

Parameters
windowan Window.
present_modethe presentation mode to check.
Returns
true if supported, false if unsupported.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow

◆ WindowSupportsSwapchainComposition()

bool SDL::GPUDevice::WindowSupportsSwapchainComposition ( WindowParam  window,
GPUSwapchainComposition  swapchain_composition 
)
inline

The window must be claimed before calling this function.

Parameters
windowan Window.
swapchain_compositionthe swapchain composition to check.
Returns
true if supported, false if unsupported.
Since
This function is available since SDL 3.2.0.
See also
GPUDevice.ClaimWindow

Variable Documentation

◆ GPU_BLENDFACTOR_CONSTANT_COLOR

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_CONSTANT_COLOR
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_CONSTANT_COLOR

◆ GPU_BLENDFACTOR_DST_ALPHA

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_DST_ALPHA
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_DST_ALPHA

◆ GPU_BLENDFACTOR_DST_COLOR

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_DST_COLOR
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_DST_COLOR

◆ GPU_BLENDFACTOR_INVALID

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_INVALID
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_INVALID

◆ GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_ONE_MINUS_CONSTANT_COLOR

◆ GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_ALPHA

◆ GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_ONE_MINUS_DST_COLOR

◆ GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_ALPHA

◆ GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_ONE_MINUS_SRC_COLOR

◆ GPU_BLENDFACTOR_SRC_ALPHA

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_SRC_ALPHA
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_SRC_ALPHA

◆ GPU_BLENDFACTOR_SRC_ALPHA_SATURATE

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_SRC_ALPHA_SATURATE
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_SRC_ALPHA_SATURATE

◆ GPU_BLENDFACTOR_SRC_COLOR

constexpr GPUBlendFactor SDL::GPU_BLENDFACTOR_SRC_COLOR
constexpr
Initial value:
=
SDL_GPU_BLENDFACTOR_SRC_COLOR

◆ GPU_BLENDOP_INVALID

constexpr GPUBlendOp SDL::GPU_BLENDOP_INVALID
constexpr
Initial value:
=
SDL_GPU_BLENDOP_INVALID

◆ GPU_BLENDOP_MAX

constexpr GPUBlendOp SDL::GPU_BLENDOP_MAX
constexpr
Initial value:
=
SDL_GPU_BLENDOP_MAX

◆ GPU_BLENDOP_MIN

constexpr GPUBlendOp SDL::GPU_BLENDOP_MIN
constexpr
Initial value:
=
SDL_GPU_BLENDOP_MIN

◆ GPU_BLENDOP_REVERSE_SUBTRACT

constexpr GPUBlendOp SDL::GPU_BLENDOP_REVERSE_SUBTRACT
constexpr
Initial value:
=
SDL_GPU_BLENDOP_REVERSE_SUBTRACT

◆ GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ

constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ
constexpr
Initial value:
=
SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_READ

◆ GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE

constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE
constexpr
Initial value:
=
SDL_GPU_BUFFERUSAGE_COMPUTE_STORAGE_WRITE

◆ GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ

constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ
constexpr
Initial value:
=
SDL_GPU_BUFFERUSAGE_GRAPHICS_STORAGE_READ

◆ GPU_BUFFERUSAGE_INDEX

constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_INDEX
constexpr
Initial value:
=
SDL_GPU_BUFFERUSAGE_INDEX

◆ GPU_BUFFERUSAGE_INDIRECT

constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_INDIRECT
constexpr
Initial value:
=
SDL_GPU_BUFFERUSAGE_INDIRECT

◆ GPU_BUFFERUSAGE_VERTEX

constexpr GPUBufferUsageFlags SDL::GPU_BUFFERUSAGE_VERTEX
constexpr
Initial value:
=
SDL_GPU_BUFFERUSAGE_VERTEX

◆ GPU_COLORCOMPONENT_A

constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_A
constexpr
Initial value:
=
SDL_GPU_COLORCOMPONENT_A

◆ GPU_COLORCOMPONENT_B

constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_B
constexpr
Initial value:
=
SDL_GPU_COLORCOMPONENT_B

◆ GPU_COLORCOMPONENT_G

constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_G
constexpr
Initial value:
=
SDL_GPU_COLORCOMPONENT_G

◆ GPU_COLORCOMPONENT_R

constexpr GPUColorComponentFlags SDL::GPU_COLORCOMPONENT_R
constexpr
Initial value:
=
SDL_GPU_COLORCOMPONENT_R

◆ GPU_COMPAREOP_ALWAYS

constexpr GPUCompareOp SDL::GPU_COMPAREOP_ALWAYS
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_ALWAYS

◆ GPU_COMPAREOP_EQUAL

constexpr GPUCompareOp SDL::GPU_COMPAREOP_EQUAL
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_EQUAL

◆ GPU_COMPAREOP_GREATER

constexpr GPUCompareOp SDL::GPU_COMPAREOP_GREATER
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_GREATER

◆ GPU_COMPAREOP_GREATER_OR_EQUAL

constexpr GPUCompareOp SDL::GPU_COMPAREOP_GREATER_OR_EQUAL
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_GREATER_OR_EQUAL

◆ GPU_COMPAREOP_INVALID

constexpr GPUCompareOp SDL::GPU_COMPAREOP_INVALID
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_INVALID

◆ GPU_COMPAREOP_LESS

constexpr GPUCompareOp SDL::GPU_COMPAREOP_LESS
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_LESS

◆ GPU_COMPAREOP_LESS_OR_EQUAL

constexpr GPUCompareOp SDL::GPU_COMPAREOP_LESS_OR_EQUAL
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_LESS_OR_EQUAL

◆ GPU_COMPAREOP_NEVER

constexpr GPUCompareOp SDL::GPU_COMPAREOP_NEVER
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_NEVER

◆ GPU_COMPAREOP_NOT_EQUAL

constexpr GPUCompareOp SDL::GPU_COMPAREOP_NOT_EQUAL
constexpr
Initial value:
=
SDL_GPU_COMPAREOP_NOT_EQUAL

◆ GPU_CUBEMAPFACE_NEGATIVEX

constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_NEGATIVEX
constexpr
Initial value:
=
SDL_GPU_CUBEMAPFACE_NEGATIVEX

◆ GPU_CUBEMAPFACE_NEGATIVEY

constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_NEGATIVEY
constexpr
Initial value:
=
SDL_GPU_CUBEMAPFACE_NEGATIVEY

◆ GPU_CUBEMAPFACE_NEGATIVEZ

constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_NEGATIVEZ
constexpr
Initial value:
=
SDL_GPU_CUBEMAPFACE_NEGATIVEZ

◆ GPU_CUBEMAPFACE_POSITIVEX

constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_POSITIVEX
constexpr
Initial value:
=
SDL_GPU_CUBEMAPFACE_POSITIVEX

◆ GPU_CUBEMAPFACE_POSITIVEY

constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_POSITIVEY
constexpr
Initial value:
=
SDL_GPU_CUBEMAPFACE_POSITIVEY

◆ GPU_CUBEMAPFACE_POSITIVEZ

constexpr GPUCubeMapFace SDL::GPU_CUBEMAPFACE_POSITIVEZ
constexpr
Initial value:
=
SDL_GPU_CUBEMAPFACE_POSITIVEZ

◆ GPU_CULLMODE_BACK

constexpr GPUCullMode SDL::GPU_CULLMODE_BACK
constexpr
Initial value:
=
SDL_GPU_CULLMODE_BACK

◆ GPU_CULLMODE_FRONT

constexpr GPUCullMode SDL::GPU_CULLMODE_FRONT
constexpr
Initial value:
=
SDL_GPU_CULLMODE_FRONT

◆ GPU_CULLMODE_NONE

constexpr GPUCullMode SDL::GPU_CULLMODE_NONE
constexpr
Initial value:
=
SDL_GPU_CULLMODE_NONE

◆ GPU_FILLMODE_FILL

constexpr GPUFillMode SDL::GPU_FILLMODE_FILL
constexpr
Initial value:
=
SDL_GPU_FILLMODE_FILL

◆ GPU_FILLMODE_LINE

constexpr GPUFillMode SDL::GPU_FILLMODE_LINE
constexpr
Initial value:
=
SDL_GPU_FILLMODE_LINE

◆ GPU_FILTER_LINEAR

constexpr GPUFilter SDL::GPU_FILTER_LINEAR
constexpr
Initial value:
=
SDL_GPU_FILTER_LINEAR

◆ GPU_FILTER_NEAREST

constexpr GPUFilter SDL::GPU_FILTER_NEAREST
constexpr
Initial value:
=
SDL_GPU_FILTER_NEAREST

◆ GPU_FRONTFACE_COUNTER_CLOCKWISE

constexpr GPUFrontFace SDL::GPU_FRONTFACE_COUNTER_CLOCKWISE
constexpr
Initial value:
=
SDL_GPU_FRONTFACE_COUNTER_CLOCKWISE

◆ GPU_INDEXELEMENTSIZE_16BIT

constexpr GPUIndexElementSize SDL::GPU_INDEXELEMENTSIZE_16BIT
constexpr
Initial value:
=
SDL_GPU_INDEXELEMENTSIZE_16BIT

◆ GPU_INDEXELEMENTSIZE_32BIT

constexpr GPUIndexElementSize SDL::GPU_INDEXELEMENTSIZE_32BIT
constexpr
Initial value:
=
SDL_GPU_INDEXELEMENTSIZE_32BIT

◆ GPU_LOADOP_DONT_CARE

constexpr GPULoadOp SDL::GPU_LOADOP_DONT_CARE = SDL_GPU_LOADOP_DONT_CARE
constexpr

The contents will be undefined.

◆ GPU_PRESENTMODE_IMMEDIATE

constexpr GPUPresentMode SDL::GPU_PRESENTMODE_IMMEDIATE
constexpr
Initial value:
=
SDL_GPU_PRESENTMODE_IMMEDIATE

◆ GPU_PRESENTMODE_MAILBOX

constexpr GPUPresentMode SDL::GPU_PRESENTMODE_MAILBOX
constexpr
Initial value:
=
SDL_GPU_PRESENTMODE_MAILBOX

◆ GPU_PRESENTMODE_VSYNC

constexpr GPUPresentMode SDL::GPU_PRESENTMODE_VSYNC
constexpr
Initial value:
=
SDL_GPU_PRESENTMODE_VSYNC

◆ GPU_PRIMITIVETYPE_LINELIST

constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_LINELIST
constexpr
Initial value:
=
SDL_GPU_PRIMITIVETYPE_LINELIST

◆ GPU_PRIMITIVETYPE_LINESTRIP

constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_LINESTRIP
constexpr
Initial value:
=
SDL_GPU_PRIMITIVETYPE_LINESTRIP

◆ GPU_PRIMITIVETYPE_POINTLIST

constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_POINTLIST
constexpr
Initial value:
=
SDL_GPU_PRIMITIVETYPE_POINTLIST

◆ GPU_PRIMITIVETYPE_TRIANGLELIST

constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_TRIANGLELIST
constexpr
Initial value:
=
SDL_GPU_PRIMITIVETYPE_TRIANGLELIST

◆ GPU_PRIMITIVETYPE_TRIANGLESTRIP

constexpr GPUPrimitiveType SDL::GPU_PRIMITIVETYPE_TRIANGLESTRIP
constexpr
Initial value:
=
SDL_GPU_PRIMITIVETYPE_TRIANGLESTRIP

◆ GPU_SAMPLECOUNT_1

constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_1
constexpr
Initial value:
=
SDL_GPU_SAMPLECOUNT_1

◆ GPU_SAMPLECOUNT_2

constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_2
constexpr
Initial value:
=
SDL_GPU_SAMPLECOUNT_2

◆ GPU_SAMPLECOUNT_4

constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_4
constexpr
Initial value:
=
SDL_GPU_SAMPLECOUNT_4

◆ GPU_SAMPLECOUNT_8

constexpr GPUSampleCount SDL::GPU_SAMPLECOUNT_8
constexpr
Initial value:
=
SDL_GPU_SAMPLECOUNT_8

◆ GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE

constexpr GPUSamplerAddressMode SDL::GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE
constexpr
Initial value:
=
SDL_GPU_SAMPLERADDRESSMODE_CLAMP_TO_EDGE

◆ GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT

constexpr GPUSamplerAddressMode SDL::GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT
constexpr
Initial value:
=
SDL_GPU_SAMPLERADDRESSMODE_MIRRORED_REPEAT

◆ GPU_SAMPLERADDRESSMODE_REPEAT

constexpr GPUSamplerAddressMode SDL::GPU_SAMPLERADDRESSMODE_REPEAT
constexpr
Initial value:
=
SDL_GPU_SAMPLERADDRESSMODE_REPEAT

◆ GPU_SAMPLERMIPMAPMODE_LINEAR

constexpr GPUSamplerMipmapMode SDL::GPU_SAMPLERMIPMAPMODE_LINEAR
constexpr
Initial value:
=
SDL_GPU_SAMPLERMIPMAPMODE_LINEAR

◆ GPU_SAMPLERMIPMAPMODE_NEAREST

constexpr GPUSamplerMipmapMode SDL::GPU_SAMPLERMIPMAPMODE_NEAREST
constexpr
Initial value:
=
SDL_GPU_SAMPLERMIPMAPMODE_NEAREST

◆ GPU_SHADERFORMAT_DXBC

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_DXBC
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_DXBC

◆ GPU_SHADERFORMAT_DXIL

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_DXIL
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_DXIL

◆ GPU_SHADERFORMAT_INVALID

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_INVALID
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_INVALID

◆ GPU_SHADERFORMAT_METALLIB

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_METALLIB
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_METALLIB

◆ GPU_SHADERFORMAT_MSL

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_MSL
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_MSL

◆ GPU_SHADERFORMAT_PRIVATE

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_PRIVATE
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_PRIVATE

◆ GPU_SHADERFORMAT_SPIRV

constexpr GPUShaderFormat SDL::GPU_SHADERFORMAT_SPIRV
constexpr
Initial value:
=
SDL_GPU_SHADERFORMAT_SPIRV

◆ GPU_SHADERSTAGE_FRAGMENT

constexpr GPUShaderStage SDL::GPU_SHADERSTAGE_FRAGMENT
constexpr
Initial value:
=
SDL_GPU_SHADERSTAGE_FRAGMENT

◆ GPU_SHADERSTAGE_VERTEX

constexpr GPUShaderStage SDL::GPU_SHADERSTAGE_VERTEX
constexpr
Initial value:
=
SDL_GPU_SHADERSTAGE_VERTEX

◆ GPU_STENCILOP_DECREMENT_AND_CLAMP

constexpr GPUStencilOp SDL::GPU_STENCILOP_DECREMENT_AND_CLAMP
constexpr
Initial value:
=
SDL_GPU_STENCILOP_DECREMENT_AND_CLAMP

◆ GPU_STENCILOP_DECREMENT_AND_WRAP

constexpr GPUStencilOp SDL::GPU_STENCILOP_DECREMENT_AND_WRAP
constexpr
Initial value:
=
SDL_GPU_STENCILOP_DECREMENT_AND_WRAP

◆ GPU_STENCILOP_INCREMENT_AND_CLAMP

constexpr GPUStencilOp SDL::GPU_STENCILOP_INCREMENT_AND_CLAMP
constexpr
Initial value:
=
SDL_GPU_STENCILOP_INCREMENT_AND_CLAMP

◆ GPU_STENCILOP_INCREMENT_AND_WRAP

constexpr GPUStencilOp SDL::GPU_STENCILOP_INCREMENT_AND_WRAP
constexpr
Initial value:
=
SDL_GPU_STENCILOP_INCREMENT_AND_WRAP

◆ GPU_STENCILOP_INVALID

constexpr GPUStencilOp SDL::GPU_STENCILOP_INVALID
constexpr
Initial value:
=
SDL_GPU_STENCILOP_INVALID

◆ GPU_STENCILOP_INVERT

constexpr GPUStencilOp SDL::GPU_STENCILOP_INVERT
constexpr
Initial value:
=
SDL_GPU_STENCILOP_INVERT

◆ GPU_STENCILOP_KEEP

constexpr GPUStencilOp SDL::GPU_STENCILOP_KEEP
constexpr
Initial value:
=
SDL_GPU_STENCILOP_KEEP

◆ GPU_STENCILOP_REPLACE

constexpr GPUStencilOp SDL::GPU_STENCILOP_REPLACE
constexpr
Initial value:
=
SDL_GPU_STENCILOP_REPLACE

◆ GPU_STENCILOP_ZERO

constexpr GPUStencilOp SDL::GPU_STENCILOP_ZERO
constexpr
Initial value:
=
SDL_GPU_STENCILOP_ZERO

◆ GPU_STOREOP_DONT_CARE

constexpr GPUStoreOp SDL::GPU_STOREOP_DONT_CARE = SDL_GPU_STOREOP_DONT_CARE
constexpr

The contents will be undefined.

◆ GPU_STOREOP_RESOLVE

constexpr GPUStoreOp SDL::GPU_STOREOP_RESOLVE = SDL_GPU_STOREOP_RESOLVE
constexpr

The contents in the multisample texture may then be discarded and will be undefined.

◆ GPU_STOREOP_RESOLVE_AND_STORE

constexpr GPUStoreOp SDL::GPU_STOREOP_RESOLVE_AND_STORE
constexpr
Initial value:
=
SDL_GPU_STOREOP_RESOLVE_AND_STORE

The contents in the multisample texture will be written to memory.

◆ GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084

constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084
constexpr
Initial value:
=
SDL_GPU_SWAPCHAINCOMPOSITION_HDR10_ST2084

◆ GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR

constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR
constexpr
Initial value:
=
SDL_GPU_SWAPCHAINCOMPOSITION_HDR_EXTENDED_LINEAR

◆ GPU_SWAPCHAINCOMPOSITION_SDR

constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_SDR
constexpr
Initial value:
=
SDL_GPU_SWAPCHAINCOMPOSITION_SDR

◆ GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR

constexpr GPUSwapchainComposition SDL::GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR
constexpr
Initial value:
=
SDL_GPU_SWAPCHAINCOMPOSITION_SDR_LINEAR

◆ GPU_TEXTUREFORMAT_A8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_A8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_A8_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x10_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_10x10_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x10_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x10_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x5_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_10x5_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x5_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x5_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x6_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_10x6_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x6_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x6_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x8_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_10x8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_10x8_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_12x10_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_12x10_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x10_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_12x10_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_12x12_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_12x12_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x12_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_12x12_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_4x4_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_4x4_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_4x4_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_4x4_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_5x4_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_5x4_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x4_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_5x4_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_5x5_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_5x5_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x5_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_5x5_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_6x5_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_6x5_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x5_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_6x5_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_6x6_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_6x6_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x6_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_6x6_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x5_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_8x5_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x5_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x5_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x6_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_8x6_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x6_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x6_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x8_FLOAT

◆ GPU_TEXTUREFORMAT_ASTC_8x8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM

◆ GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_ASTC_8x8_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_B4G4R4A4_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B4G4R4A4_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_B4G4R4A4_UNORM

◆ GPU_TEXTUREFORMAT_B5G5R5A1_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B5G5R5A1_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_B5G5R5A1_UNORM

◆ GPU_TEXTUREFORMAT_B5G6R5_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B5G6R5_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_B5G6R5_UNORM

◆ GPU_TEXTUREFORMAT_B8G8R8A8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B8G8R8A8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM

◆ GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_B8G8R8A8_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_BC1_RGBA_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC1_RGBA_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM

◆ GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC1_RGBA_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_BC2_RGBA_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC2_RGBA_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM

◆ GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC2_RGBA_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_BC3_RGBA_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC3_RGBA_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM

◆ GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC3_RGBA_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_BC4_R_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC4_R_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC4_R_UNORM

◆ GPU_TEXTUREFORMAT_BC5_RG_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC5_RG_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC5_RG_UNORM

◆ GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC6H_RGB_FLOAT

◆ GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC6H_RGB_UFLOAT

◆ GPU_TEXTUREFORMAT_BC7_RGBA_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC7_RGBA_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM

◆ GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_BC7_RGBA_UNORM_SRGB

◆ GPU_TEXTUREFORMAT_D16_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D16_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_D16_UNORM

◆ GPU_TEXTUREFORMAT_D24_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D24_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_D24_UNORM

◆ GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_D24_UNORM_S8_UINT

◆ GPU_TEXTUREFORMAT_D32_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D32_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_D32_FLOAT

◆ GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_D32_FLOAT_S8_UINT

◆ GPU_TEXTUREFORMAT_INVALID

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_INVALID
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_INVALID

◆ GPU_TEXTUREFORMAT_R10G10B10A2_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R10G10B10A2_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R10G10B10A2_UNORM

◆ GPU_TEXTUREFORMAT_R11G11B10_UFLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R11G11B10_UFLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R11G11B10_UFLOAT

◆ GPU_TEXTUREFORMAT_R16_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16_FLOAT

◆ GPU_TEXTUREFORMAT_R16_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16_INT

◆ GPU_TEXTUREFORMAT_R16_SNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_SNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16_SNORM

◆ GPU_TEXTUREFORMAT_R16_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16_UINT

◆ GPU_TEXTUREFORMAT_R16_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16_UNORM

◆ GPU_TEXTUREFORMAT_R16G16_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16_FLOAT

◆ GPU_TEXTUREFORMAT_R16G16_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16_INT

◆ GPU_TEXTUREFORMAT_R16G16_SNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_SNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16_SNORM

◆ GPU_TEXTUREFORMAT_R16G16_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16_UINT

◆ GPU_TEXTUREFORMAT_R16G16_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16_UNORM

◆ GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_FLOAT

◆ GPU_TEXTUREFORMAT_R16G16B16A16_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_INT

◆ GPU_TEXTUREFORMAT_R16G16B16A16_SNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_SNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_SNORM

◆ GPU_TEXTUREFORMAT_R16G16B16A16_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UINT

◆ GPU_TEXTUREFORMAT_R16G16B16A16_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R16G16B16A16_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R16G16B16A16_UNORM

◆ GPU_TEXTUREFORMAT_R32_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32_FLOAT

◆ GPU_TEXTUREFORMAT_R32_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32_INT

◆ GPU_TEXTUREFORMAT_R32_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32_UINT

◆ GPU_TEXTUREFORMAT_R32G32_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32G32_FLOAT

◆ GPU_TEXTUREFORMAT_R32G32_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32G32_INT

◆ GPU_TEXTUREFORMAT_R32G32_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32G32_UINT

◆ GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32G32B32A32_FLOAT

◆ GPU_TEXTUREFORMAT_R32G32B32A32_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32B32A32_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32G32B32A32_INT

◆ GPU_TEXTUREFORMAT_R32G32B32A32_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R32G32B32A32_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R32G32B32A32_UINT

◆ GPU_TEXTUREFORMAT_R8_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8_INT

◆ GPU_TEXTUREFORMAT_R8_SNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_SNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8_SNORM

◆ GPU_TEXTUREFORMAT_R8_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8_UINT

◆ GPU_TEXTUREFORMAT_R8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8_UNORM

◆ GPU_TEXTUREFORMAT_R8G8_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8_INT

◆ GPU_TEXTUREFORMAT_R8G8_SNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_SNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8_SNORM

◆ GPU_TEXTUREFORMAT_R8G8_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8_UINT

◆ GPU_TEXTUREFORMAT_R8G8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8_UNORM

◆ GPU_TEXTUREFORMAT_R8G8B8A8_INT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_INT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_INT

◆ GPU_TEXTUREFORMAT_R8G8B8A8_SNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_SNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_SNORM

◆ GPU_TEXTUREFORMAT_R8G8B8A8_UINT

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_UINT
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UINT

◆ GPU_TEXTUREFORMAT_R8G8B8A8_UNORM

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_UNORM
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM

◆ GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB

constexpr GPUTextureFormat SDL::GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB
constexpr
Initial value:
=
SDL_GPU_TEXTUREFORMAT_R8G8B8A8_UNORM_SRGB

◆ GPU_TEXTURETYPE_2D

constexpr GPUTextureType SDL::GPU_TEXTURETYPE_2D
constexpr
Initial value:
=
SDL_GPU_TEXTURETYPE_2D

◆ GPU_TEXTURETYPE_2D_ARRAY

constexpr GPUTextureType SDL::GPU_TEXTURETYPE_2D_ARRAY
constexpr
Initial value:
=
SDL_GPU_TEXTURETYPE_2D_ARRAY

◆ GPU_TEXTURETYPE_3D

constexpr GPUTextureType SDL::GPU_TEXTURETYPE_3D
constexpr
Initial value:
=
SDL_GPU_TEXTURETYPE_3D

◆ GPU_TEXTURETYPE_CUBE

constexpr GPUTextureType SDL::GPU_TEXTURETYPE_CUBE
constexpr
Initial value:
=
SDL_GPU_TEXTURETYPE_CUBE

◆ GPU_TEXTURETYPE_CUBE_ARRAY

constexpr GPUTextureType SDL::GPU_TEXTURETYPE_CUBE_ARRAY
constexpr
Initial value:
=
SDL_GPU_TEXTURETYPE_CUBE_ARRAY

◆ GPU_TEXTUREUSAGE_COLOR_TARGET

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COLOR_TARGET
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_COLOR_TARGET

◆ GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_READ

◆ GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_SIMULTANEOUS_READ_WRITE

This is NOT equivalent to READ | WRITE.

◆ GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_COMPUTE_STORAGE_WRITE

◆ GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_DEPTH_STENCIL_TARGET

◆ GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_GRAPHICS_STORAGE_READ

◆ GPU_TEXTUREUSAGE_SAMPLER

constexpr GPUTextureUsageFlags SDL::GPU_TEXTUREUSAGE_SAMPLER
constexpr
Initial value:
=
SDL_GPU_TEXTUREUSAGE_SAMPLER

◆ GPU_TRANSFERBUFFERUSAGE_DOWNLOAD

constexpr GPUTransferBufferUsage SDL::GPU_TRANSFERBUFFERUSAGE_DOWNLOAD
constexpr
Initial value:
=
SDL_GPU_TRANSFERBUFFERUSAGE_DOWNLOAD

◆ GPU_TRANSFERBUFFERUSAGE_UPLOAD

constexpr GPUTransferBufferUsage SDL::GPU_TRANSFERBUFFERUSAGE_UPLOAD
constexpr
Initial value:
=
SDL_GPU_TRANSFERBUFFERUSAGE_UPLOAD

◆ GPU_VERTEXELEMENTFORMAT_BYTE2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_BYTE2

◆ GPU_VERTEXELEMENTFORMAT_BYTE2_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE2_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_BYTE2_NORM

◆ GPU_VERTEXELEMENTFORMAT_BYTE4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_BYTE4

◆ GPU_VERTEXELEMENTFORMAT_BYTE4_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_BYTE4_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_BYTE4_NORM

◆ GPU_VERTEXELEMENTFORMAT_FLOAT

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT

◆ GPU_VERTEXELEMENTFORMAT_FLOAT2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT2

◆ GPU_VERTEXELEMENTFORMAT_FLOAT3

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT3
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT3

◆ GPU_VERTEXELEMENTFORMAT_FLOAT4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_FLOAT4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_FLOAT4

◆ GPU_VERTEXELEMENTFORMAT_HALF2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_HALF2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_HALF2

◆ GPU_VERTEXELEMENTFORMAT_HALF4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_HALF4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_HALF4

◆ GPU_VERTEXELEMENTFORMAT_INT

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_INT

◆ GPU_VERTEXELEMENTFORMAT_INT2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_INT2

◆ GPU_VERTEXELEMENTFORMAT_INT3

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT3
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_INT3

◆ GPU_VERTEXELEMENTFORMAT_INT4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INT4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_INT4

◆ GPU_VERTEXELEMENTFORMAT_INVALID

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_INVALID
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_INVALID

◆ GPU_VERTEXELEMENTFORMAT_SHORT2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_SHORT2

◆ GPU_VERTEXELEMENTFORMAT_SHORT2_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT2_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_SHORT2_NORM

◆ GPU_VERTEXELEMENTFORMAT_SHORT4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_SHORT4

◆ GPU_VERTEXELEMENTFORMAT_SHORT4_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_SHORT4_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_SHORT4_NORM

◆ GPU_VERTEXELEMENTFORMAT_UBYTE2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2

◆ GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE2_NORM

◆ GPU_VERTEXELEMENTFORMAT_UBYTE4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4

◆ GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UBYTE4_NORM

◆ GPU_VERTEXELEMENTFORMAT_UINT

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UINT

◆ GPU_VERTEXELEMENTFORMAT_UINT2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UINT2

◆ GPU_VERTEXELEMENTFORMAT_UINT3

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT3
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UINT3

◆ GPU_VERTEXELEMENTFORMAT_UINT4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_UINT4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_UINT4

◆ GPU_VERTEXELEMENTFORMAT_USHORT2

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT2
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_USHORT2

◆ GPU_VERTEXELEMENTFORMAT_USHORT2_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT2_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_USHORT2_NORM

◆ GPU_VERTEXELEMENTFORMAT_USHORT4

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT4
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_USHORT4

◆ GPU_VERTEXELEMENTFORMAT_USHORT4_NORM

constexpr GPUVertexElementFormat SDL::GPU_VERTEXELEMENTFORMAT_USHORT4_NORM
constexpr
Initial value:
=
SDL_GPU_VERTEXELEMENTFORMAT_USHORT4_NORM

◆ GPU_VERTEXINPUTRATE_INSTANCE

constexpr GPUVertexInputRate SDL::GPU_VERTEXINPUTRATE_INSTANCE
constexpr
Initial value:
=
SDL_GPU_VERTEXINPUTRATE_INSTANCE

◆ GPU_VERTEXINPUTRATE_VERTEX

constexpr GPUVertexInputRate SDL::GPU_VERTEXINPUTRATE_VERTEX
constexpr
Initial value:
=
SDL_GPU_VERTEXINPUTRATE_VERTEX