Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: f425f41fe590130e789e92b8ad71e0d54d69a2a6
      
https://github.com/WebKit/WebKit/commit/f425f41fe590130e789e92b8ad71e0d54d69a2a6
  Author: Tadeu Zagallo <tzaga...@apple.com>
  Date:   2023-10-20 (Fri, 20 Oct 2023)

  Changed paths:
    M Source/WebGPU/WGSL/Constraints.cpp
    M Source/WebGPU/WGSL/tests/valid/concretization.wgsl

  Log Message:
  -----------
  [WGSL] Concretizing atomic types shouldn't assert
https://bugs.webkit.org/show_bug.cgi?id=263402
rdar://117223889

Reviewed by Dan Glastonbury.

When concretization was originally implemented it was only used when 
initializing
variables, and since variables can't initialized with atomic values, it just 
asserted
that we never tried to concretize an atomic type. However, we also need to 
concretize
array elements when accessing an array with a non-constant index. That was 
implemented
in 269416@main, and now we can crash if indexing into array of atomics. The fix 
is simple,
concretizing an atomic type should just return the same type.

* Source/WebGPU/WGSL/Constraints.cpp:
(WGSL::concretize):
* Source/WebGPU/WGSL/tests/valid/concretization.wgsl:

Canonical link: https://commits.webkit.org/269579@main


_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to