[webkit-changes] [WebKit/WebKit] 54d96e: [WGSL] Nested array types are not packed correctly

Tadeu Zagallo noreply at github.com
Wed Feb 26 13:20:31 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 54d96e21534d914190924d1d599d053e53d0e8f1
      https://github.com/WebKit/WebKit/commit/54d96e21534d914190924d1d599d053e53d0e8f1
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2025-02-26 (Wed, 26 Feb 2025)

  Changed paths:
    A LayoutTests/fast/webgpu/nocrash/fuzz-145584310-expected.txt
    A LayoutTests/fast/webgpu/nocrash/fuzz-145584310.html
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp

  Log Message:
  -----------
  [WGSL] Nested array types are not packed correctly
https://bugs.webkit.org/show_bug.cgi?id=288558
rdar://145584310

Reviewed by Mike Wyrzykowski.

The logic for packing array types in the GlobalVariableRewriter didn't
handle nested array types, so types like `array<array<T>>` wouldn't be
packed, even if `T` required packing. The code could also easily be
simplified by removing the custom logic under `packArrayType` and using
the generic `packType` function instead, which makes it correctly handle
the nested types.

* LayoutTests/fast/webgpu/nocrash/fuzz-145584310-expected.txt: Added.
* LayoutTests/fast/webgpu/nocrash/fuzz-145584310.html: Added.
* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::packArrayResource):
(WGSL::RewriteGlobalVariables::packType):
(WGSL::RewriteGlobalVariables::packArrayType):

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



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list