Equalizer  1.6.1
Public Member Functions | List of all members
eq::Pipe Class Reference

A Pipe represents a graphics card (GPU) on a Node. More...

#include <pipe.h>

+ Inheritance diagram for eq::Pipe:
+ Collaboration diagram for eq::Pipe:

Public Member Functions

 Pipe (Node *parent)
 Construct a new pipe. More...
 
virtual ~Pipe ()
 Destruct the pipe. More...
 
void waitExited () const
 
void notifyMapped ()
 
void waitFrameFinished (const uint32_t frameNumber) const
 
void waitFrameLocal (const uint32_t frameNumber) const
 
virtual bool processEvent (const Event &event)
 Process a received event. More...
 
void startThread ()
 
void exitThread ()
 
void cancelThread ()
 
bool startTransferThread ()
 
bool hasTransferThread () const
 
virtual void setDirty (const uint64_t bits)
 
Data Access.
co::CommandQueue * getPipeThreadQueue ()
 
co::CommandQueue * getMainThreadQueue ()
 
co::CommandQueue * getCommandThreadQueue ()
 
co::CommandQueue * getTransferThreadQueue ()
 
ConfiggetConfig ()
 
const ConfiggetConfig () const
 
ClientPtr getClient ()
 
ServerPtr getServer ()
 
bool isRunning () const
 
bool isStopped () const
 
uint32_t getCurrentFrame () const
 Return the current frame number. More...
 
uint32_t getFinishedFrame () const
 
WindowSystem getWindowSystem () const
 Return the window system used by this pipe. More...
 
Interface to and from the SystemPipe, the window-system
  specific pieces for a pipe.
void setSystemPipe (SystemPipe *pipe)
 Set the system-specific pipe implementation. More...
 
SystemPipegetSystemPipe ()
 
const SystemPipegetSystemPipe () const
 
Interface to and from the ComputeContext
Warning
experimental - may not be supported in the future.
void setComputeContext (ComputeContext *ctx)
 Set the compute-specific context. More...
 
const ComputeContextgetComputeContext () const
 
ComputeContextgetComputeContext ()
 
Configuration.
virtual MessagePumpcreateMessagePump ()
 Create a new MessagePump for this pipe. More...
 
MessagePumpgetMessagePump ()
 
- Public Member Functions inherited from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >
NodegetNode ()
 
const NodegetNode () const
 
const WindowsgetWindows () const
 
uint32_t getPort () const
 Returns the port number of this pipe. More...
 
EQFABRIC_INL void setPort (const uint32_t port)
 
uint32_t getDevice () const
 Returns the device number of this pipe. More...
 
EQFABRIC_INL void setDevice (const uint32_t device)
 
const PixelViewportgetPixelViewport () const
 
EQFABRIC_INL void setPixelViewport (const PixelViewport &pvp)
 Set the pipe's pixel viewport. More...
 
void notifyPixelViewportChanged ()
 
EQFABRIC_INL PipePath getPath () const
 
EQFABRIC_INL VisitorResult accept (PipeVisitor &visitor)
 Perform a depth-first traversal of this pipe. More...
 
EQFABRIC_INL VisitorResult accept (PipeVisitor &visitor) const
 Const-version of accept(). More...
 
virtual EQFABRIC_INL void backup ()
 
virtual EQFABRIC_INL void restore ()
 
void create (eq::Window **window)
 
void release (eq::Window *window)
 
virtual void output (std::ostream &) const
 
virtual EQFABRIC_INL uint128_t commit (const uint32_t incarnation=CO_COMMIT_NEXT)
 
EQFABRIC_INL void setIAttribute (const IAttribute attr, const int32_t value)
 
int32_t getIAttribute (const IAttribute attr) const
 
bool isThreaded () const
 
- Public Member Functions inherited from eq::fabric::Object
virtual bool isDirty () const
 
void setName (const std::string &name)
 Set the name of the object. More...
 
const std::string & getName () const
 
void setUserData (co::Object *userData)
 Set user-specific data. More...
 
co::Object * getUserData ()
 
const co::Object * getUserData () const
 
void setError (const int32_t error)
 Set an error code why the last operation failed. More...
 
eq::fabric::Error getError () const
 
uint32_t getTasks () const
 Return the set of tasks this channel might execute in the worst case. More...
 
uint32_t getSerial () const
 

Operations

FramegetFrame (const co::ObjectVersion &frameVersion, const Eye eye, const bool output)
 
co::QueueSlave * getQueue (const UUID &queueID)
 
void flushFrames (ObjectManager *om)
 
const ViewgetView (const co::ObjectVersion &viewVersion) const
 
ViewgetView (const co::ObjectVersion &viewVersion)
 
void startFrame (const uint32_t frameNumber)
 Start a frame by unlocking all child resources. More...
 
void releaseFrame (const uint32_t frameNumber)
 Signal the completion of a frame to the parent. More...
 
void releaseFrameLocal (const uint32_t frameNumber)
 Release the local synchronization of the parent for a frame. More...
 

Callbacks

The callbacks are called by Equalizer during rendering to execute various actions.

class detail::RenderThread
 
class detail::ThreadAffinityVisitor
 
virtual bool supportsWindowSystem (const WindowSystem ws) const
 Tests wether a particular windowing system is supported by this pipe and all its windows. More...
 
virtual WindowSystem selectWindowSystem () const
 Choose the window system to be used by this pipe. More...
 
virtual bool configInit (const uint128_t &initID)
 Initialize this pipe. More...
 
virtual bool configInitSystemPipe (const uint128_t &initID)
 Initialize the OS-specific pipe. More...
 
virtual bool configExit ()
 De-initialize this pipe. More...
 
virtual void frameStart (const uint128_t &frameID, const uint32_t frameNumber)
 Start rendering a frame. More...
 
virtual void frameFinish (const uint128_t &frameID, const uint32_t frameNumber)
 Finish rendering a frame. More...
 
virtual void frameDrawFinish (const uint128_t &frameID, const uint32_t frameNumber)
 Finish drawing. More...
 
virtual void attach (const UUID &id, const uint32_t instanceID)
 

Additional Inherited Members

- Public Types inherited from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >
typedef std::vector< eq::Window * > Windows
 A vector of pointers to windows. More...
 
enum  IAttribute
 Pipe attributes. More...
 
- Public Types inherited from eq::fabric::Object
enum  DirtyBits {
  DIRTY_NAME = Serializable::DIRTY_CUSTOM << 0, DIRTY_USERDATA = Serializable::DIRTY_CUSTOM << 1, DIRTY_ERROR = Serializable::DIRTY_CUSTOM << 2, DIRTY_TASKS = Serializable::DIRTY_CUSTOM << 3,
  DIRTY_REMOVED = Serializable::DIRTY_CUSTOM << 4, DIRTY_SERIAL = Serializable::DIRTY_CUSTOM << 5, DIRTY_CUSTOM = Serializable::DIRTY_CUSTOM << 6, DIRTY_OBJECT_BITS = DIRTY_NAME | DIRTY_USERDATA | DIRTY_ERROR
}
 The changed parts of the object since the last pack(). More...
 
- Static Public Member Functions inherited from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >
static EQFABRIC_INL const
std::string & 
getIAttributeString (const IAttribute attr)
 
- Protected Types inherited from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >
enum  DirtyBits
 
- Protected Member Functions inherited from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >
 Pipe (Node *parent)
 
virtual EQFABRIC_INL void serialize (co::DataOStream &os, const uint64_t dirtyBits)
 
virtual EQFABRIC_INL void deserialize (co::DataIStream &is, const uint64_t dirtyBits)
 
virtual EQFABRIC_INL void notifyDetach ()
 
virtual ChangeType getChangeType () const
 
eq::Window_findWindow (const UUID &id)
 
virtual uint64_t getRedistributableBits () const
 
- Protected Member Functions inherited from eq::fabric::Object
 Object ()
 Construct a new Object. More...
 
virtual ~Object ()
 Destruct the object. More...
 
virtual bool hasMasterUserData ()
 
virtual uint32_t getUserDataLatency () const
 
void setTasks (const uint32_t tasks)
 
void postRemove (Object *child)
 
virtual void removeChild (const UUID &)
 
template<class C , class S >
void commitChild (C *child, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChild (C *child, const uint32_t incarnation)
 
template<class C , class S >
void commitChildren (const std::vector< C * > &children, S *sender, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, uint32_t cmd, const uint32_t incarnation)
 
template<class C >
void commitChildren (const std::vector< C * > &children, const uint32_t incarnation)
 
template<class C >
void syncChildren (const std::vector< C * > &children)
 
template<class P , class C >
void releaseChildren (const std::vector< C * > &children)
 
bool _cmdSync (co::ICommand &command)
 

Detailed Description

A Pipe represents a graphics card (GPU) on a Node.

All Pipe, Window and Channel task methods are executed in a separate co::Worker thread, in parallel with all other pipes in the system. An exception are non-threaded pipes, which execute their tasks on the Node's main thread.

See Also
fabric::Pipe

Definition at line 45 of file include/eq/client/pipe.h.

Constructor & Destructor Documentation

eq::Pipe::Pipe ( Node parent)

Construct a new pipe.

Version
1.0
virtual eq::Pipe::~Pipe ( )
virtual

Destruct the pipe.

Version
1.0

Reimplemented from eq::fabric::Pipe< Node, Pipe, eq::Window, PipeVisitor >.

Reimplemented in eqPly::Pipe, and eVolve::Pipe.

Member Function Documentation

virtual bool eq::Pipe::configExit ( )
protectedvirtual

De-initialize this pipe.

Version
1.0

Reimplemented in eqAsync::Pipe, eqPly::Pipe, and eVolve::Pipe.

Referenced by eVolve::Pipe::configExit(), eqPly::Pipe::configExit(), and eqAsync::Pipe::configExit().

+ Here is the caller graph for this function:

virtual bool eq::Pipe::configInit ( const uint128_t &  initID)
protectedvirtual

Initialize this pipe.

Parameters
initIDthe init identifier.
Version
1.0

Reimplemented in eqPly::Pipe, and eVolve::Pipe.

Referenced by eVolve::Pipe::configInit(), and eqPly::Pipe::configInit().

+ Here is the caller graph for this function:

virtual bool eq::Pipe::configInitSystemPipe ( const uint128_t &  initID)
protectedvirtual

Initialize the OS-specific pipe.

See Also
setSystemPipe()
Version
1.0
virtual MessagePump* eq::Pipe::createMessagePump ( )
virtual

Create a new MessagePump for this pipe.

At most one message pump per execution thread is created. Each pipe render thread creates one message pump for its window system. The process main thread creates a message pump for AGL pipes and non-threaded pipes. Applications which do their own message pumping outside of Equalizer should return 0 here.

Returns
the message pump, or 0.
Version
1.0
virtual void eq::Pipe::frameDrawFinish ( const uint128_t &  frameID,
const uint32_t  frameNumber 
)
protectedvirtual

Finish drawing.

Called once per frame after the last draw operation. Releases the local synchronization if the thread model is draw_sync (the default).

Parameters
frameIDthe per-frame identifier.
frameNumberthe frame to finished with draw.
Version
1.0
virtual void eq::Pipe::frameFinish ( const uint128_t &  frameID,
const uint32_t  frameNumber 
)
protectedvirtual

Finish rendering a frame.

Called once at the end of each frame, to do per-frame updates of pipe-specific data, for example updating the rendering engine. Releases the local synchronization if the thread model is local_sync. Always releases the global synchronization for this pipe.

This method has to call releaseFrame().

Parameters
frameIDthe per-frame identifier.
frameNumberthe frame to finish.
Version
1.0
virtual void eq::Pipe::frameStart ( const uint128_t &  frameID,
const uint32_t  frameNumber 
)
protectedvirtual

Start rendering a frame.

Called once at the beginning of each frame, to do per-frame updates of pipe-specific data, for example updating the rendering engine. Waits for the node to start the frame, unless the thread model is async. If the thread model is async, the local synchronization is released immediately.

This method has to call startFrame().

Parameters
frameIDthe per-frame identifier.
frameNumberthe frame to start.
See Also
Config::startFrame(), Node::startFrame(), Node::waitFrameStarted()
Version
1.0

Reimplemented in eqAsync::Pipe, eqPly::Pipe, and eVolve::Pipe.

Referenced by eVolve::Pipe::frameStart(), eqPly::Pipe::frameStart(), and eqAsync::Pipe::frameStart().

+ Here is the caller graph for this function:

ClientPtr eq::Pipe::getClient ( )
Returns
the parent client node.
Version
1.0
const ComputeContext* eq::Pipe::getComputeContext ( ) const
Returns
the compute context.
ComputeContext* eq::Pipe::getComputeContext ( )
Returns
the compute context.
Config* eq::Pipe::getConfig ( )
Returns
the parent configuration.
Version
1.0

Referenced by eVolve::Pipe::configExit(), eqPly::Pipe::configExit(), eVolve::Pipe::configInit(), eqPly::Pipe::configInit(), eVolve::Pipe::selectWindowSystem(), and eqPly::Pipe::selectWindowSystem().

+ Here is the caller graph for this function:

const Config* eq::Pipe::getConfig ( ) const
Returns
the parent configuration.
Version
1.0
uint32_t eq::Pipe::getCurrentFrame ( ) const

Return the current frame number.

To be called only from the pipe thread. Updated by startFrame().

Returns
the current frame number.
Version
1.0
MessagePump* eq::Pipe::getMessagePump ( )
Returns
the pipe's message pump, or 0.
Version
1.0
ServerPtr eq::Pipe::getServer ( )
Returns
the parent server node.
Version
1.0
SystemPipe* eq::Pipe::getSystemPipe ( )
Returns
the OS-specific pipe implementation.
Version
1.0
const SystemPipe* eq::Pipe::getSystemPipe ( ) const
Returns
the OS-specific pipe implementation.
Version
1.0
WindowSystem eq::Pipe::getWindowSystem ( ) const

Return the window system used by this pipe.

The return value is quaranteed to be constant for an initialized pipe, that is, the window system is determined using selectWindowSystem() before configInit() is executed.

Returns
the window system used by this pipe.
Version
1.0
bool eq::Pipe::isRunning ( ) const
Returns
true if this pipe is running, false otherwise.
Version
1.0
bool eq::Pipe::isStopped ( ) const
Returns
true if this pipe is stopped, false otherwise.
Version
1.0
virtual bool eq::Pipe::processEvent ( const Event event)
virtual

Process a received event.

The task of this method is to update the node as necessary, and transform the event into a config event to be send to the application using Config::sendEvent().

Parameters
eventthe received event.
Returns
true when the event was handled, false if not.
Version
1.5.2
void eq::Pipe::releaseFrame ( const uint32_t  frameNumber)
protected

Signal the completion of a frame to the parent.

Parameters
frameNumberthe frame to end.
Version
1.0
void eq::Pipe::releaseFrameLocal ( const uint32_t  frameNumber)
protected

Release the local synchronization of the parent for a frame.

Parameters
frameNumberthe frame to release.
Version
1.0
virtual WindowSystem eq::Pipe::selectWindowSystem ( ) const
protectedvirtual

Choose the window system to be used by this pipe.

This function determines which of the supported windowing systems is used by this pipe instance.

Returns
the window system currently used by this pipe.
Version
1.0

Reimplemented in eqPly::Pipe, and eVolve::Pipe.

void eq::Pipe::setComputeContext ( ComputeContext ctx)

Set the compute-specific context.

void eq::Pipe::setSystemPipe ( SystemPipe pipe)

Set the system-specific pipe implementation.

The system-specific pipe implements the window-system-dependent part. The os-specific pipe has to be initialized.

Version
1.0
void eq::Pipe::startFrame ( const uint32_t  frameNumber)
protected

Start a frame by unlocking all child resources.

Parameters
frameNumberthe frame to start.
Version
1.0
virtual bool eq::Pipe::supportsWindowSystem ( const WindowSystem  ws) const
protectedvirtual

Tests wether a particular windowing system is supported by this pipe and all its windows.

Returns always true since version 1.1.3 since the WindowSystem is an object.

Parameters
wsthe window system to test.
Returns
true if the window system is supported, false if not.
Version
1.0

The documentation for this class was generated from the following file: