[webkit-changes] [WebKit/WebKit] f6aa45: [WGSL] GlobalVariableRewriter should preserve the ...

Tadeu Zagallo noreply at github.com
Wed Apr 19 01:52:37 PDT 2023


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

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

  Log Message:
  -----------
  [WGSL] GlobalVariableRewriter should preserve the order of globals
https://bugs.webkit.org/show_bug.cgi?id=255595
rdar://108196735

Reviewed by Myles C. Maxfield.

We were using a HashMap for storing the globals keyed by group and binding, which
meant that we were serializing the globals in arbitrary order. Change the code to
use a vector for the second level, so that the binding order can be preserved. We
might still want to sort the entries by binding, but in any case I believe switching
to a vector is a step in the right direction.

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

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




More information about the webkit-changes mailing list