From 8b829d722c28763339a725bb883cfad1608ec76e Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 26 Nov 2025 10:09:24 +0100 Subject: [PATCH] fix perfstats freaking out --- src/hardware/hw_batching.c | 2 -- src/hardware/hw_main.cpp | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index 9c715ca48..d3ccfd21d 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -295,8 +295,6 @@ void HWR_RenderBatches(boolean sort) qs22j(polygonArraySorted, polygonArraySize, sizeof(PolygonArrayEntry *), (useshader ? comparePolygons : comparePolygonsNoShaders)); PS_STOP_TIMING(ps_hw_batchsorttime); } - else - ps_hw_batchsorttime.value.p = 0; // sort order // 1. shader diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 133332f8b..36a72a6da 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -4453,11 +4453,11 @@ static void HWR_RenderDrawNodes(void) } } + PS_STOP_TIMING(ps_hw_nodedrawtime); + if (LIKELY(cv_glbatching.value)) HWR_RenderBatches(false); - PS_STOP_TIMING(ps_hw_nodedrawtime); - drawnodes.clear(); // clear so our size is 0 again! } @@ -5583,9 +5583,9 @@ void HWR_RenderViewpoint(gl_portal_t *rootportal, player_t *player, int stencil_ HWR_DrawSprites(); else HWR_DrawSprites(); + PS_STOP_TIMING(ps_hw_spritedrawtime); if (LIKELY(cv_glbatching.value)) HWR_RenderBatches(false); - PS_STOP_TIMING(ps_hw_spritedrawtime); ps_numdrawnodes.value.i = 0; ps_hw_nodesorttime.value.p = 0;