SDL_SubmitGP...dAcquireFence(3)
β¨ SDL_SubmitGPUCommandBufferAndAcquireFence β¨
okay bestie, welcome to the SDL3 FUNCTIONS corner of the man pages, this one's a banger π
πΈ NAME πΈ
SDL_SubmitGPUCommandBufferAndAcquireFence β she submits a command buffer so its commands can actually get processed on the GPU, and acquires a fence that's associated with that command buffer. two jobs, one function, main character energy fr fr π
π SYNOPSIS π
#include <SDL3/SDL_gpu.h>
SDL_GPUFence * SDL_SubmitGPUCommandBufferAndAcquireFence(
SDL_GPUCommandBuffer *command_buffer);
like look at her. one arg. returns a fence pointer. iconic π
π¦ DESCRIPTION π¦
okay so first things first, and this is important: you must release this fence when you don't need it anymore, or it will cause a leak. not a vibe. a leak. do not do that π
also, it is invalid to use the command buffer after this is called. like, she's gone, she's submitted, let her go ποΈ
this must be called from the thread the command buffer was acquired on. same thread, no exceptions, that's the rule π§΅
and here's the lil guarantee that makes it all make sense: all commands in the submission are guaranteed to begin executing before any command in a subsequent submission begins executing. so like, ordering? handled. sequencing? slay β¨
π FUNCTION PARAMETERS π
command_bufferβ a command buffer. that's it, that's the whole parameter, she's simple like that π«Ά
π RETURN VALUE π
returns a fence associated with the command buffer π or NULL on failure, in which case you should call SDL_GetError() for more info. always check, bestie, always check π
β AVAILABILITY β
this function is available since SDL 3.2.0. so if you're on anything older, no fence for you π
π SEE ALSO π
the whole friend group, go say hi:
SDL_AcquireGPUCommandBuffer(3)SDL_WaitAndAcquireGPUSwapchainTexture(3)SDL_AcquireGPUSwapchainTexture(3)SDL_SubmitGPUCommandBuffer(3)SDL_ReleaseGPUFence(3)
π reminder bestie: SDL_ReleaseGPUFence(3) is literally right there in the see-also. release the fence. no leaks in this household. periodt. π
and that's the page!! brought to you by Simple Directmedia Layer, version SDL 3.4.18, filed under SDL_SubmitGP...dAcquireFence(3) β mwah, go submit something gorgeous π¦β¨π
π¦ where this page comes from
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 43: SDL3-devel 3.4.18-1.fc43 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- fedora 44: SDL3-devel 3.4.18-1.fc44 Β· Zlib AND MIT AND Apache-2.0 AND (Apache-2.0 OR MIT)
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms