juj / wasm_webgpu

System headers for interfacing WebGPU from C programs compiled via Emscripten to WebAssembly

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Errors in wgpu_device_* functions

brendan-duncan opened this issue · comments

A number of the wgpu_device_* functions are using device without having called device = wgpu[device];.

wgpu_device_create_bind_group_layout
wgpu_device_create_pipeline_layout
wgpu_device_create_bind_group
wgpu_device_create_compute_pipeline

commented

Nice! Pushed a fix, though untested. There are probably a lot of typos like this since I wrote most of the functions in one pass and haven't actually exercised them. You can find which functions are not tested by the few samples in the repo via a "// TODO: this function is untested. Write a test case" comment in the lib_webgpu.js file.

Thanks Jukka. I'm running into more; I'll accumulate the fixes and submit them at the same time. The ever changing spec doesn't make this easy :-)

commented

Great! I hope the library would be up to date with the latest IDL (from two days ago Friday), c4b6579 . Though it will certainly diverge again as time passes. Testing out, I see that neither Safari and Firefox implementations are currently up to date with the latest spec IDL either, so only Chrome works.

Yeah, Firefox Nightly hasn't caught up yet. The current spec makes writing for either Firefox or Chrome incompatible with each other. I've been focusing on Chrome.