-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Fix: Race condition when compute shader writes to texture. #8527
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
Conversation
If shader writes to texture in any way the barrier should be placed to avoid race when downloading texture somewhere else
|
@SpeedCrash100 could you create an issue with the output from the test |
Wumpf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for digging deeper into this!
Beside needing to clarify what happens in queue.rs, please also add a changelog entry, thanks :)
547cea5 to
24f68d6
Compare
|
Replaced barrier from |
71756ce to
3c97b93
Compare
3c97b93 to
a94385b
Compare
Wumpf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great now & makes sense to me :)
thanks again!
Wumpf
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(oops, didn't click Approve)
Connections
fixes #8473
Description
This fix for race where compute pass writes to texture which then copy to buffer. The race can be seen only on Mesa radeonsi drivers.
Testing
It tested on this gist https://gist.github.com/SpeedCrash100/6c60d121a32ef5bd6077c1822da19a38 with AMD RX 9070 XT.
The test switches white and black images and find inconsistency. For example when parts of white images found when the black one image were passed to input. The gist will print error:
Before the changes if run with
WGPU_BACKEND=glenv (to force use radeonsi) the errors were detected by the gist. The error no longer printing by the test program.Squash or Rebase?
Squash
Test run results