Manta Interactive Ray Tracer Development Mailing List

Text archives Help


Re: [MANTA] Manta output


Chronological Thread 
  • From: Steven Parker <sparker@cs.utah.edu>
  • To: Hansong Zhang <hansong@sgi.com>
  • Cc: "'manta@sci.utah.edu'" <manta@sci.utah.edu>
  • Subject: Re: [MANTA] Manta output
  • Date: Tue, 14 Jun 2005 23:08:00 -0600


On Jun 14, 2005, at 6:11 PM, Hansong Zhang wrote:

Steven G. Parker wrote:

... The difficulty is that Manta is pipelined, so rendering a frame and waiting for the result is not an appropriate model. The power of it is that these operations occur in parallel, so for example you could have a parallel compression of the image stream for handing to vizserver.

Waiting is certainly not the right model. But I think this situation is no more complex than other situations in which you don't want to wait, for example hardware occlusion query. So, standard ways of handling this should work, like cycled buffers with ready/consumed flags or a FIFO.

I believe that when other apps like Catia connects to Manta's output, it would want to do so at the buffers level (i.e. data protocols, not class inheritance).

class inheritance isn't the right word for it. The question is how does the external application know that a buffer is ready. There are two options:
1. The app says "render this frame", and waits for the result.
or
2. Manta makes a callback when the new frame is ready.

What about a third option: Manta exports a buffer with a ready flag, and the downstream module checks the ready flag if/whenever it wants. If Manta's ready to output again and finds that a buffer has not been consumed by downstream, it uses another buffer/flag set (effectivelfy forming a FIFO of buffers). When downstream fininshes using a buffer, it sets the consumed flag on the buffer so that Manta can reuse it.

Such coupling is more flexible than a callback. If the downstream is a separate process, the FIFO can still be done in the shared memory. If the downstream is on the different machine, the FIFO can be easily translated into a wire protocol.

This could be made to work (and I will do it). However, I think that using this has some downsides:
- Downstream processing stages compete with Manta for resources (i.e. CPUs), and are outside the scope of the load-balancing mechanisms in Manta. Perhaps on a 256 CPU machine you don't mind only using 254 for Manta, but on a smaller machine this is more of a problem.
 - Subsequent processing of the images always forces a cache invalidate.
- Making Manta wait for a free buffer you are faced with two choices: busy wait (keeping the processors hot, which is scalable), or a context switch (less scalable, certainly higher latency).

I think I can make it work in Manta without requiring it, so perhaps we can have the flexibility to do it this way for what you want without forcing it to be that way.

I agree. Let's call it procedural, tight coupling. I believe we need more flexibility than this.

Okay, makes sense.

Steve






Archive powered by MHonArc 2.6.16.

Top of page