Skip to content

What's the status on supporting WebGPU and WGSL? #25

Closed

Description

@PoignardAzur

The README currently says:

Currently only SPIR-V support is planned, Vulkan's open compiler target
Possible a future version could support DXIL (the target for DirectX) or WGSL (the WebGPU shading language that's bijective with SPIR-V)

Right now I'm working on Vello, a 2D graphics engine implemented on top of wgpu. We won't even consider an alternative which is Vulkan-only.

Is WebGPU support in the pipeline? Any idea if or when it will happen?

Activity

  1. LegNeato commented on Oct 8, 2024

    @LegNeato
    Collaborator

    We support wgpu, both native (passed through to vulkan directly where possible) and on the web (using naga to translate). Some of the examples in the repo use it and we have run a few on multiple platforms including web and Android.

    I don't believe there are any plans for the compiler backend to output anything other than spir-v, especially with MS switching to spir-v for directx (https://devblogs.microsoft.com/directx/directx-adopting-spir-v/) and naga existing.

    That being said, we have an experimental IR which may allow us to directly do the translation naga does internally in the future if it makes sense (https://github.com/Rust-GPU/spirt).

    @eddyb can correct me if I am wrong as I am still new to the project.

  2. schell commented on Oct 8, 2024

    @schell
    Contributor

    My project renderling uses rust-gpu and wgpu and targets WebGPU on web. naga is pretty capable of translating SPIR-V into WGSL, and I've done some work to make it more capable. There is still work to be done in wgpu+naga but most shaders compile and validate easily. Let me know if you want to get into the specifics - I can tell you if I think your shaders will work.

  3. locked and limited conversation to collaborators on Oct 9, 2024
  4. converted this issue into a discussion #26 on Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions