perf(renderer): reuse instance and cull buffers #935
No reviewers
Labels
No labels
Context: Bug
Context: Enhancements
Platform: Android
Platform: Linux
Platform: Web
Platform: Windows
Platform: iOS
Platform: macOS
Release
Target: CI
Target: CLI
Target: Dependency
Target: Engine
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
SakulFlee/Orbital!935
Loading…
Reference in a new issue
No description provided.
Delete branch "perf/renderer-instance-reuse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Stacked on #933 (phase 1a). Removes the per-frame model rebuild and cull allocation path.
Modelnow owns its instance buffer, a CPU copy of the instance data and world-space bounds for each instance.Model::update_instances; the model is only rebuilt when the mesh/material hash changes.sys_frustum_cullconsumes the cached model data instead of re-encoding every transform and allocating per-model byte vectors.CullResourcesis persistent: buffer, per-model lists and scratch data are reused and only reallocated when capacity is exceeded.Verification
cargo fmt --all -- --checkcargo clippy -p orbital_model -p orbital_cull -p orbital_renderer -p orbital_app -- -D warningscargo test -p orbital_model -p orbital_cull -p orbital_renderer -p orbital_app --no-fail-fastRefs #781.
de4431c747758e9ee2aaSmart test results
Result: PASS
Scope: full workspace
Reason: workspace-level change: Cargo.lock
Elapsed: 5m 49s
Workflow run
Overall: 425 tests, 415 passed, 0 failed, 10 skipped
Nextest: 414 tests, 414 passed, 0 failed, 0 skipped
Doctests: 11 tests, 1 passed, 0 failed, 10 skipped
Outcome charts are split between nextest and doctests. The timing chart covers nextest only.