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

wgpu: Some optimisations, some refactors, much less buffers #14919

Merged
merged 18 commits into from
Jan 27, 2024

Conversation

Dinnerbone
Copy link
Contributor

This reduces the amount of buffers needed to run Heartcore from about 8k to 3k peak, which should improve performance and reduce memory usage. We also don't need a second command buffer per draw anymore. Filters, especially, should be cheaper to do now.

It also simplifies the codebase a lot since we no longer have to juggle lifetimes with our old staging belt system, and we also don't specialcase push constants since the performance should be comparable now. This opens up future improvements, especially to BMD draws (and making BMD operations on gpu viable, to avoid readbacks)

@SN902
Copy link

SN902 commented Jan 24, 2024

pony-creator-v3-generalzoi.zip
640260_freegear2.zip
Super-Mario-63.zip

thread 'main' panicked at render\wgpu\src\mesh.rs:413:10: Mesh uniform buffer was too large!: BufferFull

@Dinnerbone
Copy link
Contributor Author

Dinnerbone commented Jan 24, 2024

@SN902 web or desktop? Do they look normal to you before this PR, no rendering artifacts or crashes?

@SN902
Copy link

SN902 commented Jan 24, 2024

@SN902 web or desktop? Do they look normal to you before this PR, no rendering artifacts or crashes?

I tested your PR on the desktop build, these games works fine on the latest nightly 2024-01-24

@Dinnerbone
Copy link
Contributor Author

Try now. I think I misunderstood the max_uniform_buffer_binding_size limit.

@SN902
Copy link

SN902 commented Jan 24, 2024

Try now. I think I misunderstood the max_uniform_buffer_binding_size limit.

Fixed, now works perfectly.

@torokati44 torokati44 added A-rendering Area: Rendering & Graphics render-wgpu Issues relating to the wgpu renderer T-perf Type: Performance Improvements waiting-on-review Waiting on review from a Ruffle team member labels Jan 26, 2024
@Dinnerbone Dinnerbone enabled auto-merge (rebase) January 27, 2024 20:21
@Dinnerbone Dinnerbone merged commit fcb74d8 into ruffle-rs:master Jan 27, 2024
13 checks passed
@Lord-McSweeney Lord-McSweeney removed the waiting-on-review Waiting on review from a Ruffle team member label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rendering Area: Rendering & Graphics render-wgpu Issues relating to the wgpu renderer T-perf Type: Performance Improvements
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

5 participants