Closed Bug 1828270 Opened 2 years ago Closed 2 years ago

Background on WebGPU Fundamentals doesn't work

Categories

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

defect

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: evilpies, Unassigned)

References

(Blocks 1 open bug, )

Details

It seems like WebGPU is used to render a background on https://webgpufundamentals.org/. This currently fails with:

Uncaught TypeError: GPUCommandEncoder.beginRenderPass: Missing required 'loadValue' member of GPURenderPassColorAttachment.

With bug 1817541 fixed I still don't see a background and the following console messages:

error matching VERTEX shader requirements against the pipeline, caused by: shader module is invalid
bind group layout is invalid
In a pass parameter, caused by: attachments have differing sizes: ("color", Extent3d { width: 2560, height: 1065, depth_or_array_layers: 1 }) is followed by ("resolve", Extent3d { width: 300, height: 150, depth_or_array_layers: 1 })
command encoder is invalid

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)

Running https://webgpufundamentals.org right now yields this shader compilation error in the JS console:

Shader validation error: 
   ┌─ :36:29
   │
36 │     vsOut.normal = (world * vec4f(v.normal, 0)).xyz;
   │                             ^^^^^^^^^^^^^^^^^^ naga::Expression [18]

…which apparently is part of the source code string assigned to a variable call shaderSrc in /webgpu/lesson.html. When the full shader source is fed into Naga's CLI (cargo run --all-features -- shaderSrc.wgsl), more interesting information is yielded (see also bug 1828270 for the reason):

[2023-05-01T18:38:05Z ERROR naga::valid::compose] Vector component[1] type Scalar { kind: Sint, width: 4 }
error:
   ┌─ shaderSrc.wgsl:36:29
   │
36 │     vsOut.normal = (world * vec4f(v.normal, 0)).xyz;
   │                             ^^^^^^^^^^^^^^^^^^ naga::Expression [18]

Entry point myVSMain at Vertex is invalid:
        Expression [18] is invalid
        Composing 1's component type is not expected

So, these shaders are blocked by at least bug 1829879, which should resolve this specific error. Because Naga currently only shows errors one-at-a-time, there may be more, but it will be difficult to tell for now. Sorry about that! 😅

Tentatively classifying as an S2.

Flags: needinfo?(jimb)

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: -- → S3
Flags: needinfo?(jimb)
Priority: -- → P3
Summary: WebGPU background on webgpufundamentals.org doesn't work → Background on WebGPU Fundamentals doesn't work

This seems to work now \o/.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.