VideoBackends:Metal: Allocate bounding box uploads on a cpu buffer #11854
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
AMD Metal drivers have a goofy bug where the bbox buffer stops being coherent with the cpu if you copy to it from a private (gpu) buffer and don't do anything else with it in that command buffer.
Test case available here if anyone's curious
The old way was actually missing a required fence wait on the upload fence (to prevent the GPU from attempting the copy before it uploaded the copy source), but that's not the actual cause of the breakage, as indicated by the above test case, which doesn't disable hazard tracking and therefore doesn't have any fence requirements.
Side note, if anyone has any AMD GPUs running not-Ventura, please run the linked test case and report back, I'd love to figure out if that bug is new or if it's been around for a while.