Multiple queues for loading assets in background

41 views
Skip to first unread message

Mister Feature

unread,
Feb 10, 2025, 11:02:51 AMFeb 10
to Dawn Graphics
Hello,

I am using Dawn in C++ for rendering, and everything is working well so far. Now, I want to move asset loading (e.g., uploading 3D models and textures) to a background thread to avoid blocking the main rendering thread.

From my understanding, Dawn only provides a single queue for command submission. Given this limitation, if I upload assets (e.g., textures, buffers) from a background thread, will it cause synchronization issues or block the main rendering thread?

Are there recommended approaches or best practices in Dawn for handling asynchronous asset uploads without stalling rendering?

Thank you!

Corentin Wallez

unread,
Feb 12, 2025, 11:51:40 AMFeb 12
to Mister Feature, Dawn Graphics
Hey,

Unfortunately that's a limitation of WebGPU at the moment and there is no perfect workaround. In the future we could maybe have an asynchronous transfer queue exposed but not in the medium term due to the complexity of the interaction of that feature with the rest of the API. Bevy hit the same issue, and what worked ok for them was to throttle the amount of uploads per frame, but it requires heuristics and is not a silver bullet.

Hope this helps, even if there isn't a perfect solution.

Cheers,

Corentin

--
You received this message because you are subscribed to the Google Groups "Dawn Graphics" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dawn-graphic...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/dawn-graphics/af80a344-af20-484a-80cf-b587a2bdf721n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages