Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WGSL] Generated metal source does not compile #23427

Conversation

tadeuzagallo
Copy link
Member

@tadeuzagallo tadeuzagallo commented Jan 29, 2024

eee7c8b

[WGSL] Generated metal source does not compile
https://bugs.webkit.org/show_bug.cgi?id=268242
rdar://121764913

Reviewed by Mike Wyrzykowski.

The GlobalVariablRewriter was using a HashSet to track reads, then using it to
insert the used parameters. However, since HashSets don't preserve order the
parameters could be inserted out of order. Replacing the HashSet with a
ListHashSet fixes the problem.

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

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

2a90b5f

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-wpe
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ›  gtk
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2 ❌ πŸ§ͺ api-gtk
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@tadeuzagallo tadeuzagallo self-assigned this Jan 29, 2024
@tadeuzagallo tadeuzagallo added the WebGPU For bugs in WebGPU label Jan 29, 2024
Copy link
Contributor

@mwyrzykowski mwyrzykowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice I was aware we even had ListHashSet

@tadeuzagallo tadeuzagallo added the merge-queue Applied to send a pull request to merge-queue label Jan 30, 2024
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-Generated-metal-source-does-not-compile branch from 2a90b5f to c7b51db Compare January 30, 2024 15:26
https://bugs.webkit.org/show_bug.cgi?id=268242
rdar://121764913

Reviewed by Mike Wyrzykowski.

The GlobalVariablRewriter was using a HashSet to track reads, then using it to
insert the used parameters. However, since HashSets don't preserve order the
parameters could be inserted out of order. Replacing the HashSet with a
ListHashSet fixes the problem.

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

Canonical link: https://commits.webkit.org/273755@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WGSL-Generated-metal-source-does-not-compile branch from c7b51db to eee7c8b Compare January 30, 2024 15:28
@webkit-commit-queue
Copy link
Collaborator

Committed 273755@main (eee7c8b): https://commits.webkit.org/273755@main

Reviewed commits have been landed. Closing PR #23427 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit eee7c8b into WebKit:main Jan 30, 2024
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebGPU For bugs in WebGPU
Projects
None yet
4 participants