Skip to content

GPUBindGroupEntry spec divergence: what should we do? #825

Description

@Vipitis

Okay, since webgpu.h is considered stable it's different to the webgpu.idl in a few places.
One place where this happened to me is bind group entries. The struct (derived from .idl) allows for both texture and texture_view while the function that uses this (create_bind_group) only accepts the view:

def create_bind_group(

I asked the spec people and it won't be updated: webgpu-native/webgpu-headers#597

For the user it's at most a single call to create_view(), however if you strictly follow the typing from the structs you might run into it. In the future this could become a problem when code written for pyodide no longer works with native.

The obvious best solution would be to just add a two line check and call create_view() and allow it, following the .idl without needing to make it an apidiff.

If you check the upstream spec change PR, there is additional places where this might show up, so perhaps we need to also adjust our codegen to spot these differences as we continue to update .idl too.

I got quite a lot of stress in in front of me with deadlines, so it might be several weeks for me to have a PR for this. But it's also a very low chance of impacting anyone.

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