autodesk-forks / USD

Universal Scene Description
http://www.openusd.org
Other
128 stars 21 forks source link

WebGPU Device Initialization #11

Closed jerrans closed 1 year ago

jerrans commented 1 year ago

Description of Change(s)

I had a stream of DeviceLost errors when building on macOS and running usdview with a simple scene using the WebGPU HGI backend.

#usda 1.0
def Sphere "sphere" {
    float radius = 0.5
}

Seems multiple calls to GetDevice that initialized the WebGPU device were the culprit. If I stored the first device created device and returned that (if it existed) then things seemed to work.

Awesome work getting this out there btw, thanks for making it public!

francis-wangfr commented 1 year ago

Hi Jerran,

How are you doing? It is great to see you here and you are helping us to fix problem that is very helpful. About this public branch, it is only for testing our Windows platform with easier trying on personal PC instead of company devices. We are going to push official webgpu (adsk/feature/webgpu) branch with both Dawn-based and Emscripten-based solution supported in next few days. I will keep you posted on that. At that time with your help, probably you would like merge this PR fix into our official branches I think. Thanks again Jerran for your quick test and contribution.

Thanks, Francis

jerrans commented 1 year ago

Sure thing Francis, that makes sense...and good to hear from you mate. I just noticed this when I tried the branch :) I also noticed a few LLVM-specific compiler switches for Tint are all that prevent this from building with GCC on Linux so I'll take a look at a PR to that repo.

Great work getting this out in the open, you've done an excellent job! When you're ready you should present at the USDIG as I'm sure you'll get a hugely positive reception. All the best.

francis-wangfr commented 1 year ago

That's great to know we could improve on Linux, Jerran, indeed we didn't try on Linux. Very nice collaboration again for us :). Thanks a lot for your further suggestions and recognition. Probably you know, Henrik and Aura will have a presentation in July 11 Khronos hosted "WebGL + WebGPU Meetup". I think they would be happy to see you there.

francis-wangfr commented 1 year ago

Hey @jerrans , I leave a message here hope you know our USD proposal and webgpu branch (links as below) are public now. Looking forward for getting your suggestions and feedbacks.

jerrans commented 1 year ago

Excellent, thanks @francis-wangfr :)