Skip to content
This repository has been archived by the owner on Aug 22, 2020. It is now read-only.

Support webgpu #44

Open
happydpc opened this issue May 20, 2020 · 4 comments
Open

Support webgpu #44

happydpc opened this issue May 20, 2020 · 4 comments
Labels
good first issue Good for newcomers help wanted Extra attention is needed Type: Enhancement

Comments

@happydpc
Copy link

This project is very promising like rendy's architecture. If it will support wasm, then will be better. The wasm may limit the crossbeam usage, it may be a problem.

@StarArawn
Copy link
Owner

Currently our rendering architecture is very multi-threaded. We use legion which currently doesn't have paralllel wasm support:
https://github.com/TomGillen/legion#wasm

It might be possible to run harmony on a single thread, but I'm not sure how well that will perform. Always open to seeing PR's for wasm support though! 😄

@StarArawn StarArawn added good first issue Good for newcomers help wanted Extra attention is needed Type: Enhancement labels May 20, 2020
@chemicstry
Copy link

I've worked on implemeting wasm support for amethyst engine and it is quite simple, because you can create a rayon-like wrapper for web workers (https://github.com/amethyst/web_worker). HOWEVER, there is on big limitation that you can't sleep (mutex lock) the main thread and it breaks a lot of existing code. For example, if you want to wait for legion scheduler to finish, you have to return main thread to the browser and then wake up from javascript event (web worker message for example) to continue execution. Or run everything in web workers, but that's another can of worms (rendering works, audio doesn't (yet)). I may take a look some day into what's needed to implement it.

@StarArawn
Copy link
Owner

Yeah, another challenge is the new asset system I wrote. Currently it's very threadpool heavy and uses a concurrent hashmap. I think you could feature gate it though and block on assets loading instead of loading them on the thread pool.

@StarArawn
Copy link
Owner

This is further blocked by our use of push constants now. These do appear to be something that should be supported via a web extension in the future though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
good first issue Good for newcomers help wanted Extra attention is needed Type: Enhancement
Projects
None yet
Development

No branches or pull requests

3 participants