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

Fix DMA copy fast path line size when xCount < stride #2942

Merged
merged 1 commit into from Dec 26, 2021

Conversation

gdkchan
Copy link
Member

@gdkchan gdkchan commented Dec 26, 2021

The copy could be out of bounds before if xCount was less than stride, as the span size is calculated based on the stride and xCount (so it could be missing a few bytes at the end). This change makes it not copy any more than xCount. I'm not sure if the fast path should be used in this case though, as technically the data of the few missing pixels would be just 0.

This fixes some random crashes in the Youtube app and maybe some other games that does DMA copy with linear source textures.

Testing to ensure that it did not regress any game is welcome.

@gdkchan gdkchan added gpu Related to Ryujinx.Graphics fix Fix something labels Dec 26, 2021
Copy link
Member

@riperiperi riperiperi left a comment

Choose a reason for hiding this comment

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

Makes sense.

@gdkchan gdkchan merged commit a87f7f2 into Ryujinx:master Dec 26, 2021
@gdkchan gdkchan deleted the fix-fast-dma-copy branch December 26, 2021 16:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fix Fix something gpu Related to Ryujinx.Graphics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants