forked from bartvdbraak/blender
Fix: While checking on render stats timer, I found there was already stats
reserved for field and blur steps, but never used or printed.
This commit is contained in:
parent
fc1becdcd2
commit
9467a55d1a
@ -137,8 +137,13 @@ static void stats_background(RenderStats *rs)
|
||||
|
||||
spos+= sprintf(spos, "Fra:%d Mem:%.2fM ", G.scene->r.cfra, megs_used_memory);
|
||||
|
||||
if(rs->curfield)
|
||||
spos+= sprintf(spos, "Field %d ", rs->curfield);
|
||||
if(rs->curblur)
|
||||
spos+= sprintf(spos, "Blur %d ", rs->curblur);
|
||||
|
||||
if(rs->infostr) {
|
||||
spos+= sprintf(spos, " | %s", rs->infostr);
|
||||
spos+= sprintf(spos, "| %s", rs->infostr);
|
||||
}
|
||||
else {
|
||||
if(rs->tothalo)
|
||||
@ -1306,6 +1311,8 @@ static void do_render_blur_3d(Render *re)
|
||||
while(blur--) {
|
||||
set_mblur_offs( re->r.blurfac*((float)(re->r.osa-blur))/(float)re->r.osa );
|
||||
|
||||
re->i.curblur= re->r.osa-blur; /* stats */
|
||||
|
||||
do_render_3d(re);
|
||||
|
||||
blurfac= 1.0f/(float)(re->r.osa-blur);
|
||||
@ -1319,6 +1326,7 @@ static void do_render_blur_3d(Render *re)
|
||||
re->result= rres;
|
||||
|
||||
set_mblur_offs(0.0f);
|
||||
re->i.curblur= 0; /* stats */
|
||||
|
||||
/* weak... the display callback wants an active renderlayer pointer... */
|
||||
re->result->renlay= render_get_active_layer(re, re->result);
|
||||
@ -1377,6 +1385,8 @@ static void do_render_fields_3d(Render *re)
|
||||
re->disprect.ymin /= 2;
|
||||
re->disprect.ymax /= 2;
|
||||
|
||||
re->i.curfield= 1; /* stats */
|
||||
|
||||
/* first field, we have to call camera routine for correct aspect and subpixel offset */
|
||||
RE_SetCamera(re, re->scene->camera);
|
||||
if(re->r.mode & R_MBLUR)
|
||||
@ -1388,6 +1398,9 @@ static void do_render_fields_3d(Render *re)
|
||||
|
||||
/* second field */
|
||||
if(!re->test_break()) {
|
||||
|
||||
re->i.curfield= 2; /* stats */
|
||||
|
||||
re->flag |= R_SEC_FIELD;
|
||||
if((re->r.mode & R_FIELDSTILL)==0)
|
||||
set_field_offs(0.5f);
|
||||
@ -1419,6 +1432,8 @@ static void do_render_fields_3d(Render *re)
|
||||
}
|
||||
free_render_result(rr1);
|
||||
|
||||
re->i.curfield= 0; /* stats */
|
||||
|
||||
/* weak... the display callback wants an active renderlayer pointer... */
|
||||
re->result->renlay= render_get_active_layer(re, re->result);
|
||||
re->display_draw(re->result, NULL);
|
||||
|
@ -875,40 +875,25 @@ void make_renderinfo_string(RenderStats *rs, char *str)
|
||||
spos+= sprintf(spos, "Single Layer | ");
|
||||
|
||||
if(rs->tothalo)
|
||||
spos+= sprintf(spos, "Fra:%d Ve:%d Fa:%d Ha:%d La:%d Mem:%.2fM (%.2fM)", (G.scene->r.cfra), rs->totvert, rs->totface, rs->tothalo, rs->totlamp, megs_used_memory, mmap_used_memory);
|
||||
spos+= sprintf(spos, "Fra:%d Ve:%d Fa:%d Ha:%d La:%d Mem:%.2fM (%.2fM) ", (G.scene->r.cfra), rs->totvert, rs->totface, rs->tothalo, rs->totlamp, megs_used_memory, mmap_used_memory);
|
||||
else
|
||||
spos+= sprintf(spos, "Fra:%d Ve:%d Fa:%d La:%d Mem:%.2fM (%.2fM)", (G.scene->r.cfra), rs->totvert, rs->totface, rs->totlamp, megs_used_memory, mmap_used_memory);
|
||||
spos+= sprintf(spos, "Fra:%d Ve:%d Fa:%d La:%d Mem:%.2fM (%.2fM) ", (G.scene->r.cfra), rs->totvert, rs->totface, rs->totlamp, megs_used_memory, mmap_used_memory);
|
||||
|
||||
if(rs->curfield)
|
||||
spos+= sprintf(spos, "Field %d ", rs->curfield);
|
||||
if(rs->curblur)
|
||||
spos+= sprintf(spos, "Blur %d ", rs->curblur);
|
||||
|
||||
BLI_timestr(rs->lastframetime, info_time_str);
|
||||
spos+= sprintf(spos, " Time:%s ", info_time_str);
|
||||
spos+= sprintf(spos, "Time:%s ", info_time_str);
|
||||
|
||||
if(rs->infostr)
|
||||
spos+= sprintf(spos, " | %s", rs->infostr);
|
||||
spos+= sprintf(spos, "| %s ", rs->infostr);
|
||||
|
||||
/* very weak... but 512 characters is quite safe... we cannot malloc during thread render */
|
||||
if(spos >= str+RW_MAXTEXT)
|
||||
printf("WARNING! renderwin text beyond limit \n");
|
||||
|
||||
/* temporal render debug printing, needed for testing orange renders atm... will be gone soon (or option) */
|
||||
if(G.rt==7 && rs->convertdone) {
|
||||
char str[256];
|
||||
|
||||
spos= str;
|
||||
spos+= sprintf(spos, "Fra:%d Mem:%.2fM (%.2fM)", G.scene->r.cfra, megs_used_memory, mmap_used_memory);
|
||||
|
||||
if(rs->infostr) {
|
||||
spos+= sprintf(spos, " | %s", rs->infostr);
|
||||
}
|
||||
else {
|
||||
if(rs->tothalo)
|
||||
spos+= sprintf(spos, "Sce: %s Ve:%d Fa:%d Ha:%d La:%d", G.scene->id.name+2, rs->totvert, rs->totface, rs->tothalo, rs->totlamp);
|
||||
else
|
||||
spos+= sprintf(spos, "Sce: %s Ve:%d Fa:%d La:%d", G.scene->id.name+2, rs->totvert, rs->totface, rs->totlamp);
|
||||
}
|
||||
printf(str); printf("\n");
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/* callback for print info in top header of renderwin */
|
||||
|
Loading…
Reference in New Issue
Block a user