Open Bug 1850203 Opened 1 year ago Updated 9 months ago

Categories

(Core :: Graphics: WebGPU, defect)

defect

Tracking

()

People

(Reporter: mayankleoboy1, Unassigned)

References

(Depends on 1 open bug, Blocks 2 open bugs, )

Details

Attachments

(1 file)

Enable webgpu
Go to : https://tellusim.com/demos/webgpu-20230515/parallel_spatial_tree/main.html

AR: nothing is drawn on the screen. Chrome is able to render.

I get the following errors :

M: 0 us: WebGPU Tellusim::SpatialTree main.html:1:3385
09:43:51.649
Encountered one or more errors while creating shader module
09:43:51.649
WebGPU compilation info for shader module (1 error(s), 0 warning(s), 0 info)
09:43:51.649 Error matching shader requirements against the pipeline, caused by: Shader module is invalid
09:43:51.650
E: 524.00 ms: WebGPU: Validation: Error matching shader requirements against the pipeline, caused by: Shader module is invalid main.html:1:3536
09:43:51.666 In a set_pipeline command, caused by: Compute pipeline (17, 1, Vulkan) is invalid
09:43:51.667
E: 540.00 ms: WebGPU: Validation: In a set_pipeline command, caused by: Compute pipeline (17, 1, Vulkan) is invalid main.html:1:3536
09:43:51.667 In a pass parameter, caused by: Command encoder is invalid
09:43:51.667
E: 541.00 ms: WebGPU: Validation: In a pass parameter, caused by: Command encoder is invalid main.html:1:3536
09:43:51.668 Command encoder is invalid
09:43:51.668
E: 542.00 ms: WebGPU: Validation: Command encoder is invalid

Attached file about:support
Blocks: 1850207

Likely fixed by Teo's upcoming shader work

Severity: -- → S3

Source is not provided or easy to find with the linked page, but I think I can reproduce the OP issue with the following shader, with the U0 and S3 bindings mocked:

struct Obfuscated {
  _c9_3 : u32,
  _c17_0 : array<u32>,
}
@group(0) @binding(0) var<storage> U0 : Obfuscated;

@group(0) @binding(1) var<storage> S3 : Obfuscated;

fn zc1a(zc1b : u32, zc1c : u32, zc1d : u32) -> u32 {
 if(zc1d < U0._c9_3) {
 var zc143 : u32 = S3._c17_0[zc1d];
 if(zc1b != zc143) { return u32(32 - firstLeadingBit(zc1b ^ zc143)); }
 return u32(64 - firstLeadingBit(zc1c ^ zc1d));
 }
 return 0u;
}

…by invoking Naga CLI this way:

$ cargo run --features validate,wgsl-in -- `1850203.wgsl`
    Finished dev [unoptimized + debuginfo] target(s) in 0.12s
     Running `target\debug\naga.exe 1850203.wgsl`
[2023-08-29T15:18:58Z ERROR naga::valid::expression] Left: Literal(I32(32)) of type Scalar { kind: Sint, width: 4 }
[2023-08-29T15:18:58Z ERROR naga::valid::expression] Right: Math { fun: FindMsb, arg: [17], arg1: None, arg2: None, arg3: None } of type Scalar { kind: Uint, width: 4 }
error:
   ┌─ 1850203.wgsl:9:1
   │
 9 │ ╭ fn zc1a(zc1b : u32, zc1c : u32, zc1d : u32) -> u32 {
10 │ │  if(zc1d < U0._c9_3) {
11 │ │  var zc143 : u32 = S3._c17_0[zc1d];
12 │ │  if(zc1b != zc143) { return u32(32 - firstLeadingBit(zc1b ^ zc143)); }
   │ │                                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ naga::Expression [19]
13 │ │  return u32(64 - firstLeadingBit(zc1c ^ zc1d));
14 │ │  }
15 │ │  return 0u;
   │ ╰───────────^ naga::Function [1]

Function [1] 'zc1a' is invalid:
        Expression [19] is invalid
        Operation Subtract can't work with [15] and [18]
error: process didn't exit successfully: `target\debug\naga.exe 1850203.wgsl` (exit code: 0xffffffff)

This looks to be caused by bug 1829879.

Depends on: 1829879
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: