Tracy instrument software BSP traversal and render

This commit is contained in:
Eidolon 2023-09-18 16:19:31 -05:00 committed by NepDisk
parent 90196d8913
commit df0d49f89a
3 changed files with 16 additions and 5 deletions

View file

@ -14,7 +14,7 @@
#include <algorithm>
#include <vector>
//#include <tracy/tracy/Tracy.hpp>
#include <tracy/tracy/Tracy.hpp>
#include "command.h"
#include "doomdef.h"
@ -963,6 +963,8 @@ static void R_Subsector(size_t num)
fixed_t floorcenterz, ceilingcenterz;
ffloor_t *rover;
ZoneScoped;
#ifdef RANGECHECK
if (num >= numsubsectors)
I_Error("R_Subsector: ss %s with numss = %s\n", sizeu1(num), sizeu2(numsubsectors));
@ -1449,6 +1451,8 @@ void R_RenderBSPNode(INT32 bspnum)
node_t *bsp;
INT32 side;
ZoneScoped;
ps_numbspcalls++;
while (!(bspnum & NF_SUBSECTOR)) // Found a subsector?

View file

@ -13,7 +13,7 @@
/// while maintaining a per column clipping list only.
/// Moreover, the sky areas have to be determined.
//#include <tracy/tracy/Tracy.hpp>
#include <tracy/tracy/Tracy.hpp>
#include "command.h"
#include "doomdef.h"
@ -142,6 +142,7 @@ static bool R_CheckMapPlane(const char* funcname, INT32 y, INT32 x1, INT32 x2)
static void R_MapPlane(drawspandata_t *ds, spandrawfunc_t *spanfunc, INT32 y, INT32 x1, INT32 x2, boolean allow_parallel)
{
ZoneScoped;
angle_t angle, planecos, planesin;
fixed_t distance = 0, span;
size_t pindex;
@ -223,7 +224,7 @@ static void R_MapPlane(drawspandata_t *ds, spandrawfunc_t *spanfunc, INT32 y, IN
static void R_MapTiltedPlane(drawspandata_t *ds, void(*spanfunc)(drawspandata_t*), INT32 y, INT32 x1, INT32 x2, boolean allow_parallel)
{
//ZoneScoped;
ZoneScoped;
if (!R_CheckMapPlane(__func__, y, x1, x2))
return;
@ -655,7 +656,7 @@ void R_DrawPlanes(void)
INT32 i;
drawspandata_t ds {0};
//ZoneScoped;
ZoneScoped;
R_UpdatePlaneRipple(&ds);
@ -681,6 +682,8 @@ static void R_DrawSkyPlane(visplane_t *pl, void(*colfunc)(drawcolumndata_t*), bo
INT32 x;
drawcolumndata_t dc {0};
ZoneScoped;
R_CheckDebugHighlight(SW_HI_SKY);
// Reset column drawer function (note: couldn't we just call walldrawerfunc directly?)
@ -944,6 +947,8 @@ void R_DrawSinglePlane(drawspandata_t *ds, visplane_t *pl, boolean allow_paralle
if (!(pl->minx <= pl->maxx))
return;
ZoneScoped;
// sky flat
if (pl->picnum == skyflatnum)
{

View file

@ -11,7 +11,7 @@
/// \file r_segs.c
/// \brief All the clipping: columns, horizontal spans, sky columns
//#include <tracy/tracy/Tracy.hpp>
#include <tracy/tracy/Tracy.hpp>
#include "command.h"
#include "doomdef.h"
@ -1805,6 +1805,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
//ZoneScoped;
ZoneScoped;
maskedtextureheight = NULL;
//initialize segleft and segright
memset(&segleft, 0x00, sizeof(segleft));