Skip to content

Conversation

Wumpf
Copy link
Member

@Wumpf Wumpf commented Feb 19, 2024

What

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:
image

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

  • 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!

@Wumpf Wumpf added 🔺 re_renderer rendering, graphics, GPU 📉 performance Optimization, memory use, etc 🚜 refactor Change the code, not the functionality include in changelog labels Feb 19, 2024
@Wumpf Wumpf changed the title More robust handling of maximum texture size for non-color data, slight perf improvements for point clouds More robust handling of maximum texture size for non-color data, slight perf improvements for large point clouds Feb 19, 2024
@Wumpf
Copy link
Member Author

Wumpf commented Feb 20, 2024

(tested on firefox webgl, chrome webgpu and ofc native)

@Wumpf Wumpf merged commit 4ce43df into main Feb 20, 2024
@Wumpf Wumpf deleted the andreas/data-texture-pointcloud branch February 20, 2024 14:06
@Wumpf Wumpf mentioned this pull request Feb 20, 2024
5 tasks
Wumpf added a commit that referenced this pull request Feb 20, 2024
### What

* Fixes #1398 
* Follow-up of #5229
* same changelog applies which is why I left it out: again this makes
handling of

I tried a scene with a very large number of line strips and the
performance is about the same before after, hard to judge though since
before perf was not very stable and both before/after we have a huge
profiler overhead - there's some low hanging fruit in better batching
how we add batches of line strips, but I left this intentionally out of
this pr.

Similar to the previous PR I also artificially lowered the data size
texture limit to check that the error messages and truncating of lines
works gracefully.

### 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/5240/index.html)
* Using examples from latest `main` build:
[app.rerun.io](https://app.rerun.io/pr/5240/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/5240/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/5240)
- [Docs
preview](https://rerun.io/preview/6d57ed6f6cfce86d82218a33994437fd4fdb637e/docs)
<!--DOCS-PREVIEW-->
- [Examples
preview](https://rerun.io/preview/6d57ed6f6cfce86d82218a33994437fd4fdb637e/examples)
<!--EXAMPLES-PREVIEW-->
- [Recent benchmark results](https://build.rerun.io/graphs/crates.html)
- [Wasm size tracking](https://build.rerun.io/graphs/sizes.html)
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 rendering, graphics, GPU 🚜 refactor Change the code, not the functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants