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

[shaders][msl] Enable zero_initialize_workgroup_memory setting #363

Merged
merged 2 commits into from
Sep 22, 2023

Conversation

armansito
Copy link
Collaborator

Zero-initializing workgroup memory works around a Metal driver bug that can cause the tile_alloc and coarse stages to freeze up the system when running natively on Metal due to their use of workgroupUniformLoad. See gfx-rs/wgpu#4500 for more details about this bug.

Zero-initializing workgroup memory also makes the native Metal shaders match the behavior of the current wgpu runner and the invariants of the original WGSL that the shaders were authored in.

In addition, this PR enables the CONTROL_FLOW_UNIFORMITY validation check.

Copy link
Contributor

@raphlinus raphlinus left a comment

Choose a reason for hiding this comment

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

Looks good. And enabling the control flow uniformity check is the right thing to do now that workgroupUniformLoad has landed. Thanks!

The shaders all now pass the control flow uniformity validation check,
so we don't need to keep it disabled.
Zero-initializing workgroup memory works around a Metal driver bug
that can cause the tile_alloc and coarse stages to freeze up the system
when running natively on Metal due to their use of `workgroupUniformLoad`.
See gfx-rs/naga#2482 for more details about this bug.

Zero-initializing workgroup memory also makes the native Metal shaders
match the behavior of the current wgpu runner and the invariants of the
original WGSL that the shaders were authored in.
@armansito armansito merged commit e121dd4 into linebender:main Sep 22, 2023
4 checks passed
@armansito armansito deleted the pr-shaders-zero-init-wg-mem branch September 22, 2023 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants