forked from Ports/perfect_dark
port: reset texcache on level change
This commit is contained in:
1 parent
8600aead20
commit
ffea7cd65a
3 files changed
+13
No files matched your search
@@ -18,4 +18,6 @@ s32 videoGetWidth(void);
|
||||
s32 videoGetHeight(void);
|
||||
f32 videoGetAspect(void);
|
||||
|
||||
void videoResetTextureCache(void);
|
||||
|
||||
#endif
|
||||
@@ -114,3 +114,8 @@ f32 videoGetAspect(void)
|
||||
{
|
||||
return gfx_current_dimensions.aspect_ratio;
|
||||
}
|
||||
|
||||
void videoResetTextureCache(void)
|
||||
{
|
||||
gfx_texture_cache_clear();
|
||||
}
|
||||
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user