OGRE: Ogre::CompositorPassUav Class Reference

| OGRE 2.2.4 Object-Oriented Graphics Rendering Engine

Public Types | Public Member Functions | List of all members
Ogre::CompositorPassUav Class Reference
Core » Effects

Implementation of CompositorPass This implementation will set UAVs. More...

`#include <OgreCompositorPassUav.h>`

Inheritance diagram for Ogre::CompositorPassUav:
[legend]

## Public Types
enum | Reason { Unknown, FromStorageToSysRam, FromSysRamToStorage, GainedResidency, LostResidency, PoolTextureSlotChanged, ResidentToSysRamSync, MetadataCacheOutOfDate, ExceptionThrown, FsaaSettingAlteredByApi, ReadyForRendering, Deleted }

## Public Member Functions
| CompositorPassUav (const CompositorPassUavDef *definition, CompositorNode *parentNode, const RenderTargetViewDef *rtv)
virtual | ~CompositorPassUav ()
virtual void | _placeBarriersAndEmulateUavExecution (BoundUav boundUavs[64], ResourceAccessMap &uavsAccess, ResourceLayoutMap &resourcesLayout)
| Emulates the execution of a UAV to understand memory dependencies, and adds a memory barrier / resource transition if we need to. More...
void | _removeAllBarriers (void)
void | addResourceTransition (ResourceLayoutMap::iterator currentLayout, ResourceLayout::Layout newLayout, uint32 readBarrierBits)
virtual void | execute (const Camera *lodCamera)
Vector2 | getActualDimensions (void) const
const CompositorPassDef * | getDefinition (void) const
const CompositorNode * | getParentNode (void) const
RenderPassDescriptor * | getRenderPassDesc (void) const
const CompositorTextureVec & | getTextureDependencies (void) const
CompositorPassType | getType () const
virtual void | notifyCleared (void)
| @See CompositorNode::_notifyCleared More...
virtual void | notifyDestroyed (const UavBufferPacked *buffer)
virtual void | notifyDestroyed (TextureGpu *channel)
| @See CompositorNode::notifyDestroyed More...
virtual bool | notifyRecreated (const TextureGpu *channel)
| @See CompositorNode::notifyRecreated More...
virtual void | notifyRecreated (const UavBufferPacked *oldBuffer, UavBufferPacked *newBuffer)
virtual void | notifyTextureChanged (TextureGpu *texture, TextureGpuListener::Reason reason, void *extraData)
| Called when a TextureGpu changed in a way that affects how it is displayed: More...
void | operator delete (void *ptr)
void | operator delete (void *ptr, const char *, int, const char *)
void | operator delete (void *ptr, void *)
void | operator delete[] (void *ptr)
void | operator delete[] (void *ptr, const char *, int, const char *)
void * | operator new (size_t sz)
void * | operator new (size_t sz, const char *file, int line, const char *func)
| operator new, with debug line info More...
void * | operator new (size_t sz, void *ptr)
| placement operator new More...
void * | operator new[] (size_t sz)
void * | operator new[] (size_t sz, const char *file, int line, const char *func)
| array operator new, with debug line info More...
void | profilingBegin (void)
void | profilingEnd (void)
virtual void | resetNumPassesLeft (void)
virtual bool | shouldStayLoaded (TextureGpu *texture)
| Return true if this TextureGpu should likely stay loaded or else graphical changes could occur. More...

## Detailed Description

Implementation of CompositorPass This implementation will set UAVs.

Author
  Matias N. Goldberg

Version
  1.0

## Member Enumeration Documentation

## ◆ Reason

enum Ogre::TextureGpuListener::Reason
| inherited

Enumerator
Unknown |
FromStorageToSysRam | OnStorage -> OnSystemRam.
FromSysRamToStorage | OnSystemRam -> OnStorage.
GainedResidency | OnStorage -> Resident OnSystemRam -> Resident See ReadyForRendering.
LostResidency | Resident -> OnStorage Resident -> OnSystemRam.
PoolTextureSlotChanged |
ResidentToSysRamSync | Only called while TextureGpu is still Resident, and strategy is AlwaysKeepSystemRamCopy. This listener happens when something was done to the TextureGpu that modifies its contents in the GPU, and were thus forced to sync those values back to SystemRam. This listener calls tells that sync is over.
MetadataCacheOutOfDate | The Metadata cache was out of date and we had to do a ping-pong. Expect this to be followed by at least LostResidency and GainedResidency calls This is very important, because if you were expecting certain sequence of calls (e.g. you were expecting a LostResidency soon to arrive), expect that to be changed. See TextureGpuManager for details about the metadata cache.
ExceptionThrown | Called when the worker thread caught an exception. This exception has already been logged, and the texture resumed loading normally with a white 2x2 RGBA8 fallback. This listener will get called from the main thread. The texture may still have pending residency transitions (e.g. it may still be loading the 2x2 fallback) Cast Exception e = reinterpret_cast<Exception>( extraData ); to know more info
FsaaSettingAlteredByApi | Requested FSAA (MSAA / CSAA / EQAA / etc) is not supported by the API, and thus the setting had to be downgraded. Note this may happen on device lost, and a new GPU became in use; thus it's possible for a TextureGpu to initially support certain FSAA but later change.
ReadyForRendering | This Reason is called when TextureGpu::notifyDataIsReady is called. This normally means worker thread is done loading texture from file and uploading it to GPU; and can now be used for rendering. It does NOT mean that Ogre has finished issueing rendering commands to a RenderTexture and is now ready to be presented to the monitor.
Deleted |

## Constructor & Destructor Documentation

## ◆ CompositorPassUav()

Ogre::CompositorPassUav::CompositorPassUav | ( | const CompositorPassUavDef * | definition,
|  | CompositorNode * | parentNode,
|  | const RenderTargetViewDef * | rtv
| ) |  |

## ◆ ~CompositorPassUav()

virtual Ogre::CompositorPassUav::~CompositorPassUav | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ _placeBarriersAndEmulateUavExecution()

virtual void Ogre::CompositorPassUav::_placeBarriersAndEmulateUavExecution | ( | BoundUav | boundUavs[64],
|  | ResourceAccessMap & | uavsAccess,
|  | ResourceLayoutMap & | resourcesLayout
| ) |  |
| virtual

Emulates the execution of a UAV to understand memory dependencies, and adds a memory barrier / resource transition if we need to.

Remarks
  Note that an UAV->UAV resource transition is just a memory barrier.

Parameters

  boundUavs | [in/out] An array of the currently bound UAVs by slot. The derived class CompositorPassUav will write to them as part of the emulation. The base implementation reads from this value.
  uavsAccess | [in/out] A map with the last access flag used for each RenderTarget. We need it to identify RaR situations, which are the only ones that don't need a barrier (and also WaW hazards, when explicitly allowed by the pass). Note: We will set the access to ResourceAccess::Undefined to signal other passes that the UAV hazard already has a barrier (just in case there was one already created).
  resourcesLayout | [in/out] A map with the current layout of every RenderTarget used so far. Needed to identify if we need to change the resource layout to an UAV.

Reimplemented from Ogre::CompositorPass.

## ◆ _removeAllBarriers()

void Ogre::CompositorPass::_removeAllBarriers | ( | void |  | ) |
| inherited

## ◆ addResourceTransition()

void Ogre::CompositorPass::addResourceTransition | ( | ResourceLayoutMap::iterator | currentLayout,
|  | ResourceLayout::Layout | newLayout,
|  | uint32 | readBarrierBits
| ) |  |
| inherited

## ◆ execute()

virtual void Ogre::CompositorPassUav::execute | ( | const Camera * | lodCamera | ) |
| virtual

Implements Ogre::CompositorPass.

## ◆ getActualDimensions()

Vector2 Ogre::CompositorPass::getActualDimensions | ( | void |  | ) | const
| inherited

## ◆ getDefinition()

const CompositorPassDef* Ogre::CompositorPass::getDefinition | ( | void |  | ) | const
| inlineinherited

## ◆ getParentNode()

const CompositorNode* Ogre::CompositorPass::getParentNode | ( | void |  | ) | const
| inlineinherited

## ◆ getRenderPassDesc()

RenderPassDescriptor* Ogre::CompositorPass::getRenderPassDesc | ( | void |  | ) | const
| inlineinherited

## ◆ getTextureDependencies()

const CompositorTextureVec& Ogre::CompositorPass::getTextureDependencies | ( | void |  | ) | const
| inlineinherited

## ◆ getType()

CompositorPassType Ogre::CompositorPass::getType | ( | void |  | ) | const
| inlineinherited

## ◆ notifyCleared()

virtual void Ogre::CompositorPass::notifyCleared | ( | void |  | ) |
| virtualinherited

@See CompositorNode::_notifyCleared

Reimplemented in Ogre::CompositorPassScene.

## ◆ notifyDestroyed() [1/2]

virtual void Ogre::CompositorPass::notifyDestroyed | ( | const UavBufferPacked * | buffer | ) |
| virtualinherited

## ◆ notifyDestroyed() [2/2]

virtual void Ogre::CompositorPass::notifyDestroyed | ( | TextureGpu * | channel | ) |
| virtualinherited

@See CompositorNode::notifyDestroyed

## ◆ notifyRecreated() [1/2]

virtual bool Ogre::CompositorPass::notifyRecreated | ( | const TextureGpu * | channel | ) |
| virtualinherited

@See CompositorNode::notifyRecreated

Reimplemented in Ogre::CompositorPassMipmap, and Ogre::CompositorPassIblSpecular.

## ◆ notifyRecreated() [2/2]

virtual void Ogre::CompositorPassUav::notifyRecreated | ( | const UavBufferPacked * | oldBuffer,
|  | UavBufferPacked * | newBuffer
| ) |  |
| virtual

Reimplemented from Ogre::CompositorPass.

## ◆ notifyTextureChanged()

virtual void Ogre::CompositorPassUav::notifyTextureChanged | ( | TextureGpu * | texture,
|  | TextureGpuListener::Reason | reason,
|  | void * | extraData
| ) |  |
| virtual

Called when a TextureGpu changed in a way that affects how it is displayed:

1. TextureGpu::notifyDataIsReady got called (texture is ready to be displayed)
2. Texture changed residency status.
3. Texture is being deleted. It won't be a valid pointer after this call.

Implements Ogre::TextureGpuListener.

## ◆ operator delete() [1/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr | ) |
| inlineinherited

## ◆ operator delete() [2/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |
| inlineinherited

## ◆ operator delete() [3/3]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete | ( | void * | ptr,
|  | void * |
| ) |  |
| inlineinherited

## ◆ operator delete[]() [1/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr | ) |
| inlineinherited

## ◆ operator delete[]() [2/2]

template<class Alloc >

void Ogre::AllocatedObject< Alloc >::operator delete[] | ( | void * | ptr,
|  | const char * | ,
|  | int | ,
|  | const char * |
| ) |  |
| inlineinherited

## ◆ operator new() [1/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz | ) |
| inlineinherited

## ◆ operator new() [2/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |
| inlineinherited

operator new, with debug line info

## ◆ operator new() [3/3]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new | ( | size_t | sz,
|  | void * | ptr
| ) |  |
| inlineinherited

placement operator new

## ◆ operator new[]() [1/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz | ) |
| inlineinherited

## ◆ operator new[]() [2/2]

template<class Alloc >

void* Ogre::AllocatedObject< Alloc >::operator new[] | ( | size_t | sz,
|  | const char * | file,
|  | int | line,
|  | const char * | func
| ) |  |
| inlineinherited

array operator new, with debug line info

## ◆ profilingBegin()

void Ogre::CompositorPass::profilingBegin | ( | void |  | ) |
| inherited

## ◆ profilingEnd()

void Ogre::CompositorPass::profilingEnd | ( | void |  | ) |
| inherited

## ◆ resetNumPassesLeft()

virtual void Ogre::CompositorPass::resetNumPassesLeft | ( | void |  | ) |
| virtualinherited

Reimplemented in Ogre::CompositorPassIblSpecular.

## ◆ shouldStayLoaded()

virtual bool Ogre::TextureGpuListener::shouldStayLoaded | ( | TextureGpu * | texture | ) |
| inlinevirtualinherited

Return true if this TextureGpu should likely stay loaded or else graphical changes could occur.

Return false if it is certainly safe to unload.

Reimplemented in Ogre::VctLighting, and Ogre::OGRE_HLMS_TEXTURE_BASE_CLASS.

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

- OgreCompositorPassUav.h