- made a few changes to the timer calls for renderer profiling.

A few items were counted double, other were in the wrong slot.
This commit is contained in:
Christoph Oelckers 2022-01-14 00:15:33 +01:00
parent 18ddcbb1c5
commit 37e7f92182
3 changed files with 8 additions and 2 deletions

View file

@ -164,7 +164,9 @@ void RenderViewpoint(FRenderViewpoint& mainvp, IntRect* bounds, float fov, float
screen->PostProcessScene(false, CM_DEFAULT, flash, []() {
hw_int_useindexedcolortextures = false;
PostProcess.Unclock();
Draw2D(&twodpsp, *screen->RenderState()); // draws the weapon sprites
PostProcess.Clock();
});
PostProcess.Unclock();
}

View file

@ -350,7 +350,6 @@ void BunchDrawer::ProcessBunch(int bnch)
HWWall hwwall;
hwwall.Process(di, &wall[ww], &sector[bunch->sectornum], wall[ww].nextsector < 0 ? nullptr : &sector[wall[ww].nextsector]);
rendered_lines++;
SetupWall.Unclock();
Bsp.Clock();
@ -665,11 +664,12 @@ void BunchDrawer::ProcessSection(int sectionnum, bool portal)
bool inbunch;
SetupSprite.Clock();
int sectnum = sections[sectionnum].sector;
if (!gotsector[sectnum])
{
Bsp.Unclock();
SetupSprite.Clock();
gotsector.Set(sectnum);
CoreSectIterator it(sectnum);
while (auto actor = it.Next())
@ -691,15 +691,18 @@ void BunchDrawer::ProcessSection(int sectionnum, bool portal)
}
}
SetupSprite.Unclock();
Bsp.Clock();
}
if (automapping)
show2dsector.Set(sectnum);
Bsp.Unclock();
SetupFlat.Clock();
HWFlat flat;
flat.ProcessSector(di, &sector[sectnum], sectionnum);
SetupFlat.Unclock();
Bsp.Clock();
//Todo: process subsectors
inbunch = false;

View file

@ -397,6 +397,7 @@ void HWWall::SetupLights(HWDrawInfo *di, FDynLightData &lightdata)
//==========================================================================
void HWWall::PutWall(HWDrawInfo *di, bool translucent)
{
rendered_lines++;
if (translucent || (texture && texture->GetTranslucency() && type == RENDERWALL_M2S))
{
flags |= HWF_TRANSLUCENT;