mirror of
https://github.com/HeyPuter/gex.git
synced 2026-11-13 20:12:43 -10:00
A client that implements webgpu.h by serialising its calls, and a server that makes them on a real webgpu.h (Dawn natively; emdawnwebgpu in the page, to come), generated from Dawn's dawn.json by tools/gen_webgpu_wire.py (third_party/dawn-api: the description and the webgpu.h it gives, pinned to one Dawn revision). Objects are ids the client chooses, so creation needs no round trip; calls with callbacks return futures whose results come back as events, fired in WaitAny/ProcessEvents as their mode allows; buffer mappings are client-side copies (read data with the map's event, written data to the server at unmap); getters the client can answer, it does. Plain C, so that the client builds into a Wine PE DLL for any architecture (tools/wine-wasm/sync-webgpu.sh copies it into Wine's dlls/webgpu). guest/gpu/test/build-native.sh puts both halves in one process for testing: vkd3d's HLSL shader tests through client, wire, server and Dawn on Metal give the same 11064 checks and 131 failures as on Dawn directly. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_f0a06c8a084b4b2ca4f7f291183d507d