Open Bug 1829879 Opened 2 years ago Updated 1 year ago

Implement automatic type conversion for WGSL

Categories

(Core :: Graphics: WebGPU, task, P2)

task

Tracking

()

ASSIGNED

People

(Reporter: ErichDonGubler, Assigned: jimb, NeedInfo)

References

(Blocks 8 open bugs)

Details

Attachments

(1 file)

A significant change that we haven't caught up with yet from the WGSL spec is section 5.2.1 (Abstract numeric types) requiring automatic type conversions to be usable. The intent is to allow for more natural usage of numeric literals and expressions via the inference of the unnameable types AbstractInt and AbstractFloat.

Naga upstream issue tracking this: https://github.com/gfx-rs/naga/issues/2127

This is known to break the following demos from webgpu-v1-samples:

  • computeBoids
  • imageBlur
  • particles
Attached file console-export-2023-4-25_17-31-50.txt (deleted) —

AFAICT, all of the issues currently reported in the JS console while attempting to use WebGPT would be resolved with this bug: https://www.kmeans.org/

Attaching the console log. See also webgpu-v1-webgpt.

Summary: Implement `AbstractInt` and `AbstractFloat` for WGSL → Implement automatic type conversion for WGSL

This issue blocks the vast majority of shader compilation at https://usegpu.live/demo/.

Blocks: 1828270

The severity field is not set for this bug.
:jimb, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(jimb)
Severity: -- → S2

I noticed that at least some shaders in https://compute.toys break because of this issue, like https://compute.toys/view/167.

Type: defect → task
Severity: S2 → S3
Priority: -- → P2
Blocks: webgpu-v1
No longer blocks: webgpu-v1-cts-blockers
Assignee: nobody → jimb
Status: NEW → ASSIGNED
Blocks: 1850203
Blocks: 1850204
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: