ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/rxpiece.cpp
(Generate patch)

Comparing ray/src/rt/rxpiece.cpp (file contents):
Revision 2.1 by greg, Mon Sep 16 23:49:13 2024 UTC vs.
Revision 2.2 by greg, Tue Sep 17 00:05:11 2024 UTC

# Line 482 | Line 482 | children_finished()
482          for (ti[1] = 0; ti[1] < tileGrid[1]; ti[1]++)
483                  for (ti[0] = 0; ti[0] < tileGrid[0]; ti[0]++)
484                          cnt += renderable_tile(tile_p(ti));
485 <        if (!cnt) {                     // nothing left to do?
486 <                error(WARNING, "output appears to be complete, nothing added");
487 <                return true;
488 <        }
485 >        if (!cnt)
486 >                return false;           // parent can do nothing
487          if (cnt < nproc) {
488                  sprintf(errmsg, "only %d renderable tiles, reducing process count", cnt);
489                  error(WARNING, errmsg);
# Line 606 | Line 604 | rpiece(char *pout, RenderDataType dt, char *zout)
604                          quit(1);
605                  if (!fscnresolu(&hresolu, &vresolu, pdfp[0]))
606                          error(USER, "missing picture resolution");
607 +                pixaspect = .0;                 // need to leave this as is
608                  myRPmanager.NewHeader(pout);    // get prev. header info
609                  const char *    tval = myRPmanager.GetHeadStr("TILED=");
610                  if (tval) sscanf(tval, "%d %d", &tileGrid[0], &tileGrid[1]);
# Line 682 | Line 681 | rpiece(char *pout, RenderDataType dt, char *zout)
681          if (children_finished())                // work done in children?
682                  return dt;
683  
684 <        int     ti[2];                          // else render tiles
684 >        int     ndone = 0;                      // else render tiles
685 >        int     ti[2];
686          while (nexttile(ti)) {
687                  const int       offset = (tileGrid[1]-1-ti[1])*myRPmanager.GetWidth()*myRPmanager.THeight() +
688                                                  (myRPmanager.THeight()-1)*myRPmanager.GetWidth() +
# Line 715 | Line 715 | rpiece(char *pout, RenderDataType dt, char *zout)
715                  }
716                  tile_p(ti)->status = 1;         // mark tile completed
717          }
718 +        if (!ndone)
719 +                error(WARNING, "no tiles need rendering, exit");
720          /*
721          munmap(pixMap, pmlen);                  // technically unnecessary...
722          if (zdMap) munmap(zdMap, zmlen);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines