but somebody told me a while back on here that WebGPU was outdated? whats the consensus ?
Why would wGPU be outdated if it was in the middle of being supported for browsers?
GPU compute in the browser at the speed of native: WebGPU marching cubes
31–40 of 55 posts
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#32but somebody told me a while back on here that WebGPU was outdated? whats the consensus ?
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#33You absolutely cannot implement stream compaction “at the speed of native” as WebGPU is missing the wave/subgroup intrinsics and globally coherent memory necessary to do that efficiently as possible.
You seem knowledgeable, and I’m possibly going back into a GPGPU project after many years out of the game, so: overall do you see a good future for filling these compute-related gaps in the WebGPU API? Really I’m wondering whether wgpu is an okay choice versus raw Vulkan for native GPGPU outside the browser.
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#34Earlier quoted context omitted.
That's a wgpu-specific extension, not part of the actual WebGPU spec, so you can't use it on the web. https://github.com/gpuweb/gpuweb/blob/main/proposals/subgrou... There is a proposal for supporting subgroups in WebGPU proper but it's still in the draft stage.
I'm aware. It is an implementation of the linked proposal. The `wgpu` implementation linked will make its way into Firefox eventually. Dawn will follow up with a similar one for Chrome. I was linking it to demonstrate there are no technical hurdles and it's only really approval remaining.
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#35Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#36Cool project btw! Adding this to my long list of graphics blogs to read.
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#37Earlier quoted context omitted.
Native extensions unusable on Web browsers don't count.
Then nothing involving WebGPU counts since it's not implemented on other browsers than Chromium and not on Linux even in Chromium… WebGPU is brand new, and the paint is still wet. It doesn't make sense to dismiss things that haven't landed in browsers yet as “unusable on the web”.
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#38You absolutely cannot implement stream compaction “at the speed of native” as WebGPU is missing the wave/subgroup intrinsics and globally coherent memory necessary to do that efficiently as possible.
https://developer.nvidia.com/blog/cuda-pro-tip-optimized-fil...
where they show that their compiler is sometimes able to automatically convert global atomic operations into the warp local versions, and achieve the same performance as manually written intrinsics. I was recently curious if 10 years later these same optimizations had made it into other GPUs and platforms besides cuda, so I put together a simple atomics benchmark in WebGPU.
https://github.com/PWhiddy/webgpu-atomics-benchmark
The results seem to indicate that these optimizations are accessible through webgpu on chrome on both MacOS and Linux (with nvidia gpu). Note that I'm not directly testing stream compaction, just incrementing a single global atomic counter. So that would need to be tested to know for sure if the optimization still holds there. If you see any issues with the benchmark or this reasoning please let me know! I am hoping to solidify my knowledge in this area :)
Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#39Re: GPU compute in the browser at the speed of native: WebGPU marching cubes
#40Earlier quoted context omitted.
Then nothing involving WebGPU counts since it's not implemented on other browsers than Chromium and not on Linux even in Chromium… WebGPU is brand new, and the paint is still wet. It doesn't make sense to dismiss things that haven't landed in browsers yet as “unusable on the web”.
There’s an advanced setting in Safari to enable it, but I can’t say how well it works. In this instance it doesn’t.