-
Notifications
You must be signed in to change notification settings - Fork 374
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
RGB images get converted to RGBA images before getting uploaded to the GPU,which is causing a huge performance drop #2306
Comments
This looks surprisingly slow to me - is this a debug build? |
Not sure what I was running at the time, I tried it again today with a fresh pip install: rerun --version
rerun_py 0.6.0 [rustc 1.69.0 (84c898d65 2023-04-16), LLVM 15.0.7] x86_64-unknown-linux-gnu release-0.6 643dea9, built 2023-05-25T20:35:24Z The times for pad_rgb_to_rgba range from ~6.5 ms to ~13 ms. |
…2345) ### What Helps #2306 a bit ### 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) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2345 <!-- pr-link-docs:start --> Docs preview: https://rerun.io/preview/7bed2a1/docs Examples preview: https://rerun.io/preview/7bed2a1/examples <!-- pr-link-docs:end -->
…2345) Helps #2306 a bit * [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) <!-- This line will get updated when the PR build summary job finishes. --> PR Build Summary: https://build.rerun.io/pr/2345 <!-- pr-link-docs:start --> Docs preview: https://rerun.io/preview/7bed2a1/docs Examples preview: https://rerun.io/preview/7bed2a1/examples <!-- pr-link-docs:end -->
we moved all the image conversion to re_renderer now since some of those are gpu driven (see #7700) |
Description
Displaying RGB images for the first time is very expensive as they get converted to RGBA before being sent off to the GPU.
I did some profiling with a 4k video stream where this issue really becomes apperant:
Suggestion to resolve this issue
Instead of using the TextureFormat::Rgba8Unorm, maybe we could use a texture format like TextureFormat::R8Unorm and upload the RGB data directly to the GPU inside of this texture, then do some extra work in the shader to correctly sample an R8Unorm as an rgb texture.
If this performance issue get's resolved this would be really useful especially for live streaming data, where you really want to minimize the time wasted loading and converting the data...
The text was updated successfully, but these errors were encountered: