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

Regression: Check that texture fit TMEM before load #2641

Closed
GhostlyDark opened this issue Jan 22, 2022 · 3 comments
Closed

Regression: Check that texture fit TMEM before load #2641

GhostlyDark opened this issue Jan 22, 2022 · 3 comments

Comments

@GhostlyDark
Copy link
Contributor

Doesn't happen with HD textures. Regression caused by 7417144

image

Size is 64x64
THE LEGEND OF ZELDA#0BE442B9#3#2_all
THE LEGEND OF ZELDA#0BE442B9#3#2_all.png

Usable savestate can be found here: #2569 (blood.pj.zip)

@GhostlyDark
Copy link
Contributor Author

image

GOLDENEYE#38C2DA20#4#0_all.png
GOLDENEYE#38C2DA20#4#0_all

GoldenEye, first level. It seems that all textures 64x64 or bigger are affected.

@fzurita
Copy link
Contributor

fzurita commented Feb 4, 2022

@gonetz Instead of aborting the copy all together, maybe just what is valid memory can be copied if it goes out of bounds. Or you could just make the TMEM buffer bigger to account for that kind of situation.

@gonetz
Copy link
Owner

gonetz commented Feb 12, 2022

@gonetz Instead of aborting the copy all together, maybe just what is valid memory can be copied if it goes out of bounds.

Yes, it should be done like this. It was a lazy fix, because the problem it fixes was obviously wrong.
I'll do a proper fix. Thanks for the bug report.

gonetz added a commit that referenced this issue Feb 12, 2022
…ent out of bounds reads.

Fixes #2641 Regression: Check that texture fit TMEM before load
@gonetz gonetz closed this as completed in 8a0db39 Feb 13, 2022
gonetz added a commit that referenced this issue Feb 13, 2022
…ation is disabled.

Fast path totally disables mip-map calculations when "mip-map emulation" option is disabled.
Accurate path works differently. It just set lod to 1.0, which forces most detailed textures to be used.
However, the remained calculations are performed and the mip-map tiles still must be in texture atlas format.

Fixed black textures in GE when mip-map emulation is disabled, see #2641
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

No branches or pull requests

3 participants