Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 785d74a7e396b9837a46d355d6704bf68cb7d5b4
      
https://github.com/WebKit/WebKit/commit/785d74a7e396b9837a46d355d6704bf68cb7d5b4
  Author: Tadeu Zagallo <[email protected]>
  Date:   2025-02-25 (Tue, 25 Feb 2025)

  Changed paths:
    M Source/WebGPU/WGSL/GlobalVariableRewriter.cpp
    A Source/WebGPU/WGSL/tests/valid/array-length-pointer.wgsl

  Log Message:
  -----------
  [WebGPU] Generated metal does not compile on 
https://bercon.github.io/roquefort/
https://bugs.webkit.org/show_bug.cgi?id=288356
rdar://145449315

Reviewed by Mike Wyrzykowski.

We use two different mechanisms to track variables that need to be passed to 
functions:
1. when a function (or any of its callees) use a global, we track that it needs 
to be
   passed down from the entry point to this function
2. when a runtime-sized array is passed to a callee, we track that we also need 
to pass
   the array size

However, there were no checks to ensure that the same variable wasn't being 
tracked by
both 1 and 2, which could result in duplicate parameters being inserted. The 
fix is simply
to check if the variable exists in the other HashSet before inserting it.

* Source/WebGPU/WGSL/GlobalVariableRewriter.cpp:
(WGSL::RewriteGlobalVariables::visitCallee):
* Source/WebGPU/WGSL/tests/valid/array-length-pointer.wgsl: Added.

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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to