port: reset texcache on level change

This commit is contained in:
fgsfds committed 2023-08-15 23:33:25 +02:00
1 parent 8600aead20
commit ffea7cd65a
3 files changed
+13

No files matched your search

+2
View File
@@ -18,4 +18,6 @@ s32 videoGetWidth(void);
s32 videoGetHeight(void);
f32 videoGetAspect(void);
void videoResetTextureCache(void);
#endif
+5
View File
@@ -114,3 +114,8 @@ f32 videoGetAspect(void)
{
return gfx_current_dimensions.aspect_ratio;
}
void videoResetTextureCache(void)
{
gfx_texture_cache_clear();
}
+6
View File
@@ -10,6 +10,9 @@
#include "data.h"
#include "textureconfig.h"
#include "types.h"
#ifndef PLATFORM_N64
#include "video.h"
#endif
void texSetBitstring(u8 *arg0)
{
@@ -130,6 +133,9 @@ void texReset(void)
for (s32 i = 4; i < ARRAYCOUNT(tcptrs); ++i) {
g_TexNumConfigs += tcptrs[i].count;
}
// reset backend texture cache
videoResetTextureCache();
#endif
g_TexWords = mempAlloc(ALIGN16(g_TexNumConfigs * 4), MEMPOOL_STAGE);