Commit c0c9bbe2 authored by Utkarsh Ayachit's avatar Utkarsh Ayachit

More cleanup

parent 65435297
......@@ -112,6 +112,8 @@ vtkCxxSetObjectMacro(vtkPVRenderView, LastSelection, vtkSelection);
vtkPVRenderView::vtkPVRenderView()
{
this->Internals = new vtkInternals();
this->Internals->GeometryStore->SetView(this);
this->CounterSynchronizedSuccessfully = true;
vtkPVOptions* options = vtkProcessModule::GetProcessModule()->GetOptions();
......@@ -799,6 +801,7 @@ void vtkPVRenderView::Update()
// Gather information about geometry sizes from all representations.
double local_size = this->GetGeometryStore()->GetVisibleDataSize(false) / 1024.0;
this->SynchronizedWindows->SynchronizeSize(local_size);
cout << "Full Geometry size: " << local_size << endl;
// Update decisions about lod-rendering and remote-rendering.
this->UseLODForInteractiveRender = this->ShouldUseLODRendering(local_size);
......@@ -847,6 +850,7 @@ void vtkPVRenderView::UpdateLOD()
double local_size = this->GetGeometryStore()->GetVisibleDataSize(true) / 1024.0;
this->SynchronizedWindows->SynchronizeSize(local_size);
cout << "LOD Geometry size: " << local_size << endl;
this->UseOutlineForInteractiveRender = (this->ClientOutlineThreshold <= local_size);
this->UseDistributedRenderingForInteractiveRender =
......
......@@ -20,6 +20,7 @@
#include "vtkPVRenderView.h"
#include "vtkNew.h"
#include "vtkMPIMoveData.h"
#include "vtkTimerLog.h"
vtkStandardNewMacro(vtkRepresentedDataStorage);
//----------------------------------------------------------------------------
......@@ -175,7 +176,26 @@ bool vtkRepresentedDataStorage::NeedsDelivery(
void vtkRepresentedDataStorage::Deliver(int use_lod, unsigned int size, int *values)
{
cout << "Delivering : " << size << endl;
// This method gets called on all processes with the list of representations
// to "deliver". We check with the view what mode we're operating in and
// decide where the data needs to be delivered.
//
// Representations can provide overrides, e.g. though the view says data is
// merely "pass-through", some representation says we need to clone the data
// everywhere. That makes it critical that this method is called on all
// processes at the same time to avoid deadlocks and other complications.
//
// This method will be implemented in "view-specific" subclasses since how the
// data is delivered is very view specific.
vtkTimerLog::MarkStartEvent(use_lod?
"LowRes Data Migration" : "FullRes Data Migration");
bool using_remote_rendering =
use_lod? this->View->GetUseDistributedRenderingForInteractiveRender() :
this->View->GetUseDistributedRenderingForStillRender();
int mode = this->View->GetDataDistributionMode(using_remote_rendering);
for (unsigned int cc=0; cc < size; cc++)
{
vtkInternals::vtkItem* item = this->Internals->GetItem(values[cc], use_lod !=0);
......@@ -185,15 +205,17 @@ void vtkRepresentedDataStorage::Deliver(int use_lod, unsigned int size, int *val
vtkNew<vtkMPIMoveData> dataMover;
dataMover->InitializeForCommunicationForParaView();
dataMover->SetOutputDataType(data->GetDataObjectType());
dataMover->SetMoveModeToCollect();
dataMover->SetInputConnection(item->GetProducer()->GetOutputPort());
dataMover->Update();
if (dataMover->GetServer() == 0)
dataMover->SetMoveMode(mode);
if (item->AlwaysClone)
{
item->SetDataObject(dataMover->GetOutputDataObject(0));
dataMover->SetMoveModeToClone();
}
dataMover->SetInputConnection(item->GetProducer()->GetOutputPort());
dataMover->Update();
item->SetDataObject(dataMover->GetOutputDataObject(0));
}
vtkTimerLog::MarkEndEvent(use_lod?
"LowRes Data Migration" : "FullRes Data Migration");
}
//----------------------------------------------------------------------------
......
......@@ -96,6 +96,8 @@ void vtkSMDataDeliveryManager::Deliver(bool interactive)
this->LODGeometryDeliveryStamp : this->GeometryDeliveryStamp;
std::vector<int> keys_to_deliver;
// FIXME:STREAMING this logic is not the best here. We end up re-delivering
// geometry when the representation didn't really update at all.
if (!view->GetGeometryStore()->NeedsDelivery(timeStamp, keys_to_deliver, use_lod))
{
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment