Skip to content

Conversation

@SDLWikiBot
Copy link
Collaborator

This edit was made by @LittleCodingFox.

Live page is here: https://wiki.libsdl.org/SDL3/SDL_PushGPUVertexUniformData

If this user should be blocked from further edits, an admin should go to https://wiki.libsdl.org/LittleCodingFox/block
If this user should be trusted to make direct pushes to main, without a pull request, an admin should go to https://wiki.libsdl.org/LittleCodingFox/trust

WHETHER YOU MERGE OR REJECT THIS PULL REQUEST, DON'T FORGET TO DELETE THE BRANCH. Otherwise, LittleCodingFox won't be able to start a new PR for this page.

@LittleCodingFox
Copy link

Howdy, it's my first edit, hope it's okay!

I realized that the SDL GPU uniform data is reused across subsequent drawcalls only for the current command buffer, so I thought it'd be good to clarify that in the wiki.

@slouken
Copy link
Contributor

slouken commented Dec 12, 2025

@thatcosmonaut, @TheSpydog, is this correct?

@LittleCodingFox
Copy link

LittleCodingFox commented Dec 12, 2025

From what I saw in the code, the vulkan renderer at least, clears the uniform buffer data when a command buffer is acquired

SDL_gpu_vulkan.c:9566 (VULKAN_AcquireCommandBuffer), the uniform buffers are cleared

@thatcosmonaut
Copy link
Contributor

This is correct, but the wording of "reuse" feels awkward to me. Also this should probably be applied to the other push uniform commands too.

@LittleCodingFox
Copy link

Perhaps I could change it to "Subsequent drawcalls in a command buffer will use previously submitted uniform data unless replaced"?

@thatcosmonaut
Copy link
Contributor

I think "Subsequent draw calls in this command buffer will use this uniform data." is clear enough.

@LittleCodingFox
Copy link

Gotcha, how may I correct this? I've never used a wiki that works like this, hehe

@slouken
Copy link
Contributor

slouken commented Dec 12, 2025

Just do another edit and we’ll close these. Please make sure you update all the relevant calls.

Thanks!

@LittleCodingFox
Copy link

Updated! Seems it updates the PR

@slouken
Copy link
Contributor

slouken commented Dec 12, 2025

I went ahead and added that note for all the uniform functions. Thanks!

@slouken slouken closed this Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants