3 ms·
Short version: hope, yes. Obtain now, no. Long version: https://github.com/gfx-rs/wgpu/discussions/5525 https://github.com/gfx-rs/wgpu/discussions/5525 There'
by Animats 2y ago
Short version: hope, yes. Obtain now, no.
Long version: https://github.com/gfx-rs/wgpu/discussions/5525 https://github.com/gfx-rs/wgpu/discussions/5525
There's a lock stall around resource allocation. The asset-loading threads can stall out the rendering thread.
I can see this in Tracy profiilng, but don't fully understand the underlying problem. Looks like one of three locks in WGPU, and I'm going to have to build WGPU with more profiling scopes to narrow the problem.
Very few people have gotten far enough with 3D graphics in Rust to need this.
Most Rust 3D graphics projects are like the OP's here - load up a mostly static scene and do a little
with it. If you load all the content before displaying, and don't do much dynamic modification beyond moving items around, most of the hard problems can be bypassed. You can move stuff just by changing its transform - that's cheap. So you can do a pretty good small-world game without hitting these problems. Scale up to a big world that won't all fit in the GPU at once, and things get complicated.
I'm glad to hear from someone else who's trying to push on this. Write me at "nagle@animats.com", please.
For a sense of what I'm doing: https://video.hardlimit.com/w/7usCE3v2RrWK6nuoSr4NHJ https://video.hardlimit.com/w/7usCE3v2RrWK6nuoSr4NHJ
- Ono-Sendai 2y agoWhat I do currently is just limit the amount of data uploaded per frame. Not ideal but works.
- Animats 2y agoThat works better in game dev where you have control over the content. Metaverse dev is like writing a web browser - some people are going to create excessively bulky assets, and you have to do something reasonable with them.
- Ono-Sendai 2y agoIt works with large assets too. Just split the upload into chunks.