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: Allow almost flat rectangles to go fast #15998

Merged
merged 5 commits into from
Sep 11, 2022

Conversation

unknownbrackets
Copy link
Collaborator

Improves Chains of Olympus performance by around 12% on the title screen (from ~64% to ~72%, or so, maybe a bit better.) This allows us to skip the (slow) triangle interpolation and also avoid going over the rectangle twice for each half.

-[Unknown]

This just moves the logic to a single place for changes.
Improves transform rectangles used in Chains of Olympus, for example on
the title screen.
@unknownbrackets
Copy link
Collaborator Author

unknownbrackets commented Sep 10, 2022

With this on that screen, just for interest, the slowest parts are:

  • ~21% T&L (about evenly split between them)
  • ~9% clipping + vertex decode, etc.
  • ~4% display list processing
  • ~1% state field updates
  • ~1% debug memory tracking
  • Remaining ~64% has some threading overhead in it, but normalizing that (probably overcounting a bit due to CPU emulation, trying to capture the time spent on threads):
    • ~60% triangle (23% interp) vs ~40% rectangle (18% interp), after this change
    • ~19% linear interp for sampling
    • ~24% sampling other than linear interp
    • ~15% drawing pixels

-[Unknown]

The TL and BR have to match between UVs and pos, not enough for UV to be
in order.  This was causing an artifact on Chains of Olympus' title.
These are just corners, we don't know if they're top or not at this point.
@hrydgard hrydgard merged commit 04c0234 into hrydgard:master Sep 11, 2022
@unknownbrackets unknownbrackets deleted the softgpu-rect branch September 11, 2022 07:04
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.

2 participants