diff --git a/source/psp/video_hardware_draw.cpp b/source/psp/video_hardware_draw.cpp index 66c0b65..d79d72b 100644 --- a/source/psp/video_hardware_draw.cpp +++ b/source/psp/video_hardware_draw.cpp @@ -3041,6 +3041,7 @@ int GL_LoadTextureLM (const char *identifier, int width, int height, const byte GL_LoadImages ================ */ +int total_overbudget_texturemem; int GL_LoadImages (const char *identifier, int width, int height, const byte *data, qboolean stretch_to_power_of_two, int filter, int mipmap_level, int bpp) { int texture_index = -1; @@ -3190,7 +3191,7 @@ int GL_LoadImages (const char *identifier, int width, int height, const byte *da // Allocate the RAM. std::size_t buffer_size = GL_GetTexSize(texture.format, texture.width, texture.height, 0); - Con_Printf("Loading: %s [%dx%d](%0.2f KB)\n",texture.identifier,texture.width,texture.height, (float) buffer_size/1024); + Con_DPrintf("Loading: %s [%dx%d](%0.2f KB)\n",texture.identifier,texture.width,texture.height, (float) buffer_size/1024); texture.ram = static_cast(memalign(16, buffer_size)); @@ -3226,6 +3227,10 @@ int GL_LoadImages (const char *identifier, int width, int height, const byte *da { free(texture.ram); texture.ram = NULL; + } else { + Con_Printf("Couldn't fit %s into VRAM (%dkB)\n", identifier, buffer_size/1024); + total_overbudget_texturemem += buffer_size/1024; + Con_Printf("RESIDUAL VRAM: %d\n", total_overbudget_texturemem); } // Done. diff --git a/source/psp/video_hardware_model.cpp b/source/psp/video_hardware_model.cpp index 7a5fe82..f5d81f3 100644 --- a/source/psp/video_hardware_model.cpp +++ b/source/psp/video_hardware_model.cpp @@ -2113,20 +2113,12 @@ void *Mod_LoadAllSkins (int numskins, daliasskintype_t *pskintype) // HACK HACK HACK sprintf (model2, "%s.mdl_%i", model, i); - // Sigh.. something is totally awry with memory and the Slim kinda band-aids it.. - // Textures can occupy RAM and VRAM at the same time, ie RAM isnt being freed properly - // So PHAT ends up kicking the bucket with a lot of external textures. -#ifdef SLIM - pheader->gl_texturenum[i][0] = pheader->gl_texturenum[i][1] = pheader->gl_texturenum[i][2] = pheader->gl_texturenum[i][3] = loadtextureimage (model2, 0, 0, qtrue, GU_LINEAR); if (pheader->gl_texturenum[i][0] == 0)// did not find a matching TGA... - -#endif // SLIM - { sprintf (name, "%s_%i", loadmodel->name, i); if(mod_h2)