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

DrawEngine: Avoid decoding indices when we don't need them. #18586

Merged
merged 1 commit into from
Dec 20, 2023

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Dec 20, 2023

I did this optimization a while ago before previous optimizations, and didn't see a difference back then. Now, though, this actually does seem to make a minor difference in some games, and I also think it makes the code cleaner. So let's get it in.

Basically we track some state when collecting the draws into bunches, instead of at actual draw time, so we know earlier whether we need to generate indices or not, allowing us to skip it in some cases.

@hrydgard hrydgard added the Code Cleanup Cleanup to make future work easier. Needs to be done sometimes. label Dec 20, 2023
@hrydgard hrydgard added this to the v1.17.0 milestone Dec 20, 2023
@hrydgard hrydgard merged commit a9553f4 into master Dec 20, 2023
18 checks passed
@hrydgard hrydgard deleted the indexgen-opt branch December 20, 2023 14:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Cleanup Cleanup to make future work easier. Needs to be done sometimes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant