From e862d6f0224de67b0a329e16b91841206feb844a Mon Sep 17 00:00:00 2001 From: rodri Date: Sat, 7 Sep 2024 18:40:35 +0000 Subject: let the renderer print the profiling results. --- vis.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'vis.c') diff --git a/vis.c b/vis.c index 589ce9b..32cedd1 100644 --- a/vis.c +++ b/vis.c @@ -602,12 +602,6 @@ renderproc(void *) t0 = nsec(); for(;;){ shootcamera(maincam, shader); - if(doprof) - fprint(2, "R %llud %llud\nE %llud %llud\nT %llud %llud\nr %llud %llud\n\n", - maincam->times.R[maincam->times.last].t0, maincam->times.R[maincam->times.last].t1, - maincam->times.E[maincam->times.last].t0, maincam->times.E[maincam->times.last].t1, - maincam->times.Tn[maincam->times.last].t0, maincam->times.Tn[maincam->times.last].t1, - maincam->times.Rn[maincam->times.last].t0, maincam->times.Rn[maincam->times.last].t1); Δt = nsec() - t0; if(Δt > HZ2MS(60)*1000000ULL){ lockdisplay(display); @@ -1112,6 +1106,8 @@ threadmain(int argc, char *argv[]) if((mctl = initmouse(nil, screen)) == nil) sysfatal("initmouse: %r"); + rctl->doprof = doprof; + screenb = eallocimage(display, rectsubpt(screen->r, screen->r.min), XRGB32, 0, 0x888888FF); fprint(2, "screen %R\n", screenb->r); for(i = 0; i < nelem(cams); i++){ -- cgit v1.2.3