Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDL3 GPU - Reuse transfer buffers #8535

Closed
wants to merge 2 commits into from

Conversation

TheMode
Copy link
Contributor

@TheMode TheMode commented Mar 31, 2025

Quickly tested on the docking branch, hopefully not breaking anything.

There is another transfer buffer de/allocation in ImGui_ImplSDLGPU3_UpdateTexture but it doesn't seem relevant for my existing app. Should perhaps be replaced as well.

Close #8534

@ocornut
Copy link
Owner

ocornut commented Mar 31, 2025

Oh wow, I literally just pushed my own code to solve this and noticed your PR afterwards.
I'll compare them now..

@TheMode
Copy link
Contributor Author

TheMode commented Mar 31, 2025

What a timing :)
Well yours seem a bit better, so here we go

@ocornut
Copy link
Owner

ocornut commented Mar 31, 2025

So, I pushed b678659 just as you pushed #8535. The only difference seems that I moved that code into the same function after the main buffer creation, which seems sensible as the values are synchronized. So it's a little less code.
Sorry that our streams crossed with such a tight timing, I didn't realize you were aiming at a PR.
Thanks again!

@ocornut ocornut closed this Mar 31, 2025
@TheMode TheMode deleted the TheMode-patch-1 branch March 31, 2025 12:50
@ocornut
Copy link
Owner

ocornut commented Mar 31, 2025

There is another transfer buffer de/allocation in ImGui_ImplSDLGPU3_UpdateTexture but it doesn't seem relevant for my existing app. Should perhaps be replaced as well.

This is particularly important to the dynamic_fonts branch expected to be 1.92 so I'll work on caching this one too. Thanks for the the head up.

@ocornut
Copy link
Owner

ocornut commented Mar 31, 2025

This is the equivalent change for dynamic_fonts branch: 9802c61

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.

SDL3 GPU transfer buffer allocations
2 participants