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

softgpu: Avoid waiting for a thread to drain #16102

Merged
merged 2 commits into from
Sep 25, 2022

Conversation

unknownbrackets
Copy link
Collaborator

Sometimes we have so many triangles, it fills up our queue and we have to stall to wait for the thread to have space, which is slow. It doesn't happen that often, but it happens in some heavier games.

This increases the queue size (there's a limit; too large and it just gets slower), and also tries to avoid complete drains from the main queue onto the threads. This seems to avoid the syncs sometimes and increases some cases by a couple percent.

There's probably better heuristics here. It's tricky though, everything I change in binning has significant and hard to predict effects. I think ideal tuning of it is one of the areas that could lead to the most gain in performance left (much more than this change), though.

-[Unknown]

We made them smaller, so we can queue more of them in the same space.
Helps a little bit.
If we can, we want to keep the thread queues healthy, but not full.
Reduce the amount we push on a typical drain to avoid the Wait().
@unknownbrackets unknownbrackets added this to the v1.14.0 milestone Sep 25, 2022
@hrydgard hrydgard merged commit a26a353 into hrydgard:master Sep 25, 2022
@unknownbrackets unknownbrackets deleted the softgpu-bin-tweaks branch September 25, 2022 15:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants