Found it! See Mesh.setVerticesBuffer webGPU test | Babylon.js Playground (babylonjs.com)
The problem was the datatype for the index buffer. We should use Uint16Array
instead of Uint32Array
. No need to use vertexData.applyToMesh(mesh);
Now all the computation is done on the GPU.
@roland by the way, no need to call any dispatch
to see the square on the screen