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

OGL: speed up the efb cache #460

Merged
merged 1 commit into from Jun 5, 2014
Merged

Conversation

degasus
Copy link
Member

@degasus degasus commented Jun 5, 2014

gcc doesn't optimize this loops with -O2, so using memset now.
And add a flag to skip this unneeded work at all most of the time.

@degasus
Copy link
Member Author

degasus commented Jun 5, 2014

I know this should be moved into VideoCommon, but such a hotfix should be splitted from bigger changes imo.

@delroth
Copy link
Member

delroth commented Jun 5, 2014

LGTM

@@ -110,6 +110,7 @@ static const u32 EFB_CACHE_RECT_SIZE = 64; // Cache 64x64 blocks.
static const u32 EFB_CACHE_WIDTH = (EFB_WIDTH + EFB_CACHE_RECT_SIZE - 1) / EFB_CACHE_RECT_SIZE; // round up
static const u32 EFB_CACHE_HEIGHT = (EFB_HEIGHT + EFB_CACHE_RECT_SIZE - 1) / EFB_CACHE_RECT_SIZE;
static bool s_efbCacheValid[2][EFB_CACHE_WIDTH * EFB_CACHE_HEIGHT];
static bool s_efbCacheIsCleared = false;

This comment was marked as off-topic.

This comment was marked as off-topic.

@neobrain
Copy link
Member

neobrain commented Jun 5, 2014

LGTM, but please squash the two commits together.

@neobrain
Copy link
Member

neobrain commented Jun 5, 2014

Please fix the commit message to not include "v2: ..." (no reason to mention that because v1 is effectively not accessible anyway). Also, it's "EFB", not "efb". Please don't begin sentences with "And". Your usage of "at all" is also somewhat confusing, since it doesn't really fit there.

gcc doesn't optimize this loops with -O2, so using memset now.
A flag to skip the clear funktion was added as the cache is already cleared most of the time.
neobrain added a commit that referenced this pull request Jun 5, 2014
OGL: speed up the EFB cache.
@neobrain neobrain merged commit 318b03e into dolphin-emu:master Jun 5, 2014
@degasus degasus deleted the efbcache branch June 5, 2014 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants