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

Correct block transfer overlap and wrapping behavior #16469

Merged
merged 8 commits into from
Dec 1, 2022

Conversation

unknownbrackets
Copy link
Collaborator

See these tests, which now pass: hrydgard/pspautotests#234

Overlapping ranges seem to be copied 64-bytes at a time linearly, so let's do that for accuracy (I've never actually seen a game overlap a copy, but who knows...)

Ranges outside VRAM wrap to valid VRAM, as long as they don't go past 0x04FFFFFF. A transfer can start anywhere in that range or end anywhere in that range, and the portion outside wraps. Note that mirrors are still respected, so a block transfer from 0x042xxxxx -> 0x040xxxxx successfully unswizzles (although the overlap behavior means you can't unswizzle in place.)

Lastly, also increases the detail of meminfo when stride != width. Hopefully won't cause any problems, might double check Gran Turismo to be sure. I think it's worth tracking the gaps when we can.

-[Unknown]

@hrydgard hrydgard added the GE emulation Backend-independent GPU issues label Dec 1, 2022
@hrydgard
Copy link
Owner

hrydgard commented Dec 1, 2022

Hm, something broke in GT:

image

@unknownbrackets
Copy link
Collaborator Author

Oops, that was a silly mistake. I removed the textureCache part by accident when merging with softgpu... should've checked for more block transfers, one place I checked must've been a memcpy I misremembered...

-[Unknown]

@hrydgard
Copy link
Owner

hrydgard commented Dec 1, 2022

Works now. Doesn't seem to affect performance in GT.

@hrydgard hrydgard merged commit 6a76823 into hrydgard:master Dec 1, 2022
@hrydgard hrydgard added this to the v1.14.0 milestone Dec 1, 2022
@unknownbrackets unknownbrackets deleted the softgpu-transfer branch December 1, 2022 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GE emulation Backend-independent GPU issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants