Handle WGPUVertexStepMode_Undefined#490
Conversation
f397b61 to
163a1da
Compare
cwfitzgerald
left a comment
There was a problem hiding this comment.
I don't think is quite right actually - the behavior of undefined depends on the other arguments of the struct: https://github.com/webgpu-native/webgpu-headers/blob/main/webgpu.h#L4282-L4297
|
@cwfitzgerald good to take that into account! However, it's not clear to me how these different cases of "no attributes" should be mapped to the API in wgpu-core. And it looks like |
stepMode defaults to "vertex" when attributes is not empty.
163a1da to
b739e52
Compare
Can be worked around by binding some dummy vertex buffer to slot 1. The reason is wgpu-core doesn't handle So I think the proper, long-term solution is to handle
I've updated my commit to do 2 with an error message telling developers how they can work around the lack of support, but I can change it to 1 if we prefer. Note: |
|
Sorry this got lost in the sea of PRs - could you take a look at the current state of wgpu-core as I think some of this may have changed? I'm going to try to get a wgpu update up for wgpu-native at some point soon. |
|
wgpu-core (trunk) looks the same to me. The example JS I gave still doesn't work in Firefox. (A dummy vertex buffer has to be bound to make it work.) |
stepMode defaults to "vertex". https://www.w3.org/TR/webgpu/#dom-gpuvertexbufferlayout-stepmode