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

Add bindgroup cache in wgpu #130

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Uriopass
Copy link
Contributor

@Uriopass Uriopass commented Dec 20, 2023

avoid recreating them every frame

closes #97

@LPGhatguy
Copy link
Member

I've been meaning to test this PR properly since it's more involved than the widgets you've PR'd. I'll let you know as soon as I can and I'll have a good review for you!

avoid recreating them every frame
@Uriopass
Copy link
Contributor Author

Uriopass commented Feb 7, 2024

Updated to main and clear the cache every frame to avoid dealing with invalidation (shouldn't be that hard though).
Still huge wins: On my (now quite big) yakui scene with a bunch of text and textures tracy says update_buffers goes from 0.5ms to 0.1ms

Yakui's overhead is still 0.8ms (down from 1.2ms)
image

I wonder if the previous frame's paint data could be reused somehow but that's a whole new thing.

There's probably a bit of overhead from tracy/profiling too since every paint call is tracked

@Uriopass
Copy link
Contributor Author

Uriopass commented Feb 7, 2024

Also of interest: 95% of the wins come from the default texture and the glyph cache texture bindgroups.

I tried caching just them for a simpler solution (and easier to review). However the glyph cache is handled in yakui-widgets and therefore is not easily accessible from yakui-wgpu.

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.

Deduplicate BindGroups in wgpu renderer
2 participants