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

Comparing ray/src/rt/RtraceSimulManager.cpp (file contents):
Revision 2.6 by greg, Tue Apr 30 23:16:23 2024 UTC vs.
Revision 2.8 by greg, Thu May 2 22:10:43 2024 UTC

# Line 117 | Line 117 | RadSimulManager::ThreadsAvailable() const
117   // Global pointer to simulation manager for trace call-back (only one)
118   static const RtraceSimulManager *       ourRTsimMan = NULL;
119  
120 < void    // static call-back
120 > // Call-back for trace output
121 > void
122   RtraceSimulManager::RTracer(RAY *r)
123   {
124          (*ourRTsimMan->traceCall)(r, ourRTsimMan->tcData);
# Line 216 | Line 217 | RtraceSimulManager::EnqueueBundle(const FVECT orig_dir
217                  return -1;
218  
219          if (castonly && !cookedCall)
220 <                error(CONSISTENCY, "EnqueueBundle() called in castonly mode without cookedCall");
220 >                error(INTERNAL, "EnqueueBundle() called in castonly mode without cookedCall");
221  
222          if (!UpdateMode())              // update rendering mode if requested
223                  return -1;
# Line 226 | Line 227 | RtraceSimulManager::EnqueueBundle(const FVECT orig_dir
227                  VCOPY(res.rdir, orig_direc[1]);
228                  orig_direc += 2;
229                  rayorigin(&res, PRIMARY, NULL, NULL);
230 <                if (rID0) res.rno = rID0++;
231 <                else res.rno = ++lastRayID;
230 >                if (!rID0)
231 >                        res.rno = ++lastRayID;
232 >                else if (curFlags & RTdoFIFO)
233 >                        error(INTERNAL, "Ray number assignment unsupported with FIFO");
234 >                else
235 >                        res.rno = lastRayID = rID0++;
236                  if (curFlags & RTimmIrrad)
237                          res.revf = rayirrad;
238                  else if (castonly)
# Line 237 | Line 242 | RtraceSimulManager::EnqueueBundle(const FVECT orig_dir
242                  if (d > 0) {            // direction vector is valid?
243                          if (curFlags & RTlimDist)
244                                  res.rmax = d;
245 <                        if (curFlags & RTdoFIFO) {
246 <                                ray_fifo_in(&res);
245 >                        if (((curFlags&RTdoFIFO) != 0) & (ray_pnprocs > 0)) {
246 >                                if (ray_fifo_in(&res) < 0)
247 >                                        return -1;
248                                  sendRes = false;
249                          } else
250                                  sendRes &= ProcessRay(&res);
# Line 257 | Line 263 | RtraceSimulManager::EnqueueBundle(const FVECT orig_dir
263   int
264   RtraceSimulManager::FlushQueue()
265   {
266 <        if (curFlags & RTdoFIFO)
267 <                return ray_fifo_flush();
268 <
266 >        if (curFlags & RTdoFIFO) {
267 >                if (ray_pnprocs)
268 >                        return ray_fifo_flush();
269 >                return 0;
270 >        }
271          int     nsent = 0;
272          RAY     res;
273  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines