Skip to content

Commit 4b49eba

Browse files
Investigate MMCE ART loading issues
1 parent e5edf6a commit 4b49eba

2 files changed

Lines changed: 9 additions & 31 deletions

File tree

src/texcache.c

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -262,12 +262,6 @@ static int cacheGetPrefetchLimit(const image_cache_t *cache)
262262
return cache->count - 1 < 4 ? cache->count - 1 : 4;
263263
}
264264

265-
static int cacheShouldPreferLoadedVictim(const image_cache_t *cache, unsigned char priority, int effectiveMode)
266-
{
267-
return cache != NULL && priority == CACHE_REQ_PRIORITY_INTERACTIVE && effectiveMode == MMCE_MODE &&
268-
cache->suffix != NULL && strcmp(cache->suffix, "COV") == 0;
269-
}
270-
271265
static int cacheGetEffectiveMode(const item_list_t *list, const char *value)
272266
{
273267
int mode;
@@ -1355,30 +1349,14 @@ static GSTEXTURE *cacheGetTextureInternal(image_cache_t *cache, item_list_t *lis
13551349
return NULL;
13561350
}
13571351

1358-
if (cacheShouldPreferLoadedVictim(cache, priority, effectiveMode)) {
1359-
for (int i = 0; i < cache->count; i++) {
1360-
entry = &cache->content[i];
1361-
if ((entry->state == CACHE_ENTRY_READY || entry->state == CACHE_ENTRY_PRIMED ||
1362-
entry->state == CACHE_ENTRY_DISPLAYABLE || entry->state == CACHE_ENTRY_FAILED) &&
1363-
entry->lastUsed < rtime) {
1364-
oldestEntry = entry;
1365-
oldestEntryId = i;
1366-
rtime = entry->lastUsed;
1367-
}
1368-
}
1369-
}
1370-
1371-
if (oldestEntry == NULL) {
1372-
rtime = guiFrameId;
1373-
for (int i = 0; i < cache->count; i++) {
1374-
entry = &cache->content[i];
1375-
if ((entry->state == CACHE_ENTRY_FREE || entry->state == CACHE_ENTRY_READY || entry->state == CACHE_ENTRY_PRIMED ||
1376-
entry->state == CACHE_ENTRY_DISPLAYABLE || entry->state == CACHE_ENTRY_FAILED) &&
1377-
entry->lastUsed < rtime) {
1378-
oldestEntry = entry;
1379-
oldestEntryId = i;
1380-
rtime = entry->lastUsed;
1381-
}
1352+
for (int i = 0; i < cache->count; i++) {
1353+
entry = &cache->content[i];
1354+
if ((entry->state == CACHE_ENTRY_FREE || entry->state == CACHE_ENTRY_READY || entry->state == CACHE_ENTRY_PRIMED ||
1355+
entry->state == CACHE_ENTRY_DISPLAYABLE || entry->state == CACHE_ENTRY_FAILED) &&
1356+
entry->lastUsed < rtime) {
1357+
oldestEntry = entry;
1358+
oldestEntryId = i;
1359+
rtime = entry->lastUsed;
13821360
}
13831361
}
13841362

src/textures.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ extern void *apps_case_png;
107107

108108
// Not related to screen size, just to limit at some point
109109
static int maxSize = 720 * 512 * 4;
110-
#define TEX_MMCE_STAGE_READ_SIZE 4096
110+
#define TEX_MMCE_STAGE_READ_SIZE 2048
111111

112112
typedef struct
113113
{

0 commit comments

Comments
 (0)