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

Comparing ray/src/rt/RpictSimulManager.cpp (file contents):
Revision 2.12 by greg, Mon Sep 16 23:49:13 2024 UTC vs.
Revision 2.15 by greg, Sat Jan 25 04:57:27 2025 UTC

# Line 418 | Line 418 | RpictSimulManager::RenderRect(const int x0, const int
418                          doneSamples |= doneMap;
419                  }                       // compute required ray samples
420                  for (x = y = 0; sampMap.Find(&x, &y); x++)
421 <                        if (!ComputePixel(x, y))
421 >                        if (!ComputePixel(x, y)) {
422 >                                sprintf(errmsg, "ComputePixel(%d,%d) failed", x, y);
423 >                                error(WARNING, errmsg);
424                                  return false;
425 +                        }
426                  doneSamples |= sampMap; // samples now done or at least queued
427                  sp2 -= layer++ & 1;     // next denser sampling
428          }
429 <        if (FlushQueue() < 0)           // make sure we got everyone
429 >        if (FlushQueue() < 0)           // compute stragglers
430                  return false;
428        x = y = 0;
429        if (doneMap.Find(&x, &y, false)) {
430                sprintf(errmsg, "missed %.4f%% of pixels in rectangle\n",
431                                100. - 100.*doneMap.SumTotal() /
432                                        doneMap.Width() / doneMap.Height());
433                error(WARNING, errmsg);
434        }
431          if ((prCB != NULL) & (barPix == NULL))
432                  (*prCB)(100.);
433          return true;
# Line 593 | Line 589 | RpictSimulManager::RenderBelow(int ytop, const int vst
589                  error(WARNING, "spectral range incompatible with color output");
590          COLORV **       parr = NULL;            // set up tiny source drawing
591          float **        zarr = NULL;
592 <        if (!ptvw.type && directvis && dblur <= FTINY) {
592 >        if (!ptvw.type && directvis && (dblur <= FTINY) & (mblur <= FTINY)) {
593                  parr = new COLORV * [THeight()];
594                  zarr = new float * [THeight()];
595                  for (int n = THeight(); n-- > 0; ) {
# Line 609 | Line 605 | RpictSimulManager::RenderBelow(int ytop, const int vst
605                          (*prCB)(100.*(GetHeight()-ytop)/GetHeight());
606                  if (!RenderRect(0, THeight()-ytop))     // render this bar
607                          return false;
608 <                int     nlines = lastOut - ytop + THeight();
608 >                int     nlines = lastOut - ytop + vstep;
609                  if (nlines > ytop)
610                          nlines = ytop;
611                  else if (parr)                  // drawing sources?
# Line 819 | Line 815 | RpictSimulManager::RenderFrame(const char *pfname, Ren
815          if (!RenderBelow(GetHeight(), vstep, pdfp[0], dt, pdfp[1])) {
816                  fclose(pdfp[0]);
817                  if (pdfp[1]) (dfname[0] == '!') ? pclose(pdfp[1]) : fclose(pdfp[1]);
822                Cleanup();
818                  return RDTnone;
819          }
820          NewBar();                               // clean up and return
# Line 1188 | Line 1183 | RpictSimulManager::ResumeFrame(const char *pfname, con
1183          if (!RenderBelow(GetHeight()-doneScans, vstep, pdfp[0], dt, pdfp[1])) {
1184                  fclose(pdfp[0]);
1185                  if (pdfp[1]) fclose(pdfp[1]);
1191                Cleanup();
1186                  return RDTnone;
1187          }
1188          NewBar();                               // close up and return success

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines