Skip to content

Commit

Permalink
Renderers: fix 1-frame delayed rendering stats with \r_speeds=1
Browse files Browse the repository at this point in the history
Vulkan: batch image uploads whenever possible, should reduce map load times as well
Vulkan: enable all possible validation layers for debug builds
  • Loading branch information
ec- committed Jan 17, 2025
1 parent 4b6c96e commit d42f86e
Show file tree
Hide file tree
Showing 4 changed files with 167 additions and 63 deletions.
4 changes: 2 additions & 2 deletions code/renderer/tr_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -429,10 +429,10 @@ void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
}
cmd->commandId = RC_SWAP_BUFFERS;

R_PerformanceCounters();

R_IssueRenderCommands();

R_PerformanceCounters();

R_InitNextFrame();

if ( frontEndMsec ) {
Expand Down
9 changes: 4 additions & 5 deletions code/renderervk/tr_cmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ static void R_PerformanceCounters( void ) {
}

if (r_speeds->integer == 1) {
ri.Printf (PRINT_ALL, "%i/%i shaders/surfs %i leafs %i verts %i/%i tris %.2f mtex %.2f dc\n",
ri.Printf (PRINT_ALL, "%i/%i shaders/surfs %i leafs %i verts %i/%i tris %.2f mtex\n",
backEnd.pc.c_shaders, backEnd.pc.c_surfaces, tr.pc.c_leafs, backEnd.pc.c_vertexes,
backEnd.pc.c_indexes/3, backEnd.pc.c_totalIndexes/3,
R_SumOfUsedImages()/(1000000.0f), backEnd.pc.c_overDraw / (float)(glConfig.vidWidth * glConfig.vidHeight) );
backEnd.pc.c_indexes/3, backEnd.pc.c_totalIndexes/3, R_SumOfUsedImages()/1000000.0);
} else if (r_speeds->integer == 2) {
ri.Printf (PRINT_ALL, "(patch) %i sin %i sclip %i sout %i bin %i bclip %i bout\n",
tr.pc.c_sphere_cull_patch_in, tr.pc.c_sphere_cull_patch_clip, tr.pc.c_sphere_cull_patch_out,
Expand Down Expand Up @@ -380,10 +379,10 @@ void RE_EndFrame( int *frontEndMsec, int *backEndMsec ) {
}
cmd->commandId = RC_SWAP_BUFFERS;

R_PerformanceCounters();

R_IssueRenderCommands();

R_PerformanceCounters();

R_InitNextFrame();

if ( frontEndMsec ) {
Expand Down
Loading

0 comments on commit d42f86e

Please sign in to comment.