Closed Bug 1960093 Opened 9 months ago Closed 9 months ago

WGSL: Argument to atomic operation is not promoted correctly

Categories

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

defect

Tracking

()

RESOLVED FIXED

People

(Reporter: aleiserson, Assigned: jimb)

References

(Blocks 1 open bug, )

Details

This sample fails to run, and prints the following shader validation error in the console:

Shader validation error: Function [0] 'local_compare_and_swap' is invalid
   ┌─ :20:1
   │  
20 │ ╭ fn local_compare_and_swap(idx_before: u32, idx_after: u32) {
21 │ │   //idx_before should always be < idx_after
22 │ │   if (local_data[idx_after] < local_data[idx_before]) {
23 │ │     atomicAdd(&counter, 1);
   │ │                         ^ naga::ir::Expression [10]
   · │
27 │ │   }
28 │ │   return;
   │ ╰─────────^ naga::ir::Function [0]
   │  
   = Atomic operation is invalid
   = Operand [10] has invalid type.
Severity: -- → S4
Priority: -- → P3
Summary: Argument to atomic operation is not promoted correctly → WGSL: Argument to atomic operation is not promoted correctly

wgpu#7573 fixes this.

Assignee: nobody → jimb
Priority: P3 → P1
Depends on: 1962269
No longer depends on: webgpu-update-wgpu

This appears to work now, yay!

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