[webkit-changes] [WebKit/WebKit] ff223c: [WGSL] Global variable rewriter shouldn't record l...

Tadeu Zagallo noreply at github.com
Fri Jun 2 10:52:58 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: ff223cff30489025ac0e289559717a5d345fbe2c
      https://github.com/WebKit/WebKit/commit/ff223cff30489025ac0e289559717a5d345fbe2c
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-06-02 (Fri, 02 Jun 2023)

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

  Log Message:
  -----------
  [WGSL] Global variable rewriter shouldn't record local reads
https://bugs.webkit.org/show_bug.cgi?id=257598
rdar://110104940

Reviewed by Mike Wyrzykowski.

While finalizing PR#14549, a mistake was made where we record reads of local
variables as if we were reading from a global. As a result, we try rewrite the
global variable access, which fails, as the variable wasn't a global to begin
with. The fix is to keep track of whether we are reading a global or local
variable, and only record the read if it's a global.

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

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




More information about the webkit-changes mailing list