From c6d0627f083fc9d8049429cc4f876a3d61da3827 Mon Sep 17 00:00:00 2001 From: Indev Date: Tue, 29 Aug 2023 13:17:09 +0300 Subject: [PATCH] Actually fix memfree for gpu textures --- src/hardware/hw_main.h | 3 +++ src/z_zone.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hardware/hw_main.h b/src/hardware/hw_main.h index 737956671..51a362c9e 100644 --- a/src/hardware/hw_main.h +++ b/src/hardware/hw_main.h @@ -98,6 +98,9 @@ UINT8 HWR_FogBlockAlpha(INT32 light, extracolormap_t *colormap); // Let's see if FBITFIELD HWR_TranstableToAlpha(INT32 transtablenum, FSurfaceInfo *pSurf); +// Get amount of memory used by gpu textures in bytes +INT32 HWR_GetTextureUsed(void); + // hw_main.c: Post-rendering void HWR_DoPostProcessor(player_t *player); void HWR_StartScreenWipe(void); diff --git a/src/z_zone.c b/src/z_zone.c index 33ec67482..b92707ef4 100644 --- a/src/z_zone.c +++ b/src/z_zone.c @@ -637,7 +637,7 @@ void Command_Memfree_f(void) CONS_Printf(M_GetText("Mipmap patches : %7s KB\n"), sizeu1(Z_TagUsage(PU_HWRPATCHCOLMIPMAP)>>10)); CONS_Printf(M_GetText("HW Texture cache : %7s KB\n"), sizeu1(Z_TagUsage(PU_HWRCACHE)>>10)); CONS_Printf(M_GetText("Plane polygons : %7s KB\n"), sizeu1(Z_TagUsage(PU_HWRPLANE)>>10)); - CONS_Printf(M_GetText("All GPU textures : %7s KB\n"), sizeu1(Z_TagUsage(HWR_GetTextureUsed())>>10)); + CONS_Printf(M_GetText("All GPU textures : %7s KB\n"), sizeu1(HWR_GetTextureUsed()>>10)); } #endif