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

Apply Unknown's clearing fix from #8973. #8987

Closed
wants to merge 2 commits into from

Conversation

hrydgard
Copy link
Owner

Feels maybe a little dangerous so close to release, but makes sense.

@hrydgard hrydgard added this to the v1.3.0 milestone Sep 16, 2016
}
}
} else if (bpp == 2) {
u16 *addr32 = (u16 *)addr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Sorry, this should probably be addr16. Unfortunately, this will be a common case because of alpha - I was thinking of using a u64 or something as faux-simd, since the fb should always be a multiple of 16 bytes anyway.

-[Unknown]

Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess the width (not the stride, but the scissor x2 - x1) doesn't have to be an aligned size, so maybe that's complicating things...

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

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

For performance we can always check for that and align if possible, though it's extra code.

@hrydgard
Copy link
Owner Author

Due to the possible performance impact (as this code will probably be triggered by a lot of games that don't need it) I've decided to postpone until after 1.3.0. Unfortunately that means that the glitch will remain in Socom for now..

@hrydgard hrydgard modified the milestones: v1.4.0, v1.3.0 Sep 17, 2016
// If easy, immediately clear the RAM too.
if (g_Config.bBlockTransferGPU && colorMask && alphaMask) {
u8 *addr = Memory::GetPointer(gstate.getFrameBufAddress());
const bool singleByteClear = (clearColor >> 16) == (clearColor && 0xFFFF) && (clearColor >> 24) == (clearColor & 0xFF);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Derp: another typo, & 0xFFFF. I'll see if I can update this.

-[Unknown]

@unknownbrackets
Copy link
Collaborator

This change also fixes some fades in Brave Story (when fading to black, sometimes an earlier scene flashes for a moment without this.)

-[Unknown]

@unknownbrackets
Copy link
Collaborator

I'm going to close this in favor of #8994 - sorry. I ended up fixing several things from my original implementation.

-[Unknown]

@hrydgard hrydgard deleted the unknown-socom-clearing-fix branch February 7, 2019 14:00
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.

2 participants