WebAssembly / WebAssembly/wasi-webgpu

Consider changing gpu-supported-limits to a record

Open
#57 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
220
Forks
15
PR merge metrics
No merged PRs in 30d

Description

Consider changing gpu-supported-limits to a record.

This would allow us to use gpu-supported-limits in gpu-device-descriptor.limits and remove record-option-gpu-size64, as record-option-gpu-size64 feels a bit unnatural.

webgpu.h also seems to be using the same WGPULimits for WGPUDeviceDescriptor.WGPULimits and wgpuAdapterGetLimits.

webgpu.h makes each field optional through special UNDEFINED values.
I don't think we need to make the fields optional in our case, they can just default to the default values listed at https://www.w3.org/TR/webgpu/#supported-limits.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the definitions and usages of gpu-supported-limits, gpu-device-descriptor.limits, and record-option-gpu-size64. Compare the related WGPULimits definitions and uses in webgpu.h, including the linked optional-field values. Done means the limits use a record, the special record option is removed, and the documented default values are preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
api, computer-graphics
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.