sdl.gpu

SDL GPU

Members

Enums

SDL_GPUBlendFactor
enum SDL_GPUBlendFactor

Specifies a blending factor to be used when pixels in a render target are blended with existing pixels in the texture.

SDL_GPUBlendOp
enum SDL_GPUBlendOp

Specifies the operator to be used when pixels in a render target are blended with existing pixels in the texture.

SDL_GPUBufferUsageFlags
enum SDL_GPUBufferUsageFlags

Specifies how a buffer is intended to be used by the client.

SDL_GPUColorComponentFlags
enum SDL_GPUColorComponentFlags

Specifies which color components are written in a graphics pipeline.

SDL_GPUCompareOp
enum SDL_GPUCompareOp

Specifies a comparison operator for depth, stencil and sampler operations.

SDL_GPUCubeMapFace
enum SDL_GPUCubeMapFace

Specifies the face of a cube map.

SDL_GPUCullMode
enum SDL_GPUCullMode

Specifies the facing direction in which triangle faces will be culled.

SDL_GPUFillMode
enum SDL_GPUFillMode

Specifies the fill mode of the graphics pipeline.

SDL_GPUFilter
enum SDL_GPUFilter

Specifies a filter operation used by a sampler.

SDL_GPUFrontFace
enum SDL_GPUFrontFace

Specifies the vertex winding that will cause a triangle to be determined to be front-facing.

SDL_GPUIndexElementSize
enum SDL_GPUIndexElementSize

Specifies the size of elements in an index buffer.

SDL_GPULoadOp
enum SDL_GPULoadOp

Specifies how the contents of a texture attached to a render pass are treated at the beginning of the render pass.

SDL_GPUPresentMode
enum SDL_GPUPresentMode

Specifies the timing that will be used to present swapchain textures to the OS.

SDL_GPUPrimitiveType
enum SDL_GPUPrimitiveType

Specifies the primitive topology of a graphics pipeline.

SDL_GPUSampleCount
enum SDL_GPUSampleCount

Specifies the sample count of a texture.

SDL_GPUSamplerAddressMode
enum SDL_GPUSamplerAddressMode

Specifies behavior of texture sampling when the coordinates exceed the 0-1 range.

SDL_GPUSamplerMipmapMode
enum SDL_GPUSamplerMipmapMode

Specifies a mipmap mode used by a sampler.

SDL_GPUShaderFormat
enum SDL_GPUShaderFormat

Specifies the format of shader code.

SDL_GPUShaderStage
enum SDL_GPUShaderStage

Specifies which stage a shader program corresponds to.

SDL_GPUStencilOp
enum SDL_GPUStencilOp

Specifies what happens to a stored stencil value if stencil tests fail or pass.

SDL_GPUStoreOp
enum SDL_GPUStoreOp

Specifies how the contents of a texture attached to a render pass are treated at the end of the render pass.

SDL_GPUSwapchainComposition
enum SDL_GPUSwapchainComposition

Specifies the texture format and colorspace of the swapchain textures.

SDL_GPUTextureFormat
enum SDL_GPUTextureFormat

Specifies the pixel format of a texture.

SDL_GPUTextureType
enum SDL_GPUTextureType

Specifies the type of a texture.

SDL_GPUTextureUsageFlags
enum SDL_GPUTextureUsageFlags
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_GPUTransferBufferUsage
enum SDL_GPUTransferBufferUsage

Specifies how a transfer buffer is intended to be used by the client.

SDL_GPUVertexElementFormat
enum SDL_GPUVertexElementFormat

Specifies the format of a vertex attribute.

SDL_GPUVertexInputRate
enum SDL_GPUVertexInputRate

Specifies the rate at which vertex attributes are pulled from buffers.

Functions

SDL_AcquireGPUCommandBuffer
SDL_GPUCommandBuffer* SDL_AcquireGPUCommandBuffer(SDL_GPUDevice* device)

Acquire a command buffer.

SDL_AcquireGPUSwapchainTexture
bool SDL_AcquireGPUSwapchainTexture(SDL_GPUCommandBuffer* command_buffer, SDL_Window* window, SDL_GPUTexture** swapchain_texture, Uint32* swapchain_texture_width, Uint32* swapchain_texture_height)

Acquire a texture to use in presentation.

SDL_BeginGPUComputePass
SDL_GPUComputePass* SDL_BeginGPUComputePass(SDL_GPUCommandBuffer* command_buffer, const(SDL_GPUStorageTextureReadWriteBinding)* storage_texture_bindings, Uint32 num_storage_texture_bindings, const(SDL_GPUStorageBufferReadWriteBinding)* storage_buffer_bindings, Uint32 num_storage_buffer_bindings)

Begins a compute pass on a command buffer.

SDL_BeginGPUCopyPass
SDL_GPUCopyPass* SDL_BeginGPUCopyPass(SDL_GPUCommandBuffer* command_buffer)

Begins a copy pass on a command buffer.

SDL_BeginGPURenderPass
SDL_GPURenderPass* SDL_BeginGPURenderPass(SDL_GPUCommandBuffer* command_buffer, const(SDL_GPUColorTargetInfo)* color_target_infos, Uint32 num_color_targets, const(SDL_GPUDepthStencilTargetInfo)* depth_stencil_target_info)

Begins a render pass on a command buffer.

SDL_BindGPUComputePipeline
void SDL_BindGPUComputePipeline(SDL_GPUComputePass* compute_pass, SDL_GPUComputePipeline* compute_pipeline)

Binds a compute pipeline on a command buffer for use in compute dispatch.

SDL_BindGPUComputeSamplers
void SDL_BindGPUComputeSamplers(SDL_GPUComputePass* compute_pass, Uint32 first_slot, const(SDL_GPUTextureSamplerBinding)* texture_sampler_bindings, Uint32 num_bindings)

Binds texture-sampler pairs for use on the compute shader.

SDL_BindGPUComputeStorageBuffers
void SDL_BindGPUComputeStorageBuffers(SDL_GPUComputePass* compute_pass, Uint32 first_slot, const(SDL_GPUBuffer*)* storage_buffers, Uint32 num_bindings)

Binds storage buffers as readonly for use on the compute pipeline.

SDL_BindGPUComputeStorageTextures
void SDL_BindGPUComputeStorageTextures(SDL_GPUComputePass* compute_pass, Uint32 first_slot, const(SDL_GPUTexture*)* storage_textures, Uint32 num_bindings)

Binds storage textures as readonly for use on the compute pipeline.

SDL_BindGPUFragmentSamplers
void SDL_BindGPUFragmentSamplers(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUTextureSamplerBinding)* texture_sampler_bindings, Uint32 num_bindings)

Binds texture-sampler pairs for use on the fragment shader.

SDL_BindGPUFragmentStorageBuffers
void SDL_BindGPUFragmentStorageBuffers(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUBuffer*)* storage_buffers, Uint32 num_bindings)

Binds storage buffers for use on the fragment shader.

SDL_BindGPUFragmentStorageTextures
void SDL_BindGPUFragmentStorageTextures(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUTexture*)* storage_textures, Uint32 num_bindings)

Binds storage textures for use on the fragment shader.

SDL_BindGPUGraphicsPipeline
void SDL_BindGPUGraphicsPipeline(SDL_GPURenderPass* render_pass, SDL_GPUGraphicsPipeline* graphics_pipeline)

Binds a graphics pipeline on a render pass to be used in rendering.

SDL_BindGPUIndexBuffer
void SDL_BindGPUIndexBuffer(SDL_GPURenderPass* render_pass, const(SDL_GPUBufferBinding)* binding, SDL_GPUIndexElementSize index_element_size)

Binds an index buffer on a command buffer for use with subsequent draw calls.

SDL_BindGPUVertexBuffers
void SDL_BindGPUVertexBuffers(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUBufferBinding)* bindings, Uint32 num_bindings)

Binds vertex buffers on a command buffer for use with subsequent draw calls.

SDL_BindGPUVertexSamplers
void SDL_BindGPUVertexSamplers(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUTextureSamplerBinding)* texture_sampler_bindings, Uint32 num_bindings)

Binds texture-sampler pairs for use on the vertex shader.

SDL_BindGPUVertexStorageBuffers
void SDL_BindGPUVertexStorageBuffers(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUBuffer*)* storage_buffers, Uint32 num_bindings)

Binds storage buffers for use on the vertex shader.

SDL_BindGPUVertexStorageTextures
void SDL_BindGPUVertexStorageTextures(SDL_GPURenderPass* render_pass, Uint32 first_slot, const(SDL_GPUTexture*)* storage_textures, Uint32 num_bindings)

Binds storage textures for use on the vertex shader.

SDL_BlitGPUTexture
void SDL_BlitGPUTexture(SDL_GPUCommandBuffer* command_buffer, const(SDL_GPUBlitInfo)* info)

Blits from a source texture region to a destination texture region.

SDL_CalculateGPUTextureFormatSize
Uint32 SDL_CalculateGPUTextureFormatSize(SDL_GPUTextureFormat format, Uint32 width, Uint32 height, Uint32 depth_or_layer_count)

Calculate the size in bytes of a texture format with dimensions.

SDL_CancelGPUCommandBuffer
bool SDL_CancelGPUCommandBuffer(SDL_GPUCommandBuffer* command_buffer)

Cancels a command buffer.

SDL_ClaimWindowForGPUDevice
bool SDL_ClaimWindowForGPUDevice(SDL_GPUDevice* device, SDL_Window* window)

Claims a window, creating a swapchain structure for it.

SDL_CopyGPUBufferToBuffer
void SDL_CopyGPUBufferToBuffer(SDL_GPUCopyPass* copy_pass, const(SDL_GPUBufferLocation)* source, const(SDL_GPUBufferLocation)* destination, Uint32 size, bool cycle)

Performs a buffer-to-buffer copy.

SDL_CopyGPUTextureToTexture
void SDL_CopyGPUTextureToTexture(SDL_GPUCopyPass* copy_pass, const(SDL_GPUTextureLocation)* source, const(SDL_GPUTextureLocation)* destination, Uint32 w, Uint32 h, Uint32 d, bool cycle)

Performs a texture-to-texture copy.

SDL_CreateGPUBuffer
SDL_GPUBuffer* SDL_CreateGPUBuffer(SDL_GPUDevice* device, const(SDL_GPUBufferCreateInfo)* createinfo)

Creates a buffer object to be used in graphics or compute workflows.

SDL_CreateGPUComputePipeline
SDL_GPUComputePipeline* SDL_CreateGPUComputePipeline(SDL_GPUDevice* device, const(SDL_GPUComputePipelineCreateInfo)* createinfo)

Creates a pipeline object to be used in a compute workflow.

SDL_CreateGPUDevice
SDL_GPUDevice* SDL_CreateGPUDevice(SDL_GPUShaderFormat format_flags, bool debug_mode, const(char)* name)

Creates a GPU context.

SDL_CreateGPUDeviceWithProperties
SDL_GPUDevice* SDL_CreateGPUDeviceWithProperties(SDL_PropertiesID props)

Creates a GPU context.

SDL_CreateGPUGraphicsPipeline
SDL_GPUGraphicsPipeline* SDL_CreateGPUGraphicsPipeline(SDL_GPUDevice* device, const(SDL_GPUGraphicsPipelineCreateInfo)* createinfo)

Creates a pipeline object to be used in a graphics workflow.

SDL_CreateGPUSampler
SDL_GPUSampler* SDL_CreateGPUSampler(SDL_GPUDevice* device, const(SDL_GPUSamplerCreateInfo)* createinfo)

Creates a sampler object to be used when binding textures in a graphics workflow.

SDL_CreateGPUShader
SDL_GPUShader* SDL_CreateGPUShader(SDL_GPUDevice* device, const(SDL_GPUShaderCreateInfo)* createinfo)

Creates a shader to be used when creating a graphics pipeline.

SDL_CreateGPUTexture
SDL_GPUTexture* SDL_CreateGPUTexture(SDL_GPUDevice* device, const(SDL_GPUTextureCreateInfo)* createinfo)

Creates a texture object to be used in graphics or compute workflows.

SDL_CreateGPUTransferBuffer
SDL_GPUTransferBuffer* SDL_CreateGPUTransferBuffer(SDL_GPUDevice* device, const(SDL_GPUTransferBufferCreateInfo)* createinfo)

Creates a transfer buffer to be used when uploading to or downloading from graphics resources.

SDL_DestroyGPUDevice
void SDL_DestroyGPUDevice(SDL_GPUDevice* device)

Destroys a GPU context previously returned by SDL_CreateGPUDevice.

SDL_DispatchGPUCompute
void SDL_DispatchGPUCompute(SDL_GPUComputePass* compute_pass, Uint32 groupcount_x, Uint32 groupcount_y, Uint32 groupcount_z)

Dispatches compute work.

SDL_DispatchGPUComputeIndirect
void SDL_DispatchGPUComputeIndirect(SDL_GPUComputePass* compute_pass, SDL_GPUBuffer* buffer, Uint32 offset)

Dispatches compute work with parameters set from a buffer.

SDL_DownloadFromGPUBuffer
void SDL_DownloadFromGPUBuffer(SDL_GPUCopyPass* copy_pass, const(SDL_GPUBufferRegion)* source, const(SDL_GPUTransferBufferLocation)* destination)

Copies data from a buffer to a transfer buffer on the GPU timeline.

SDL_DownloadFromGPUTexture
void SDL_DownloadFromGPUTexture(SDL_GPUCopyPass* copy_pass, const(SDL_GPUTextureRegion)* source, const(SDL_GPUTextureTransferInfo)* destination)

Copies data from a texture to a transfer buffer on the GPU timeline.

SDL_DrawGPUIndexedPrimitives
void SDL_DrawGPUIndexedPrimitives(SDL_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.

SDL_DrawGPUIndexedPrimitivesIndirect
void SDL_DrawGPUIndexedPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_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.

SDL_DrawGPUPrimitives
void SDL_DrawGPUPrimitives(SDL_GPURenderPass* render_pass, Uint32 num_vertices, Uint32 num_instances, Uint32 first_vertex, Uint32 first_instance)

Draws data using bound graphics state.

SDL_DrawGPUPrimitivesIndirect
void SDL_DrawGPUPrimitivesIndirect(SDL_GPURenderPass* render_pass, SDL_GPUBuffer* buffer, Uint32 offset, Uint32 draw_count)

Draws data using bound graphics state and with draw parameters set from a buffer.

SDL_EndGPUComputePass
void SDL_EndGPUComputePass(SDL_GPUComputePass* compute_pass)

Ends the current compute pass.

SDL_EndGPUCopyPass
void SDL_EndGPUCopyPass(SDL_GPUCopyPass* copy_pass)

Ends the current copy pass.

SDL_EndGPURenderPass
void SDL_EndGPURenderPass(SDL_GPURenderPass* render_pass)

Ends the given render pass.

SDL_GDKResumeGPU
void SDL_GDKResumeGPU(SDL_GPUDevice* device)

Call this to resume GPU operation on Xbox when you receive the SDL_EVENT_WILL_ENTER_FOREGROUND event.

SDL_GDKSuspendGPU
void SDL_GDKSuspendGPU(SDL_GPUDevice* device)

Call this to suspend GPU operation on Xbox when you receive the SDL_EVENT_DID_ENTER_BACKGROUND event.

SDL_GPUSupportsProperties
bool SDL_GPUSupportsProperties(SDL_PropertiesID props)

Checks for GPU runtime support.

SDL_GPUSupportsShaderFormats
bool SDL_GPUSupportsShaderFormats(SDL_GPUShaderFormat format_flags, const(char)* name)

Checks for GPU runtime support.

SDL_GPUTextureFormatTexelBlockSize
Uint32 SDL_GPUTextureFormatTexelBlockSize(SDL_GPUTextureFormat format)

Obtains the texel block size for a texture format.

SDL_GPUTextureSupportsFormat
bool SDL_GPUTextureSupportsFormat(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUTextureType type, SDL_GPUTextureUsageFlags usage)

Determines whether a texture format is supported for a given type and usage.

SDL_GPUTextureSupportsSampleCount
bool SDL_GPUTextureSupportsSampleCount(SDL_GPUDevice* device, SDL_GPUTextureFormat format, SDL_GPUSampleCount sample_count)

Determines if a sample count for a texture format is supported.

SDL_GenerateMipmapsForGPUTexture
void SDL_GenerateMipmapsForGPUTexture(SDL_GPUCommandBuffer* command_buffer, SDL_GPUTexture* texture)

Generates mipmaps for the given texture.

SDL_GetGPUDeviceDriver
const(char)* SDL_GetGPUDeviceDriver(SDL_GPUDevice* device)

Returns the name of the backend used to create this GPU context.

SDL_GetGPUDriver
const(char)* SDL_GetGPUDriver(int index)

Get the name of a built in GPU driver.

SDL_GetGPUShaderFormats
SDL_GPUShaderFormat SDL_GetGPUShaderFormats(SDL_GPUDevice* device)

Returns the supported shader formats for this GPU context.

SDL_GetGPUSwapchainTextureFormat
SDL_GPUTextureFormat SDL_GetGPUSwapchainTextureFormat(SDL_GPUDevice* device, SDL_Window* window)

Obtains the texture format of the swapchain for the given window.

SDL_GetNumGPUDrivers
int SDL_GetNumGPUDrivers()

Get the number of GPU drivers compiled into SDL.

SDL_InsertGPUDebugLabel
void SDL_InsertGPUDebugLabel(SDL_GPUCommandBuffer* command_buffer, const(char)* text)

Inserts an arbitrary string label into the command buffer callstream.

SDL_MapGPUTransferBuffer
void* SDL_MapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer, bool cycle)

Maps a transfer buffer into application address space.

SDL_PopGPUDebugGroup
void SDL_PopGPUDebugGroup(SDL_GPUCommandBuffer* command_buffer)

Ends the most-recently pushed debug group.

SDL_PushGPUComputeUniformData
void SDL_PushGPUComputeUniformData(SDL_GPUCommandBuffer* command_buffer, Uint32 slot_index, const(void)* data, Uint32 length)

Pushes data to a uniform slot on the command buffer.

SDL_PushGPUDebugGroup
void SDL_PushGPUDebugGroup(SDL_GPUCommandBuffer* command_buffer, const(char)* name)

Begins a debug group with an arbitary name.

SDL_PushGPUFragmentUniformData
void SDL_PushGPUFragmentUniformData(SDL_GPUCommandBuffer* command_buffer, Uint32 slot_index, const(void)* data, Uint32 length)

Pushes data to a fragment uniform slot on the command buffer.

SDL_PushGPUVertexUniformData
void SDL_PushGPUVertexUniformData(SDL_GPUCommandBuffer* command_buffer, Uint32 slot_index, const(void)* data, Uint32 length)

Pushes data to a vertex uniform slot on the command buffer.

SDL_QueryGPUFence
bool SDL_QueryGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence)

Checks the status of a fence.

SDL_ReleaseGPUBuffer
void SDL_ReleaseGPUBuffer(SDL_GPUDevice* device, SDL_GPUBuffer* buffer)

Frees the given buffer as soon as it is safe to do so.

SDL_ReleaseGPUComputePipeline
void SDL_ReleaseGPUComputePipeline(SDL_GPUDevice* device, SDL_GPUComputePipeline* compute_pipeline)

Frees the given compute pipeline as soon as it is safe to do so.

SDL_ReleaseGPUFence
void SDL_ReleaseGPUFence(SDL_GPUDevice* device, SDL_GPUFence* fence)

Releases a fence obtained from SDL_SubmitGPUCommandBufferAndAcquireFence.

SDL_ReleaseGPUGraphicsPipeline
void SDL_ReleaseGPUGraphicsPipeline(SDL_GPUDevice* device, SDL_GPUGraphicsPipeline* graphics_pipeline)

Frees the given graphics pipeline as soon as it is safe to do so.

SDL_ReleaseGPUSampler
void SDL_ReleaseGPUSampler(SDL_GPUDevice* device, SDL_GPUSampler* sampler)

Frees the given sampler as soon as it is safe to do so.

SDL_ReleaseGPUShader
void SDL_ReleaseGPUShader(SDL_GPUDevice* device, SDL_GPUShader* shader)

Frees the given shader as soon as it is safe to do so.

SDL_ReleaseGPUTexture
void SDL_ReleaseGPUTexture(SDL_GPUDevice* device, SDL_GPUTexture* texture)

Frees the given texture as soon as it is safe to do so.

SDL_ReleaseGPUTransferBuffer
void SDL_ReleaseGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer)

Frees the given transfer buffer as soon as it is safe to do so.

SDL_ReleaseWindowFromGPUDevice
void SDL_ReleaseWindowFromGPUDevice(SDL_GPUDevice* device, SDL_Window* window)

Unclaims a window, destroying its swapchain structure.

SDL_SetGPUAllowedFramesInFlight
bool SDL_SetGPUAllowedFramesInFlight(SDL_GPUDevice* device, Uint32 allowed_frames_in_flight)

Configures the maximum allowed number of frames in flight.

SDL_SetGPUBlendConstants
void SDL_SetGPUBlendConstants(SDL_GPURenderPass* render_pass, SDL_FColor blend_constants)

Sets the current blend constants on a command buffer.

SDL_SetGPUBufferName
void SDL_SetGPUBufferName(SDL_GPUDevice* device, SDL_GPUBuffer* buffer, const(char)* text)

Sets an arbitrary string constant to label a buffer.

SDL_SetGPUScissor
void SDL_SetGPUScissor(SDL_GPURenderPass* render_pass, const(SDL_Rect)* scissor)

Sets the current scissor state on a command buffer.

SDL_SetGPUStencilReference
void SDL_SetGPUStencilReference(SDL_GPURenderPass* render_pass, Uint8 reference)

Sets the current stencil reference value on a command buffer.

SDL_SetGPUSwapchainParameters
bool SDL_SetGPUSwapchainParameters(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition, SDL_GPUPresentMode present_mode)

Changes the swapchain parameters for the given claimed window.

SDL_SetGPUTextureName
void SDL_SetGPUTextureName(SDL_GPUDevice* device, SDL_GPUTexture* texture, const(char)* text)

Sets an arbitrary string constant to label a texture.

SDL_SetGPUViewport
void SDL_SetGPUViewport(SDL_GPURenderPass* render_pass, const(SDL_GPUViewport)* viewport)

Sets the current viewport state on a command buffer.

SDL_SubmitGPUCommandBuffer
bool SDL_SubmitGPUCommandBuffer(SDL_GPUCommandBuffer* command_buffer)

Submits a command buffer so its commands can be processed on the GPU.

SDL_SubmitGPUCommandBufferAndAcquireFence
SDL_GPUFence* SDL_SubmitGPUCommandBufferAndAcquireFence(SDL_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.

SDL_UnmapGPUTransferBuffer
void SDL_UnmapGPUTransferBuffer(SDL_GPUDevice* device, SDL_GPUTransferBuffer* transfer_buffer)

Unmaps a previously mapped transfer buffer.

SDL_UploadToGPUBuffer
void SDL_UploadToGPUBuffer(SDL_GPUCopyPass* copy_pass, const(SDL_GPUTransferBufferLocation)* source, const(SDL_GPUBufferRegion)* destination, bool cycle)

Uploads data from a transfer buffer to a buffer.

SDL_UploadToGPUTexture
void SDL_UploadToGPUTexture(SDL_GPUCopyPass* copy_pass, const(SDL_GPUTextureTransferInfo)* source, const(SDL_GPUTextureRegion)* destination, bool cycle)

Uploads data from a transfer buffer to a texture.

SDL_WaitAndAcquireGPUSwapchainTexture
bool SDL_WaitAndAcquireGPUSwapchainTexture(SDL_GPUCommandBuffer* command_buffer, SDL_Window* window, SDL_GPUTexture** swapchain_texture, Uint32* swapchain_texture_width, Uint32* swapchain_texture_height)

Blocks the thread until a swapchain texture is available to be acquired, and then acquires it.

SDL_WaitForGPUFences
bool SDL_WaitForGPUFences(SDL_GPUDevice* device, bool wait_all, const(SDL_GPUFence*)* fences, Uint32 num_fences)

Blocks the thread until the given fences are signaled.

SDL_WaitForGPUIdle
bool SDL_WaitForGPUIdle(SDL_GPUDevice* device)

Blocks the thread until the GPU is completely idle.

SDL_WaitForGPUSwapchain
bool SDL_WaitForGPUSwapchain(SDL_GPUDevice* device, SDL_Window* window)

Blocks the thread until a swapchain texture is available to be acquired.

SDL_WindowSupportsGPUPresentMode
bool SDL_WindowSupportsGPUPresentMode(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUPresentMode present_mode)

Determines whether a presentation mode is supported by the window.

SDL_WindowSupportsGPUSwapchainComposition
bool SDL_WindowSupportsGPUSwapchainComposition(SDL_GPUDevice* device, SDL_Window* window, SDL_GPUSwapchainComposition swapchain_composition)

Determines whether a swapchain composition is supported by the window.

Manifest constants

SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING
enum SDL_PROP_GPU_BUFFER_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING
enum SDL_PROP_GPU_COMPUTEPIPELINE_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING
enum SDL_PROP_GPU_DEVICE_CREATE_D3D12_SEMANTIC_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_DEBUGMODE_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING
enum SDL_PROP_GPU_DEVICE_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_PREFERLOWPOWER_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXBC_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_SHADERS_DXIL_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_SHADERS_METALLIB_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_SHADERS_MSL_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_SHADERS_PRIVATE_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN
enum SDL_PROP_GPU_DEVICE_CREATE_SHADERS_SPIRV_BOOLEAN;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING
enum SDL_PROP_GPU_GRAPHICSPIPELINE_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING
enum SDL_PROP_GPU_SAMPLER_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_SHADER_CREATE_NAME_STRING
enum SDL_PROP_GPU_SHADER_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT
enum SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_A_FLOAT;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT
enum SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_B_FLOAT;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT
enum SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_DEPTH_FLOAT;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT
enum SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_G_FLOAT;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT
enum SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_R_FLOAT;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8
enum SDL_PROP_GPU_TEXTURE_CREATE_D3D12_CLEAR_STENCIL_UINT8;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING
enum SDL_PROP_GPU_TEXTURE_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.
SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING
enum SDL_PROP_GPU_TRANSFERBUFFER_CREATE_NAME_STRING;
Undocumented in source but is binding to C. You might be able to learn more by searching the web for its name.

Structs

SDL_GPUBlitInfo
struct SDL_GPUBlitInfo

A structure containing parameters for a blit command.

SDL_GPUBlitRegion
struct SDL_GPUBlitRegion

A structure specifying a region of a texture used in the blit operation.

SDL_GPUBuffer
struct SDL_GPUBuffer

An opaque handle representing a buffer.

SDL_GPUBufferBinding
struct SDL_GPUBufferBinding

A structure specifying parameters in a buffer binding call.

SDL_GPUBufferCreateInfo
struct SDL_GPUBufferCreateInfo

A structure specifying the parameters of a buffer.

SDL_GPUBufferLocation
struct SDL_GPUBufferLocation

A structure specifying a location in a buffer.

SDL_GPUBufferRegion
struct SDL_GPUBufferRegion

A structure specifying a region of a buffer.

SDL_GPUColorTargetBlendState
struct SDL_GPUColorTargetBlendState

A structure specifying the blend state of a color target.

SDL_GPUColorTargetDescription
struct SDL_GPUColorTargetDescription

A structure specifying the parameters of color targets used in a graphics pipeline.

SDL_GPUColorTargetInfo
struct SDL_GPUColorTargetInfo

A structure specifying the parameters of a color target used by a render pass.

SDL_GPUCommandBuffer
struct SDL_GPUCommandBuffer

An opaque handle representing a command buffer.

SDL_GPUComputePass
struct SDL_GPUComputePass

An opaque handle representing a compute pass.

SDL_GPUComputePipeline
struct SDL_GPUComputePipeline

An opaque handle representing a compute pipeline.

SDL_GPUComputePipelineCreateInfo
struct SDL_GPUComputePipelineCreateInfo

A structure specifying the parameters of a compute pipeline state.

SDL_GPUCopyPass
struct SDL_GPUCopyPass

An opaque handle representing a copy pass.

SDL_GPUDepthStencilState
struct SDL_GPUDepthStencilState

A structure specifying the parameters of the graphics pipeline depth stencil state.

SDL_GPUDepthStencilTargetInfo
struct SDL_GPUDepthStencilTargetInfo

A structure specifying the parameters of a depth-stencil target used by a render pass.

SDL_GPUDevice
struct SDL_GPUDevice

An opaque handle representing the SDL_GPU context.

SDL_GPUFence
struct SDL_GPUFence

An opaque handle representing a fence.

SDL_GPUGraphicsPipeline
struct SDL_GPUGraphicsPipeline

An opaque handle representing a graphics pipeline.

SDL_GPUGraphicsPipelineCreateInfo
struct SDL_GPUGraphicsPipelineCreateInfo

A structure specifying the parameters of a graphics pipeline state.

SDL_GPUGraphicsPipelineTargetInfo
struct SDL_GPUGraphicsPipelineTargetInfo

A structure specifying the descriptions of render targets used in a graphics pipeline.

SDL_GPUIndexedIndirectDrawCommand
struct SDL_GPUIndexedIndirectDrawCommand

A structure specifying the parameters of an indexed indirect draw command.

SDL_GPUIndirectDispatchCommand
struct SDL_GPUIndirectDispatchCommand

A structure specifying the parameters of an indexed dispatch command.

SDL_GPUIndirectDrawCommand
struct SDL_GPUIndirectDrawCommand

A structure specifying the parameters of an indirect draw command.

SDL_GPUMultisampleState
struct SDL_GPUMultisampleState

A structure specifying the parameters of the graphics pipeline multisample state.

SDL_GPURasterizerState
struct SDL_GPURasterizerState

A structure specifying the parameters of the graphics pipeline rasterizer state.

SDL_GPURenderPass
struct SDL_GPURenderPass

An opaque handle representing a render pass.

SDL_GPUSampler
struct SDL_GPUSampler

An opaque handle representing a sampler.

SDL_GPUSamplerCreateInfo
struct SDL_GPUSamplerCreateInfo

A structure specifying the parameters of a sampler.

SDL_GPUShader
struct SDL_GPUShader

An opaque handle representing a compiled shader object.

SDL_GPUShaderCreateInfo
struct SDL_GPUShaderCreateInfo

A structure specifying code and metadata for creating a shader object.

SDL_GPUStencilOpState
struct SDL_GPUStencilOpState

A structure specifying the stencil operation state of a graphics pipeline.

SDL_GPUStorageBufferReadWriteBinding
struct SDL_GPUStorageBufferReadWriteBinding

A structure specifying parameters related to binding buffers in a compute pass.

SDL_GPUStorageTextureReadWriteBinding
struct SDL_GPUStorageTextureReadWriteBinding

A structure specifying parameters related to binding textures in a compute pass.

SDL_GPUTexture
struct SDL_GPUTexture

An opaque handle representing a texture.

SDL_GPUTextureCreateInfo
struct SDL_GPUTextureCreateInfo

A structure specifying the parameters of a texture.

SDL_GPUTextureLocation
struct SDL_GPUTextureLocation

A structure specifying a location in a texture.

SDL_GPUTextureRegion
struct SDL_GPUTextureRegion

A structure specifying a region of a texture.

SDL_GPUTextureSamplerBinding
struct SDL_GPUTextureSamplerBinding

A structure specifying parameters in a sampler binding call.

SDL_GPUTextureTransferInfo
struct SDL_GPUTextureTransferInfo

A structure specifying parameters related to transferring data to or from a texture.

SDL_GPUTransferBuffer
struct SDL_GPUTransferBuffer

An opaque handle representing a transfer buffer.

SDL_GPUTransferBufferCreateInfo
struct SDL_GPUTransferBufferCreateInfo

A structure specifying the parameters of a transfer buffer.

SDL_GPUTransferBufferLocation
struct SDL_GPUTransferBufferLocation

A structure specifying a location in a transfer buffer.

SDL_GPUVertexAttribute
struct SDL_GPUVertexAttribute

A structure specifying a vertex attribute.

SDL_GPUVertexBufferDescription
struct SDL_GPUVertexBufferDescription

A structure specifying the parameters of vertex buffers used in a graphics pipeline.

SDL_GPUVertexInputState
struct SDL_GPUVertexInputState

A structure specifying the parameters of a graphics pipeline vertex input state.

SDL_GPUViewport
struct SDL_GPUViewport

A structure specifying a viewport.

See Also

Meta

License

Subject to the terms of the Zlib License, as written in the LICENSE file.

Authors

Luna Nielsen