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

Don't keep around additional cpu copy of loaded mesh files #7824

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

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Oct 18, 2024

What

This is mainly a refactor of re_renderer's model loading pipeline, but as the title (== changelog entry) points out, a nice side-effect that arose culling unnecessary memory usage which may be important for large meshes.

@EtaLoop's attempt to add a color option to Asset3D (see #7458) made it clear that the output of the mesh loaders is really hard to work with:
Prior to this PR, they would eagerly create gpu-sided meshes and then store them alongside an optional (but always filled-out) "cpu mesh" (in essence the unpacked model file).

Now instead all model loading goes to a intermediate CpuModel which can be rather easily post processed.
Gpu resources are then created as a separate step, consuming the CpuModel (it should be trivial to create a variant that doesn't consume if we need this in the future)

Checklist

  • I have read and agree to Contributor Guide and the Code of Conduct
  • I've included a screenshot or gif (if applicable)
  • I have tested the web demo (if applicable):
  • The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG
  • If applicable, add a new check to the release checklist!
  • If have noted any breaking changes to the log API in CHANGELOG.md and the migration guide

To run all checks from main, comment on the PR with @rerun-bot full-check.

@Wumpf Wumpf added 🔺 re_renderer affects re_renderer itself 📉 performance Optimization, memory use, etc 🚜 refactor Change the code, not the functionality include in changelog labels Oct 18, 2024
@Wumpf Wumpf added this to the Next patch release milestone Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
include in changelog 📉 performance Optimization, memory use, etc 🔺 re_renderer affects re_renderer itself 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant