mirror of
https://github.com/w23/xash3d-fwgs
synced 2025-01-18 23:00:01 +01:00
vk: profiler: add beams count metric
This commit is contained in:
parent
68761fbbbb
commit
89f49276a5
@ -8,6 +8,7 @@
|
||||
#include "vk_scene.h"
|
||||
#include "vk_math.h"
|
||||
#include "vk_triapi.h"
|
||||
#include "r_speeds.h"
|
||||
|
||||
#include "xash3d_types.h"
|
||||
#include "xash3d_mathlib.h"
|
||||
@ -23,6 +24,17 @@ typedef struct
|
||||
float width;
|
||||
} beamseg_t;
|
||||
|
||||
static struct {
|
||||
struct {
|
||||
int beams;
|
||||
} stats;
|
||||
} g_beam;
|
||||
|
||||
qboolean R_BeamInit(void) {
|
||||
R_SpeedsRegisterMetric(&g_beam.stats.beams, "beams_count", kSpeedsMetricCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
/*
|
||||
==============================================================
|
||||
|
||||
@ -978,6 +990,8 @@ void R_BeamDraw( BEAM *pbeam, float frametime )
|
||||
return;
|
||||
}
|
||||
|
||||
++g_beam.stats.beams;
|
||||
|
||||
// update frequency
|
||||
pbeam->freq += frametime;
|
||||
|
||||
|
@ -9,3 +9,5 @@ qboolean R_BeamCull( const vec3_t start, const vec3_t end, qboolean pvsOnly );
|
||||
|
||||
void R_BeamDrawCustomEntity( struct cl_entity_s *ent, float frametime );
|
||||
void R_BeamDraw( struct beam_s *pbeam, float frametime );
|
||||
|
||||
qboolean R_BeamInit(void);
|
||||
|
@ -20,6 +20,7 @@
|
||||
#include "vk_commandpool.h"
|
||||
#include "r_speeds.h"
|
||||
#include "vk_sprite.h"
|
||||
#include "vk_beams.h"
|
||||
|
||||
// FIXME move this rt-specific stuff out
|
||||
#include "vk_light.h"
|
||||
@ -800,6 +801,7 @@ qboolean R_VkInit( void )
|
||||
}
|
||||
|
||||
R_SpriteInit();
|
||||
R_BeamInit();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user