-
-
Notifications
You must be signed in to change notification settings - Fork 55
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
Optimize graphx clipping logic #513
Draft
calc84maniac
wants to merge
2
commits into
master
Choose a base branch
from
graphx-clipping-opts
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
calc84maniac
changed the title
Optimize graphx sprite clipping logic
Optimize graphx clipping logic
Nov 18, 2024
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
had a problem deploying
to
Autotester
November 18, 2024 08:34 — with
GitHub Actions
Failure
calc84maniac
force-pushed
the
graphx-clipping-opts
branch
from
November 18, 2024 08:42
4fc0a0a
to
76786de
Compare
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:42 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:42 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:42 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:42 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:43 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:43 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:43 — with
GitHub Actions
Inactive
calc84maniac
temporarily deployed
to
Autotester
November 18, 2024 08:43 — with
GitHub Actions
Inactive
While updating all clipped routines to use SMC, I found and fixed two bugs in flood fill clipping, the first being that X clipping on the left was always treated as 0, and the second being that X clipping on the right was off by one (treating the upper bound as inclusive instead of exclusive). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Reworks sprite clipping to use range-based (unsigned) comparisons instead of signed comparisons, and also moves shared pointer calculation logic into the clipping routine. Additionally, logic is added to gfx_SetClipRegion to apply SMC to all clipping routines. This saves
178215 bytes overall, and I measured the following changes in cycle counts for gfx_Sprite (up until the gfx_Wait for drawn sprites, or through the return for culled sprites):fully onscreen: 1177 ->
716644clipped top: 1450 ->
860772clipped left: 1488 ->
864780clipped right: 1254 ->
756684clipped bottom: 1202 ->
744672clipped top left: 1761 ->
1008908clipped top right: 1527 ->
900812clipped bottom left: 1513 ->
892808clipped bottom right: 1279 ->
784712clipped left+right: 1565 ->
863779clipped top+bottom: 1475 ->
859767clipped top+left+right+bottom: 1863 ->
1006902culled top: 471 ->
370334culled left: 803 ->
540468culled right: 776 ->
540468culled bottom: 474 ->
370334I'll probably take a look at gfx_RLETSprite later and add it to this PR if I can improve it.