-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Examples: Add WebGPU check to some compute demos. #31685
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
Conversation
I recall it working on Chrome/Firefox on Windows but I never tested it on Mac. I'll have to try it again. I'm not sure how much work we want to put into this given previous statements on aligning the WebGL backend to offer comparable compute capabilities as the WebGPU backend: #31250 (comment) However, I'm not sure the compute_birds example would fall under errors introduced by the transform feedback, so I'll take another look at it. |
Indeed. The PR does not question this premise. However, the examples should work without producing warnings in the browser console. If there are warnings, we should understand why and verify if we can fix them. It's also a red flag if examples work with WebGPU but visually break in the WebGL backend like |
|
Merging the PR for now. Ideally, at least Besides, |
The birds performance issue can likely be resolved by sorting the birds so each bird doesn't have to loop through each of this neighbors. This is something I've wanted to implement and something explicitly mentioned by @simondevyoutube in his shader tutorials as an improvement. We can use bitonic sort for this purpose to get something up quickly, or potentially a prefix sum/counting sort approach for maximum performance. How about this. I will try to prioritize performance improvements for the compute examples over the weekend. If those aren't addressed by r180 launch, then we can lower the number of birds until the Mac performance issue is sufficiently addressed. |
|
Sounds good! |
Related issue: -
Description
The PR adds WebGPU compatibility checks to some compute demos that don't work properly with WebGL 2.
@cmhhelgeson Is this example supposed to run with WebGL 2? If so, do you know why Firefox complains?
@holtsetio Does the cloth simulation support WebGL 2? I suppose it's similar problem like
webgpu_compute_birds.