Skip to content

Update WebGPU#8955

Draft
shoaibkamil wants to merge 14 commits intomainfrom
shoaibkamil/webgpu_use_promises
Draft

Update WebGPU#8955
shoaibkamil wants to merge 14 commits intomainfrom
shoaibkamil/webgpu_use_promises

Conversation

@shoaibkamil
Copy link
Contributor

Update to latest WebGPU, Node, Dawn, and emscripten versions. Use a promise-based API instead of old-style tick-based APIs. This unifies the backend, but requires specific support for timed waits on promises. Dawn is currently the only implementation that has this.

Shoaib Kamil added 14 commits December 15, 2025 17:42
- Replace WGPUShaderModuleWGSLDescriptor with WGPUShaderSourceWGSL
- Replace WGPUProgrammableStageDescriptor with WGPUComputeState
- Convert all string fields from const char* to WGPUStringView
- Update callbacks to use *CallbackInfo structures (WGPUBufferMapCallbackInfo, etc)
- Replace WGPU_*_INIT macros with explicit field initialization
- Change wgpuBufferReference to wgpuBufferAddRef
- Update WGPUConstantEntry.key to use WGPUStringView
- Initialize WGPUDeviceDescriptor.defaultQueue and uncapturedErrorCallbackInfo explicitly

Co-authored-by: AI Assistant (Cursor/Claude)
- Update callback signatures to use WGPUStringView and userdata2
- Replace WGPURequiredLimits/WGPUSupportedLimits with WGPULimits
- Fix WGPUStringView field initialization (data/length)
- Update device descriptor to use deviceLostCallbackInfo structure
- Convert wgpuAdapterRequestDevice/wgpuInstanceRequestAdapter to use callback info structures
- Change wgpuAdapterGetLimits return type check to WGPUStatus

Co-authored-by: AI Assistant (Cursor/Claude)
- Define NULL and SIZE_MAX in mini_webgpu.h for freestanding runtime
- Replace explicit field initialization with WGPU_*_INIT macros
- Replace ~(size_t)0 with WGPU_STRLEN for clarity

Co-authored-by: AI Assistant (Cursor/Claude)
Co-authored-by: AI Assistant (Cursor/Claude)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments