Commit 83df311d authored by Vladimír Ulman's avatar Vladimír Ulman
Browse files

FIX: Bugs in updating ScmRemoveCellFromMask-related scmReservationLock.

parent 7a1c47d7
Loading
Loading
Loading
Loading
+11 −9
Original line number Diff line number Diff line
@@ -931,9 +931,6 @@ void Cell<MV, PV>::DoNextPhase(void)
			// *** custom scene LOCK ***
 			lockhnd = scheduler.sceneLocks_st->lock(cellTP, this, masks);
#endif*/
 			
			//ULM: update scmReservationLock!
			scmReservationLock.updateCellCentre(scmCellBPCentre);
			SoftRenderBPListIntoMask(*scheduler.sceneMasks[cellTP],this->ID,
					scmCellBPList,scmCellBPCentre,scmCellOuterBPNumber);
			//note: the SoftRenderBPListIntoMask() does not check for FF leaks
@@ -948,6 +945,11 @@ void Cell<MV, PV>::DoNextPhase(void)
			cellTP++;
		}

		//update scmReservationLock
		//(only once/after the while-cycle
		// and only after outdated/old future reservations were wiped out)
		scmReservationLock.updateCellCentre(scmCellBPCentre);

		DEBUG_REPORT("changed reservations in "
			<< scheduler.newestScene - timePoint
			<< " sceneMasks");	
+6 −4
Original line number Diff line number Diff line
@@ -817,16 +817,12 @@ void Cell<MV, PV>::DoCytokinesis(const size_t noFrames)
#endif*/
		 
		 // update new estimate according to the most recent cell mask shape
		 //ULM: update scmReservationLock for the first daughter
		 daughter1->scmReservationLock.updateCellCentre(duplicatedCell1->scmCellBPCentre);
		 SoftRenderBPListIntoMask(*scheduler.sceneMasks[i], 
									daughter1->GetID(), 
									duplicatedCell1->scmCellBPList,
									duplicatedCell1->scmCellBPCentre,
									duplicatedCell1->scmCellOuterBPNumber);

		 //ULM: update scmReservationLock for the second daughter
		 daughter2->scmReservationLock.updateCellCentre(duplicatedCell2->scmCellBPCentre);
		 SoftRenderBPListIntoMask(*scheduler.sceneMasks[i], 
									daughter2->GetID(), 
									duplicatedCell2->scmCellBPList,
@@ -838,6 +834,12 @@ void Cell<MV, PV>::DoCytokinesis(const size_t noFrames)
#endif
	}

	//init the scmReservationLocks for both daughters
	daughter1->scmReservationLock.setCellDiameter(2.5f * daughter1->cellDiameter);
	daughter1->scmReservationLock.updateCellCentre(duplicatedCell1->scmCellBPCentre);
	daughter2->scmReservationLock.setCellDiameter(2.5f * daughter2->cellDiameter);
	daughter2->scmReservationLock.updateCellCentre(duplicatedCell2->scmCellBPCentre);
	
	// left cell - last finished phase and timepoint
	daughter1->currentPhase = Cytokinesis;
#ifndef GTGEN_WITH_MULTITHREADING