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

Try to handle more block transfer / tex render cases #6300

Merged
merged 4 commits into from
Jun 12, 2014

Conversation

unknownbrackets
Copy link
Collaborator

Maybe one of these will help that Sakura game's video. @daniel229, any good?

I think detaching makes sense if there's no rendering one way or another. I also think there might be cases of deep offsets into a tall texture, hoping to catch them with the ugly 0x04110000 heuristic. Could break something worst case...

-[Unknown]

Trying to keep it cautious in case our sizes are wrong.
Assume we'd be better off reading ram.
@daniel229
Copy link
Collaborator

the Sakura's video is still no change.

@unknownbrackets
Copy link
Collaborator Author

Darn. What if you change TEXCACHE_RENDERTEX_OLD_AGE to -1? That should confirm if I'm barking up the wrong tree.

Maybe it's using the wrong format to clear the buffer...

-[Unknown]

@daniel229
Copy link
Collaborator

-1, it works.

@unknownbrackets
Copy link
Collaborator Author

Okay, then this ought to work. I just hope it doesn't have any major regressions.

-[Unknown]

@solarmystic
Copy link
Contributor

Should this be tested for performance/functionality regressions? Just wondering, it looks like a modification to the Texture Cache functionality.

@unknownbrackets
Copy link
Collaborator Author

Well, it should not have any special potential to affect performance, although anything can of course. It will mainly change functionality for render-to-texture stuff.

-[Unknown]

const u64 cacheKey = (u64)addr << 32;
// If it has a clut, those are the low 32 bits, so it'll be inside this range.
// Also, if it's a subsample of the buffer, it'll also be within the FBO.
const u64 cacheKeyEnd = cacheKey + ((u64)(framebuffer->fb_stride * MAX_SUBAREA_Y_OFFSET) << 32);
u64 cacheKeyEnd = cacheKey + ((u64)(framebuffer->fb_stride * MAX_SUBAREA_Y_OFFSET * bpp) << 32);
if (addr >= 0x04000000 && addr < 0x04110000) {
Copy link
Owner

Choose a reason for hiding this comment

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

Heh, nasty.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe I'll just validate more like the stride and stuff.. I'm just worried about mistreating textures that are in memory right after (or potentially even inside due to power of two) an oversized framebuffer.

-[Unknown]

hrydgard added a commit that referenced this pull request Jun 12, 2014
Try to handle more block transfer / tex render cases
@hrydgard hrydgard merged commit 3da962f into hrydgard:master Jun 12, 2014
@unknownbrackets unknownbrackets deleted the gpu-blocktransfer branch June 13, 2014 07:43
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

Successfully merging this pull request may close these issues.

4 participants