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

Implement better index caching in Latte #1443

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Exzap
Copy link
Member

@Exzap Exzap commented Dec 8, 2024

What this PR does:

  • Implement a 8-entry LRU cache for indices, instead of only remembering the indices from the previous draw
  • Reworked the indexData_* renderer interface a bit and added indexData_releaseIndexMemory to let the renderer know when cached index data won't be referenced anymore
  • Implement this new interface on Vulkan. OpenGL uses a custom index cache so it's not affected

While working on this I realized that it's probably possible to share the buffer and heap allocator part of the logic between all three backends, so that the individual renderers would only have to implement buffer creation and uploads. But let that be a problem for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant