SDL_ReleaseGPUFence(3)

πŸ’… SDL_ReleaseGPUFence β€” the SDL3 functions page, bestie edition

okay so you're in the SDL3 FUNCTIONS section of the manual, and today's main character is SDL_ReleaseGPUFence(3). it's literally one function, it's tiny, and it's important. let's go 🫢


✨ NAME ✨

SDL_ReleaseGPUFence β€” releases a fence you got from SDL_SubmitGPUCommandBufferAndAcquireFence.


🌸 SYNOPSIS 🌸

#include <SDL3/SDL_gpu.h>

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

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here's the one thing you cannot forget, and i'm saying it with my whole chest:

You must not reference the fence after calling this function.

like, the fence is gone gone after this. don't touch it, don't peek at it, don't hold a lil pointer to it and think about it later. it's giving "released", not "still yours". periodt. πŸ’€


πŸŽ€ FUNCTION PARAMETERS πŸŽ€

  • device β€” a GPU context. your lil GPU hangout spot. πŸ‘‘
  • fence β€” a fence. that's it, that's the fence. 🚧

⭐ AVAILABILITY ⭐

this function is available since SDL 3.2.0. if you're on something older, no fence for you, bestie 😭


πŸ”₯ SEE ALSO πŸ”₯


and that's the whole page, no cap πŸ’–

cute lil sign-off: this whole thing comes from Simple Directmedia Layer, it's the SDL 3.4.18 version of the page, and the page is literally named SDL_ReleaseGPUFence(3). go release that fence responsibly, queen πŸŒˆπŸ‘‘

πŸ“¦ where this page comes from