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

  Changed paths:
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp

  Log Message:
  -----------
  [WGSL] Array length needs to divide size received from the API
https://bugs.webkit.org/show_bug.cgi?id=262793
rdar://116583287

Reviewed by Mike Wyrzykowski.

For runtime-sized arrays, since the API doesn't know the type of the array 
element
(and consequently its size), it just passes the size of the buffer in bytes. The
generate code for `arrayLength(x)` must then include the division by the size of
the array's element type.

* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::getPacking):

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


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

Reply via email to