Manta Interactive Ray Tracer Development Mailing List

Text archives Help


[MANTA] Re: Pre/Post frame processing


Chronological Thread 
  • From: Abe Stephens <abe@sci.utah.edu>
  • To: Patric Ljung <plg@itn.liu.se>
  • Cc: "'manta@sci.utah.edu'" <manta@sci.utah.edu>
  • Subject: [MANTA] Re: Pre/Post frame processing
  • Date: Tue, 10 Jan 2006 11:18:11 -0700

Patric Ljung wrote:

Is there any method to register a callback/handler for pre/post-frame
processing? preprocess is just called once initially.
I'd like to do some queue processing/issuing once per frame.

Register a parallel or serial animation callback with manta:

class MyClass {
public:
 void callback( int proc, int numProcs, bool &changed ) {
      ....
 }
};

...

MyClass *myclass

manta_interface->addParallelAnimationCallback( Callback::create( myclass, &MyClass::callback ) );

This callback will be invoked at the beginning of each stage. Callbacks, transactions, etc. are thread safe mechanisms for executing a function you specify.

Furthermore, is there some thread-specific id/storage available in
RenderContext so I don't need locking per intersect call (for queing,
storing stats). Or is RenderContext shared for all draw threads?

Currently there is a ThreadStorage object in the SetupContext and RenderContext that is used for thread local storage of ImageTraversers, PixelSamplers, etc. Eventually this functionality will be available in the scene graph as well, but it isn't yet.

Most of the per-thread storage in the scene graph (objects, materials, etc) is initialized in a constructor and indexed by context.proc.

These warnings indicates that an initializer list isn't in the same order as the members appear in the class declaration. Thanks, don't usually compile with this warning level in icc (I'm not even sure if icc reports this)-- Should be fixed in r834.

Abe



I get some warnings in some Manta-files, compiling my scene
outside manta. Some kind of initialization order warnings:

cd /home/plg/src/mpvc/src/
make -k libmantascene.so
g++ -fPIC -c -g -Wall -Wno-multichar -DLinux -DCOMPILER='"g++"'
-DCXXEXTRA='"-I/usr/include/libxml2/ -Wno-sign-compare"' -DOPTIMIZE='"
-O3 "' -DCPU_x86_64 -DCPUTYPE='"x86_64"'  -I/usr/include/libxml2/
-Wno-sign-compare  -O3  -I../include -I/home/plg/src/xgfx/cl
-I/home/plg/src/xgfx/imageloaders -I/home/plg/src/xgfx/ek
-I/home/plg/src/manta -I/home/plg/src/manta/SCIRun
-I/home/plg/src/manta/SCIRun/include mantascene.cc
In file included from mantascene.cc:36:
/home/plg/src/manta/Interface/Context.h: In constructor
`Manta::SetupContext::SetupContext(Manta::MantaInterface*, int, int,
int, int, bool, int, int, Manta::LoadBalancer*, Manta::PixelSampler*,
Manta::Renderer*, Manta::ThreadStorage*)':
/home/plg/src/manta/Interface/Context.h:130: warning:
`Manta::SetupContext::yres' will be initialized after
/home/plg/src/manta/Interface/Context.h:86: warning:
`Manta::ThreadStorage*Manta::SetupContext::storage_allocator'
/home/plg/src/manta/Interface/Context.h:56: warning:   when initialized here
In file included from mantascene.cc:52:
/home/plg/src/manta/Model/Cameras/PinholeCamera.h: In constructor
`Manta::PinholeCamera::PinholeCamera(const Manta::Point&, const
Manta::Point&, const Manta::Vector&, Manta::Real)':
/home/plg/src/manta/Model/Cameras/PinholeCamera.h:50: warning:
`Manta::PinholeCamera::hfov' will be initialized after
/home/plg/src/manta/Model/Cameras/PinholeCamera.h:49: warning:
`Manta::Real Manta::PinholeCamera::stereo_offset'
/home/plg/src/manta/Model/Cameras/PinholeCamera.h:18: warning:   when
initialized here


In file included from mantascene.cc:56:
/home/plg/src/manta/Model/MiscObjects/CuttingPlane.h: In constructor
`Manta::CuttingPlane::CuttingPlane(const Manta::Point&, const
Manta::Vector&, Manta::Object*)':
/home/plg/src/manta/Model/MiscObjects/CuttingPlane.h:25: warning:
`Manta::CuttingPlane::plane_normal' will be initialized after
/home/plg/src/manta/Model/MiscObjects/CuttingPlane.h:19: warning:
`Manta::Object*Manta::CuttingPlane::internal_object'
/home/plg/src/manta/Model/MiscObjects/CuttingPlane.h:31: warning:   when
initialized here
g++ -shared -fPIC -o libmantascene.so mantascene.o mantamrvol.o -g
-L../../lib -L/home/plg/src/xgfx/imageloaders -L/home/plg/src/xgfx/ek
-L/home/plg/src/xgfx/cl -lrt -limageloaders -leventkernel -lxgfxcl -lpthread


Abe Stephens wrote:

Patric Ljung wrote:


It makes a 512x512 window and I get 3.2--3.4 fps on
my Athlon64 X2 (will try two threads, -np 2, when in
SMP mode).



3.2-3.4 is in the range of what we see on most commodity processors
besides the Itanium2 with one thread.

The latest benchmark of the default scene on an Opteron system was 5.38
fps on one processor.

It looks like there are some problems or conflicts that need to be fixed
with the volume code after the merge. I can't promise that I'll be able
to work through these in the next week or so, it might happen but there
is a lot going on right now surrounding siggraph deadline etc. It looks
like there are some methods that didn't make it through the merge and
then some template syntax errors. It wouldn't be too hard to work
though....

Abe




Abe Stephens wrote:



Patric Ljung wrote:



There are still issues with Model/Groups/VolumeGrid.h using 3.4,
and I guess with 4.x as well. Can be solved by using -fpermissive

I haven't looked at the VolumeGrid code in much detail-- I'll try
compiling it on gcc and fix the errors.


Abe
------------------------------------------------------------------------

make  all
make[3]: Entering directory `/home/plg/src/manta/build/scenes'
Building object file volume.o...
c++ -o volume.o -Dscene_volume_EXPORTS    -DSCI_NOPERSISTENT -O3
-fPIC  -I/usr/share/doc/NVIDIA_GLX-1.0/include -I/home/plg/src/manta
-I/home/plg/src/manta/SCIRun -I/home/plg/src/manta/SCIRun/include -c /home/plg/src/manta/scenes/volume.cc
In file included from /home/plg/src/manta/scenes/volume.cc:18:
/home/plg/src/manta/Model/Groups/VolumeGrid.h:10:47:
Model/Materials/CopyColorMaterial.h: No such file or directory
In file included from /home/plg/src/manta/scenes/volume.cc:18:
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`void Manta::VolumeCube<VoxelType>::init(int, bool)':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:148: error: there are
no arguments to `setLen' that depend on a template parameter, so a
declaration of `setLen' must be available
/home/plg/src/manta/Model/Groups/VolumeGrid.h:148: error: (if you use
`-fpermissive', G++ will accept your code, but allowing the use of an
undeclared name is deprecated)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`float Manta::MultiResVolumeCube<VoxelType>::trilerp(int,
Manta::VectorT<float, 3>&)':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:299: error: 'struct
Manta::AABox3f' has no member named 'contains'
/home/plg/src/manta/Model/Groups/VolumeGrid.h: At global scope:
/home/plg/src/manta/Model/Groups/VolumeGrid.h:478: error: ISO C++
forbids declaration of `CopyColorMaterial' with no type
/home/plg/src/manta/Model/Groups/VolumeGrid.h:478: error: expected
`;' before '*' token
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In constructor
`Manta::VolumeGrid<VoxelType>::VolumeGrid()':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:481: error: `_ccm'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:481: error: (Each
undeclared identifier is reported only once for each function it
appears in.)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:481: error:
`CopyColorMaterial' has not been declared
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`void Manta::VolumeGrid<VoxelType>::setMinVal(VoxelType)':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:488: error: `_minVal'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`void Manta::VolumeGrid<VoxelType>::setMaxVal(VoxelType)':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:489: error: `_maxVal'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`VoxelType Manta::VolumeGrid<VoxelType>::getMinVal()':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:490: error: `_minVal'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`VoxelType Manta::VolumeGrid<VoxelType>::getMaxVal()':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:491: error: `_maxVal'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`void
Manta::VolumeGrid<VoxelType>::disableBasedOnTF(Manta::TransferFunction&,
float)':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:500: error: there are
no arguments to `getNumCells' that depend on a template parameter, so
a declaration of `getNumCells' must be available
/home/plg/src/manta/Model/Groups/VolumeGrid.h:501: error: there are
no arguments to `getCell' that depend on a template parameter, so a
declaration of `getCell' must be available
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`void Manta::VolumeGrid<VoxelType>::intersect(const
Manta::RenderContext&, Manta::RayPacket&) const':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:522: error: `_bound'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:525: error: 'struct
Manta::RayPacket::Element' has no member named 'signMask'
/home/plg/src/manta/Model/Groups/VolumeGrid.h:526: error: no matching
function for call to `intersectAaBox(<type error>, Manta::Real&,
Manta::Real&, Manta::Ray&, <type error>, Manta::Vector&)'
/home/plg/src/manta/Model/Groups/VolumeGrid.h:545: error: `_ccm'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`int
Manta::VolumeGrid<VoxelType>::initByBoundAndCellSize(Manta::VectorT<float,
3>, Manta::VectorT<float, 3>, int, const Manta::VectorT<float, 3>&)':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:572: error: `_nSubdiv'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:579: error: `_bound'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:583: error:
`_boundSize' undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:586: error: `_cellSize'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:588: error: `_maxDim'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:588: error: no matching
function for call to `Max(<type error>, <type error>)'
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:56: note: candidates
are: int SCIRun::Max(int, int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:67:
note:                 unsigned int SCIRun::Max(unsigned int, unsigned
int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:78:
note:                 long int SCIRun::Max(long int, long int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:84:
note:                 float SCIRun::Max(float, float)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:95:
note:                 double SCIRun::Max(double, double)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:119:
note:                 double SCIRun::Max(double, double, double)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:140:
note:                 int SCIRun::Max(int, int, int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:167:
note:                 unsigned int SCIRun::Max(unsigned int, unsigned
int, unsigned int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:189:
note:                 long int SCIRun::Max(long int, long int, long int)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:589: error: no matching
function for call to `Max(<type error>, <type error>)'
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:56: note: candidates
are: int SCIRun::Max(int, int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:67:
note:                 unsigned int SCIRun::Max(unsigned int, unsigned
int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:78:
note:                 long int SCIRun::Max(long int, long int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:84:
note:                 float SCIRun::Max(float, float)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:95:
note:                 double SCIRun::Max(double, double)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:119:
note:                 double SCIRun::Max(double, double, double)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:140:
note:                 int SCIRun::Max(int, int, int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:167:
note:                 unsigned int SCIRun::Max(unsigned int, unsigned
int, unsigned int)
/home/plg/src/manta/SCIRun/Core/Math/MinMax.h:189:
note:                 long int SCIRun::Max(long int, long int, long int)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:592: error: `_cells'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:596: error:
`_cellLocks' undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h: In member function
`int Manta::VolumeGrid<VoxelType>::traverseGrid(const Manta::Ray*,
float, float, Manta::VectorT<float, 4>&, float,
Manta::TransferFunction*, float, float) const':
/home/plg/src/manta/Model/Groups/VolumeGrid.h:671: error: there are
no arguments to `getGridCoords' that depend on a template parameter,
so a declaration of `getGridCoords' must be available
/home/plg/src/manta/Model/Groups/VolumeGrid.h:691: error: `_cellSize'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:691: error: `_bound'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:698: error: `_nSubdiv'
undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:733: error:
`_boundSize' undeclared (first use this function)
/home/plg/src/manta/Model/Groups/VolumeGrid.h:756: error: there are
no arguments to `getCell' that depend on a template parameter, so a
declaration of `getCell' must be available
make[3]: *** [volume.o] Error 1
make[3]: Leaving directory `/home/plg/src/manta/build/scenes'
make[2]: *** [default_target] Error 2
make[2]: Leaving directory `/home/plg/src/manta/build/scenes'
make[1]: *** [default_target_scenes] Error 2
make[1]: Leaving directory `/home/plg/src/manta/build'
make: *** [default_target] Error 2







  • [MANTA] Re: Pre/Post frame processing, Abe Stephens, 01/10/2006

Archive powered by MHonArc 2.6.16.

Top of page