mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-27 20:41:46 +00:00
Tracy instrument software BSP traversal and render
This commit is contained in:
parent
01240b1bd6
commit
689f5b8365
3 changed files with 20 additions and 0 deletions
|
|
@ -13,6 +13,8 @@
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
#include <tracy/tracy/Tracy.hpp>
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
#include "r_local.h"
|
#include "r_local.h"
|
||||||
|
|
@ -905,6 +907,8 @@ static void R_Subsector(size_t num)
|
||||||
fixed_t floorcenterz, ceilingcenterz;
|
fixed_t floorcenterz, ceilingcenterz;
|
||||||
ffloor_t *rover;
|
ffloor_t *rover;
|
||||||
|
|
||||||
|
ZoneScoped;
|
||||||
|
|
||||||
#ifdef RANGECHECK
|
#ifdef RANGECHECK
|
||||||
if (num >= numsubsectors)
|
if (num >= numsubsectors)
|
||||||
I_Error("R_Subsector: ss %s with numss = %s\n", sizeu1(num), sizeu2(numsubsectors));
|
I_Error("R_Subsector: ss %s with numss = %s\n", sizeu1(num), sizeu2(numsubsectors));
|
||||||
|
|
@ -1355,6 +1359,8 @@ void R_RenderBSPNode(INT32 bspnum)
|
||||||
node_t *bsp;
|
node_t *bsp;
|
||||||
INT32 side;
|
INT32 side;
|
||||||
|
|
||||||
|
ZoneScoped;
|
||||||
|
|
||||||
ps_numbspcalls++;
|
ps_numbspcalls++;
|
||||||
|
|
||||||
while (!(bspnum & NF_SUBSECTOR)) // Found a subsector?
|
while (!(bspnum & NF_SUBSECTOR)) // Found a subsector?
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
/// while maintaining a per column clipping list only.
|
/// while maintaining a per column clipping list only.
|
||||||
/// Moreover, the sky areas have to be determined.
|
/// Moreover, the sky areas have to be determined.
|
||||||
|
|
||||||
|
#include <tracy/tracy/Tracy.hpp>
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "console.h"
|
#include "console.h"
|
||||||
#include "g_game.h"
|
#include "g_game.h"
|
||||||
|
|
@ -143,6 +145,7 @@ static void R_UpdatePlaneRipple(void)
|
||||||
|
|
||||||
static void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
static void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
||||||
{
|
{
|
||||||
|
ZoneScoped;
|
||||||
angle_t angle, planecos, planesin;
|
angle_t angle, planecos, planesin;
|
||||||
fixed_t distance = 0, span;
|
fixed_t distance = 0, span;
|
||||||
size_t pindex;
|
size_t pindex;
|
||||||
|
|
@ -235,6 +238,7 @@ static void R_MapPlane(INT32 y, INT32 x1, INT32 x2)
|
||||||
|
|
||||||
static void R_MapTiltedPlane(INT32 y, INT32 x1, INT32 x2)
|
static void R_MapTiltedPlane(INT32 y, INT32 x1, INT32 x2)
|
||||||
{
|
{
|
||||||
|
ZoneScoped;
|
||||||
#ifdef RANGECHECK
|
#ifdef RANGECHECK
|
||||||
if (x2 < x1 || x1 < 0 || x2 >= viewwidth || y >= viewheight || y < 0)
|
if (x2 < x1 || x1 < 0 || x2 >= viewwidth || y >= viewheight || y < 0)
|
||||||
I_Error("R_MapTiltedPlane: %d, %d at %d", x1, x2, y);
|
I_Error("R_MapTiltedPlane: %d, %d at %d", x1, x2, y);
|
||||||
|
|
@ -609,6 +613,8 @@ void R_DrawPlanes(void)
|
||||||
visplane_t *pl;
|
visplane_t *pl;
|
||||||
INT32 i;
|
INT32 i;
|
||||||
|
|
||||||
|
ZoneScoped;
|
||||||
|
|
||||||
R_UpdatePlaneRipple();
|
R_UpdatePlaneRipple();
|
||||||
|
|
||||||
for (i = 0; i < MAXVISPLANES; i++, pl++)
|
for (i = 0; i < MAXVISPLANES; i++, pl++)
|
||||||
|
|
@ -633,6 +639,8 @@ static void R_DrawSkyPlane(visplane_t *pl)
|
||||||
INT32 x;
|
INT32 x;
|
||||||
INT32 angle;
|
INT32 angle;
|
||||||
|
|
||||||
|
ZoneScoped;
|
||||||
|
|
||||||
R_CheckDebugHighlight(SW_HI_SKY);
|
R_CheckDebugHighlight(SW_HI_SKY);
|
||||||
|
|
||||||
// Reset column drawer function (note: couldn't we just call walldrawerfunc directly?)
|
// Reset column drawer function (note: couldn't we just call walldrawerfunc directly?)
|
||||||
|
|
@ -860,6 +868,8 @@ void R_DrawSinglePlane(visplane_t *pl)
|
||||||
if (!(pl->minx <= pl->maxx))
|
if (!(pl->minx <= pl->maxx))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
ZoneScoped;
|
||||||
|
|
||||||
// sky flat
|
// sky flat
|
||||||
if (pl->picnum == skyflatnum)
|
if (pl->picnum == skyflatnum)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,8 @@
|
||||||
/// \file r_segs.c
|
/// \file r_segs.c
|
||||||
/// \brief All the clipping: columns, horizontal spans, sky columns
|
/// \brief All the clipping: columns, horizontal spans, sky columns
|
||||||
|
|
||||||
|
#include <tracy/tracy/Tracy.hpp>
|
||||||
|
|
||||||
#include "doomdef.h"
|
#include "doomdef.h"
|
||||||
#include "r_local.h"
|
#include "r_local.h"
|
||||||
#include "r_sky.h"
|
#include "r_sky.h"
|
||||||
|
|
@ -1737,6 +1739,8 @@ void R_StoreWallRange(INT32 start, INT32 stop)
|
||||||
static size_t maxdrawsegs = 0;
|
static size_t maxdrawsegs = 0;
|
||||||
const INT32 twosidedmidtexture = R_GetTwoSidedMidTexture(curline);
|
const INT32 twosidedmidtexture = R_GetTwoSidedMidTexture(curline);
|
||||||
|
|
||||||
|
ZoneScoped;
|
||||||
|
|
||||||
maskedtextureheight = NULL;
|
maskedtextureheight = NULL;
|
||||||
//initialize segleft and segright
|
//initialize segleft and segright
|
||||||
memset(&segleft, 0x00, sizeof(segleft));
|
memset(&segleft, 0x00, sizeof(segleft));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue