-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More robust handling of maximum texture size for non-color data, slig…
…ht perf improvements for large point clouds (#5229) ### What * Part of #1398 * Follow-up to #5207 Point cloud builder uses now `DataTextureSource` for all its data. `DataTextureSource` is now better at dealing with the max texture size: data writes are clamped ahead of time, meaning we no longer reserve memory for data that we can't write into the texture upon `DataTexturesSource::finish`. This bubbled up now since `PointCloudBuilder` so far used a vec for positions and checked that against the maximum. The changes here leave the check in place, but make `DataTextureSource` reserving & writing clamp to the maximum and deal with this robustly even if high level data structures (like `PointCloudBuilder`) fail to handle this. Artificially limiting the data texture size to 256 * 256 looks like this: <img width="1751" alt="image" src="https://github.com/rerun-io/rerun/assets/1220815/ff65944c-b499-4772-8993-9619daf8d6b0"> I tested performance before/after on these changes on two opf scenes on my mac to check for changes in perf and found the switch to using `DataTextureSource` for position/radius improved performance slightly: * olympic (1.5mio points): ~7.0ms -> ~6.8ms * rainwater (4.6mio points): ~17.1ms-> ~16.5ms (numbers via performance metrics, release build) ### Checklist * [x] I have read and agree to [Contributor Guide](https://github.com/rerun-io/rerun/blob/main/CONTRIBUTING.md) and the [Code of Conduct](https://github.com/rerun-io/rerun/blob/main/CODE_OF_CONDUCT.md) * [x] I've included a screenshot or gif (if applicable) * [x] I have tested the web demo (if applicable): * Using newly built examples: [app.rerun.io](https://app.rerun.io/pr/5229/index.html) * Using examples from latest `main` build: [app.rerun.io](https://app.rerun.io/pr/5229/index.html?manifest_url=https://app.rerun.io/version/main/examples_manifest.json) * Using full set of examples from `nightly` build: [app.rerun.io](https://app.rerun.io/pr/5229/index.html?manifest_url=https://app.rerun.io/version/nightly/examples_manifest.json) * [x] The PR title and labels are set such as to maximize their usefulness for the next release's CHANGELOG * [x] If applicable, add a new check to the [release checklist](https://github.com/rerun-io/rerun/blob/main/tests/python/release_checklist)! - [PR Build Summary](https://build.rerun.io/pr/5229) - [Docs preview](https://rerun.io/preview/963956c93faa135571b48dc764f26ffea87e186b/docs) <!--DOCS-PREVIEW--> - [Examples preview](https://rerun.io/preview/963956c93faa135571b48dc764f26ffea87e186b/examples) <!--EXAMPLES-PREVIEW--> - [Recent benchmark results](https://build.rerun.io/graphs/crates.html) - [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
- Loading branch information
Showing
12 changed files
with
351 additions
and
320 deletions.
There are no files selected for viewing
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
274 changes: 206 additions & 68 deletions
274
crates/re_renderer/src/allocator/data_texture_source.rs
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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
Oops, something went wrong.