VR-Forces 5.0.3 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
makVrv::DtGlTextureResidencyManager Class Reference

helper class to handle texture residency

Public Types

typedef std::map< unsigned int,
int
TexIDToCount
 
typedef std::map< void
*, TexIDToCount
ContextToTexID
 

Public Member Functions

 DtGlTextureResidencyManager ()
 
virtual ~DtGlTextureResidencyManager ()
 
 DtGlTextureResidencyManager (const DtGlTextureResidencyManager &)=delete
 
DtGlTextureResidencyManageroperator= (const DtGlTextureResidencyManager &)=delete
 
virtual void makeResidentIfNecessary (void *gContext, GLuint textureID)
 
virtual bool makeNonResidentIfNecessary (void *gContext, GLuint textureID, bool canDelete)
 
virtual void deletingTexture (GLuint textureID)
 
virtual bool ensureTextureIsResident (GLuint textureID, GLuint64 textureAddress)
 
virtual GLuint64 gpuTextureAddress (GLuint textureID) const
 
virtual bool isTexture (GLuint textureID) const
 
virtual
DtGlTextureResidentMemoryTracker
tracker () const
 
virtual void setAllowNvidiaBindlessFix (bool enable)
 

Protected Member Functions

virtual
DtGlTextureResidentMemoryTracker
getOrCreateTracker (void *graphicsContext)
 

Protected Attributes

ContextToTexID myTextureCountByContext
 
TexIDToCount myTextureIdToRefCountAcrossContexts
 
std::unordered_map< void
*, DtGlTextureResidentMemoryTracker * > 
myContextsToTrackers
 
std::unordered_map< GLuint, boolmyTextureIsResidentMap
 
bool myAllowNvidiaBindlessFix
 

Member Typedef Documentation

Constructor & Destructor Documentation

makVrv::DtGlTextureResidencyManager::DtGlTextureResidencyManager ( )

constructor

virtual makVrv::DtGlTextureResidencyManager::~DtGlTextureResidencyManager ( )
virtual

destructor

makVrv::DtGlTextureResidencyManager::DtGlTextureResidencyManager ( const DtGlTextureResidencyManager )
delete

not allowed

Member Function Documentation

DtGlTextureResidencyManager& makVrv::DtGlTextureResidencyManager::operator= ( const DtGlTextureResidencyManager )
delete

not allowed

virtual void makVrv::DtGlTextureResidencyManager::makeResidentIfNecessary ( void *  gContext,
GLuint  textureID 
)
virtual

Check if a texture is resident in a given context. If not, make it resident.

virtual bool makVrv::DtGlTextureResidencyManager::makeNonResidentIfNecessary ( void *  gContext,
GLuint  textureID,
bool  canDelete 
)
virtual

Make a texture non-resident in GPU memory If canDelete=true, the function will try to delete the texture and return true if it succeeded in deleting the texture.

virtual void makVrv::DtGlTextureResidencyManager::deletingTexture ( GLuint  textureID)
virtual

Called from the GlDeleteObjectManager when the texture is about to be deleted.

virtual bool makVrv::DtGlTextureResidencyManager::ensureTextureIsResident ( GLuint  textureID,
GLuint64  textureAddress 
)
virtual

Checks to see if the given texture is GPU resident. If it is not a texture or not resident, then false is returned.

virtual GLuint64 makVrv::DtGlTextureResidencyManager::gpuTextureAddress ( GLuint  textureID) const
virtual

Get the Gpu address of a texture.

virtual bool makVrv::DtGlTextureResidencyManager::isTexture ( GLuint  textureID) const
virtual

check if the texture is in fact an OpenGL texture

virtual DtGlTextureResidentMemoryTracker* makVrv::DtGlTextureResidencyManager::tracker ( ) const
virtual

get a tracker since residency is per gc, there's a tracker per gc just get the first tracker in our map

virtual void makVrv::DtGlTextureResidencyManager::setAllowNvidiaBindlessFix ( bool  enable)
virtual

see comments for myTextureIsResidentMap.

virtual DtGlTextureResidentMemoryTracker* makVrv::DtGlTextureResidencyManager::getOrCreateTracker ( void *  graphicsContext)
protectedvirtual

get or create the tracker.

Member Data Documentation

ContextToTexID makVrv::DtGlTextureResidencyManager::myTextureCountByContext
protected
TexIDToCount makVrv::DtGlTextureResidencyManager::myTextureIdToRefCountAcrossContexts
protected
std::unordered_map<void*, DtGlTextureResidentMemoryTracker*> makVrv::DtGlTextureResidencyManager::myContextsToTrackers
protected
std::unordered_map<GLuint, bool> makVrv::DtGlTextureResidencyManager::myTextureIsResidentMap
protected
bool makVrv::DtGlTextureResidencyManager::myAllowNvidiaBindlessFix
protected

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

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)