Skip to content
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

Mesh shader support #3015

Open
rishflab opened this issue Jun 7, 2022 · 5 comments
Open

Mesh shader support #3015

rishflab opened this issue Jun 7, 2022 · 5 comments
Labels
api WebGPU API feature request A request for a new GPU feature exposed in the API large
Milestone

Comments

@rishflab
Copy link

rishflab commented Jun 7, 2022

Apple just announced mesh shader support for the upcoming metal 3.0 release and Khronos is working on adding it to Vulkan (taking their sweet time). Directx12 has supported it for a while now. With the three big players and general industry consensus moving towards a mesh shader future, can we get mesh shader support in webgpu?

From what I have gathered, mesh shading is a pretty big paradigm shift, comparable to opengl 2.0 -> opengl 3.3. I think webgpu needs needs to keep up these shifts otherwise it ends up going the way of webgl. This is not a bad thing per say as webgl has seen heaps of use, but people revert back to native API's when they want to do anything serious.

@Kangz Kangz added the feature request A request for a new GPU feature exposed in the API label Jun 7, 2022
@Kangz Kangz added this to the post-V1 milestone Jun 7, 2022
@Kangz
Copy link
Contributor

Kangz commented Jun 7, 2022

With all three target APIs supporting mesh shaders in some form, adding them to WebGPU definitely seems more doable. However at the point the group is focusing on finishing a v1 that supports a very wide range of hardware, some of which doesn't have mesh shaders. My understanding is also that some mobile GPUs just can't support mesh shaders due to hardware limitations so we'll have to be careful about that.

Tagging post-V1. To make progress on this we'll also need a pretty exhaustive comparison of mesh shaders between the three APIs so that we can come up with a tentative design for WebGPU (maybe bonus points if it can be emulated with compute shaders running before the render pass? Not sure).

For cross linking: mesh shading is also mentioned in #445

@rishflab
Copy link
Author

rishflab commented Jun 8, 2022

maybe bonus points if it can be emulated with compute shaders running before the render pass? Not sure).

I am looking into this currently. Some potentially useful articles I have come across:
https://timur.hu/blog/2022/how-mesh-shaders-are-implemented
https://tellusim.com/mesh-shader-emulation/

@alienself
Copy link

Would absolutely love to see support for Mesh shader in WebGPU.
It would be a game changer for many advanced use cases.

@heavyrain266
Copy link

Mesh shaders are needed for e.g. PSSL in order to run native Game Engines based on WebGPU. PlayStation 5 uses mesh shaders in PSSL which makes it hard to maintain custom backend because of need to force usage of PSSL and rewrite of all the shaders using it.

@kainino0x
Copy link
Contributor

This blog post series should be very helpful - it covers mesh shaders on all of D3D12, Metal, and Vulkan:
https://chaoticbob.github.io/2024/01/24/mesh-shading-part-1.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api WebGPU API feature request A request for a new GPU feature exposed in the API large
Projects
None yet
Development

No branches or pull requests

5 participants