#include <OgreResourceTransition.h>
|
void | assumeTransition (TextureGpu *texture, ResourceLayout::Layout newLayout, ResourceAccess::ResourceAccess access, uint8 stageMask) |
| Tell the solver the texture has been transitioned to a different layout, externally. More...
|
|
void | assumeTransitions (ResourceStatusMap &resourceStatus) |
| Tell the solver all these resources have been transitioned to a different layout, externally. More...
|
|
ResourceTransitionArray & | getNewResourceTransitionsArrayTmp () |
| Returns a temporary array variable that can be reused to avoid needless reallocations You're not forced to use it, but it will increase performance. More...
|
|
const ResourceStatusMap & | getResourceStatus () |
|
void | reset () |
|
void | resolveTransition (ResourceTransitionArray &resourceTransitions, GpuTrackedResource *bufferRes, ResourceAccess::ResourceAccess access, uint8 stageMask) |
| Same as the other overload, but meant for buffers. More...
|
|
void | resolveTransition (ResourceTransitionArray &resourceTransitions, TextureGpu *texture, ResourceLayout::Layout newLayout, ResourceAccess::ResourceAccess access, uint8 stageMask) |
| By specifying how a texture will be used next, this function figures out the necessary barriers that may be required and outputs to resourceTransitions while storing the current state in mResourceStatus so the next calls to resolveTransition know what was the last usage. More...
|
|
void | textureDeleted (TextureGpu *texture) |
| Similar to our notifyTextureChanged overload, to delete what is in mResourceStatus. More...
|
|
◆ assumeTransition()
Tell the solver the texture has been transitioned to a different layout, externally.
- Parameters
-
newLayout | |
access | |
stageMask | |
◆ assumeTransitions()
Tell the solver all these resources have been transitioned to a different layout, externally.
◆ getNewResourceTransitionsArrayTmp()
Returns a temporary array variable that can be reused to avoid needless reallocations You're not forced to use it, but it will increase performance.
Beware not to have it in use in two places at the same time! Use it as soon as possible
References Ogre::FastArray< T >::clear().
◆ getResourceStatus()
◆ reset()
void Ogre::BarrierSolver::reset |
( |
| ) |
|
◆ resolveTransition() [1/2]
Same as the other overload, but meant for buffers.
◆ resolveTransition() [2/2]
By specifying how a texture will be used next, this function figures out the necessary barriers that may be required and outputs to resourceTransitions while storing the current state in mResourceStatus so the next calls to resolveTransition know what was the last usage.
- Parameters
-
resourceTransitions | [in/out] Barriers created so far that will be executed as a single sync point. This variable may or may not be modified depending of whether a barrier is needed |
texture | The texture you want to use |
newLayout | How the texture will be used next |
access | The kind of access: Read, Write, R/W. |
stageMask | Bitmask of the shader stages that will be using this texture after this transition. Only useful when transitioning to ResourceLayout::Texture and ResourceLayout::Uav. Must be 0 otherwise. |
◆ textureDeleted()
void Ogre::BarrierSolver::textureDeleted |
( |
TextureGpu * |
texture | ) |
|
Similar to our notifyTextureChanged overload, to delete what is in mResourceStatus.
However:
- mCopyStateTextures needs a O(N) search. It is rare for us to put textures there so we use texture->addListener() and notifyTextureChanged to get notified when a texture living in mCopyStateTextures needs to be searched and removed
- mResourceStatus is an std::map, and many textures can end up there so it could be rather inefficient to call addListener / removeListener frequently Just searching in mResourceStatus should be quite fast. Thus TextureGpuManager will call this function for all textures
The documentation for this class was generated from the following file: