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:
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.
Okay, since
webgpu.his considered stable it's different to thewebgpu.idlin a few places.One place where this happened to me is bind group entries. The struct (derived from .idl) allows for both
textureandtexture_viewwhile the function that uses this (create_bind_group) only accepts the view:wgpu-py/wgpu/backends/wgpu_native/_api.py
Line 1694 in 9d59b27
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.