Revert "Free mipmaps before freeing tags"
This reverts commit 2437c5a19a.
This commit is contained in:
1 parent
d9b72fcae6
commit
eba09dfad2
2 files changed
+11
-6
No files matched your search
@@ -5731,6 +5731,17 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
|
||||
|
||||
void HWR_LoadLevel(void)
|
||||
{
|
||||
// Lactozilla (December 8, 2019)
|
||||
// Level setup used to free EVERY mipmap from memory.
|
||||
// Even mipmaps that aren't related to level textures.
|
||||
// Presumably, the hardware render code used to store textures as level data.
|
||||
// Meaning, they had memory allocated and marked with the PU_LEVEL tag.
|
||||
// Level textures are only reloaded after R_LoadTextures, which is
|
||||
// when the texture list is loaded.
|
||||
|
||||
// Sal: Unfortunately, NOT freeing them causes the dreaded Color Bug.
|
||||
HWR_FreeMipmapCache();
|
||||
|
||||
HWR_CreatePlanePolygons((INT32)numnodes - 1);
|
||||
|
||||
if (HWR_ShouldUsePaletteRendering())
|
||||
|
||||
@@ -2784,12 +2784,6 @@ boolean P_SetupLevel(boolean skipprecip, boolean reloadinggamestate)
|
||||
// Clear pointers that would be left dangling by the purge
|
||||
R_FlushTranslationColormapCache();
|
||||
|
||||
#ifdef HWRENDER
|
||||
// Free GPU textures before freeing patches.
|
||||
if (rendermode == render_opengl && (vid.glstate == VID_GL_LIBRARY_LOADED))
|
||||
HWR_FreeMipmapCache();
|
||||
#endif
|
||||
|
||||
Z_FreeTags(PU_LEVEL, PU_PURGELEVEL - 1);
|
||||
|
||||
#if defined (WALLSPLATS) || defined (FLOORSPLATS)
|
||||
|
||||
Reference in new issue
Block a user