# | Line 54 | Line 54 | ray_pqueue( /* queue a ray for computation */ | |
---|---|---|
54 | RAY *r | |
55 | ) | |
56 | { | |
57 | + | RNUMBER rno; |
58 | + | |
59 | if (r == NULL) | |
60 | return(0); | |
61 | if (ray_pnidle <= 0) { | |
# | Line 61 | Line 63 | ray_pqueue( /* queue a ray for computation */ | |
63 | *r = queued_ray; | |
64 | queued_ray = new_ray; | |
65 | } | |
66 | + | rno = r->rno; |
67 | + | r->rno = raynum++; |
68 | samplendx++; | |
69 | rayvalue(r); | |
70 | + | r->rno = rno; |
71 | return(1); | |
72 | } | |
73 | ||
# | Line 77 | Line 82 | ray_presult( /* check for a completed ray */ | |
82 | return(0); | |
83 | if (ray_pnidle <= 0) { | |
84 | *r = queued_ray; | |
85 | + | r->rno = raynum++; |
86 | samplendx++; | |
87 | rayvalue(r); | |
88 | + | r->rno = queued_ray.rno; |
89 | ray_pnidle = 1; | |
90 | return(1); | |
91 | } | |
# | Line 120 | Line 127 | ray_pclose( /* close one or more child processes */ | |
127 | ray_pnprocs -= nsub; | |
128 | if ((ray_pnidle -= nsub) < 0) | |
129 | ray_pnidle = 0; | |
123 | – | } |
124 | – | |
125 | – | |
126 | – | void |
127 | – | quit(ec) /* make sure exit is called */ |
128 | – | int ec; |
129 | – | { |
130 | – | exit(ec); |
130 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |