Open Bug 1827947 Opened 2 years ago Updated 11 months ago

`GPUCompilationMessage.message` contents do not currently fulfill WebGPU v1 spec. draft

Categories

(Core :: Graphics: WebGPU, defect, P3)

defect

Tracking

()

People

(Reporter: ErichDonGubler, Unassigned)

References

(Blocks 2 open bugs)

Details

The current WebGPU spec. draft describes GPUCompilationMessage.message as:

The human-readable, localizable text for this compilation message.

The current content of messages in our implementation are generated by naga, which draw significant inspiration from Rust compilation error messages. For example, given the following (invalid) WGSL shader (which, yes, has an extraneous leading newline 😅):


@compute @workgroup_size(64)
fn main() {
  // Pointless!
  yerp
}

…one receives an according message like the following (N.B. the extraneous leading newline):


Shader '' parsing error: expected assignment or increment/decrement, found '}'
  ┌─ wgsl:6:6
  │
6 │                     }
  │                     ^ expected assignment or increment/decrement

This is, unfortunately, contrary to the WebGPU specification. While the output is arguably human-readable, it is not easy to localize. We need to determine how we will comply with the spec.

Adding a blocking relationship with webgpu-v1 for now. I expect this may be pushed back beyond that particular milestone.

Blocks: webgpu-v1

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)

I believe this to be an S3. :jimb, if this isn't correct, feel free to correct.

Severity: -- → S3
Flags: needinfo?(jimb)
Priority: -- → P3
Blocks: webgpu-phase-2
No longer blocks: webgpu-v1
You need to log in before you can comment on or make changes to this bug.