[webkit-changes] [WebKit/WebKit] e9927f: [WGSL] GlobalVariableRewriter needs to visit varia...

Tadeu Zagallo noreply at github.com
Tue Apr 18 00:43:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: e9927fb515576125c3fa7d5d848c4f30bb2e32a4
      https://github.com/WebKit/WebKit/commit/e9927fb515576125c3fa7d5d848c4f30bb2e32a4
  Author: Tadeu Zagallo <tzagallo at apple.com>
  Date:   2023-04-18 (Tue, 18 Apr 2023)

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

  Log Message:
  -----------
  [WGSL] GlobalVariableRewriter needs to visit variable initializers
https://bugs.webkit.org/show_bug.cgi?id=255515
rdar://108134621

Reviewed by Mike Wyrzykowski.

The global variable rewriter visitor overrides the Variable visitor, as it needs to record
variable definitions that may shadow globals, but it fails to visit the variable initializer
(if there is one), which means that globals used in the initializer are undetected. To fix
that we simply call the base visitor's visit method on the variable declaration.

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

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




More information about the webkit-changes mailing list