diff options
-rw-r--r-- | camera.c | 4 | ||||
-rw-r--r-- | graphics.h | 2 | ||||
-rw-r--r-- | render.c | 13 |
3 files changed, 10 insertions, 9 deletions
@@ -270,8 +270,8 @@ shootcamera(Camera *c, Shadertab *s) updatestats(c, t1-t0); printtimings(job); -// free(job->times.Tn); -// free(job->times.Rn); + free(job->times.Tn); + free(job->times.Rn); chanfree(job->donec); free(job->camera); @@ -256,7 +256,7 @@ struct Renderjob struct { /* renderer, entityproc, tilers, rasterizers */ - Rendertime R, E, Tn[20], Rn[20]; + Rendertime R, E, *Tn, *Rn; } times; Renderjob *next; @@ -642,12 +642,13 @@ entityproc(void *arg) params->job->times.E.t0 = t0; /* prof: initialize timing slots for the next stages */ -// if(params->job->times.Tn == nil){ -// params->job->times.Tn = emalloc(nproc*sizeof(Rendertime)); -// params->job->times.Rn = emalloc(nproc*sizeof(Rendertime)); -// memset(params->job->times.Tn, 0, nproc*sizeof(Rendertime)); -// memset(params->job->times.Rn, 0, nproc*sizeof(Rendertime)); -// } + if(params->job->times.Tn == nil){ + assert(params->job->times.Rn == nil); + params->job->times.Tn = emalloc(nproc*sizeof(Rendertime)); + params->job->times.Rn = emalloc(nproc*sizeof(Rendertime)); + memset(params->job->times.Tn, 0, nproc*sizeof(Rendertime)); + memset(params->job->times.Rn, 0, nproc*sizeof(Rendertime)); + } /* end of job */ if(params->entity == nil){ |