All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HdSt_TextureHandleRegistry Class Referencefinal

#include <textureHandleRegistry.h>

Public Member Functions

 HdSt_TextureHandleRegistry (Hgi *hgi)
 ~HdSt_TextureHandleRegistry ()
HDST_API HdStTextureHandleSharedPtr AllocateTextureHandle (const HdStTextureIdentifier &textureId, HdTextureType textureType, const HdSamplerParameters &samplerParams, size_t memoryRequest, bool createBindlessHandle, HdStShaderCodePtr const &shaderCode)
void MarkDirty (HdStTextureObjectPtr const &texture)
void MarkDirty (HdStShaderCodePtr const &shader)
void MarkSamplerGarbageCollectionNeeded ()
HdSt_TextureObjectRegistryGetTextureObjectRegistry () const
HdSt_SamplerObjectRegistryGetSamplerObjectRegistry () const
std::set< HdStShaderCodeSharedPtrCommit ()

Detailed Description

Keeps track of texture handles and allocates the textures and samplers using the HdSt_TextureObjectRegistry, respectively, HdSt_SamplerObjectRegistry. Its responsibilities including tracking what texture handles are associated to a texture, computing the target memory of a texture from the memory requests in the texture handles, triggering sampler and texture garbage collection, and determining what HdStShaderCode instances are affecting by (re-)committing a texture.

Definition at line 73 of file textureHandleRegistry.h.

Constructor & Destructor Documentation

HdSt_TextureHandleRegistry::HdSt_TextureHandleRegistry ( Hgi hgi)
HdSt_TextureHandleRegistry::~HdSt_TextureHandleRegistry ( )

Member Function Documentation

HDST_API HdStTextureHandleSharedPtr HdSt_TextureHandleRegistry::AllocateTextureHandle ( const HdStTextureIdentifier textureId,
HdTextureType  textureType,
const HdSamplerParameters samplerParams,
size_t  memoryRequest,
bool  createBindlessHandle,
HdStShaderCodePtr const shaderCode 

Allocate texture handle (thread-safe).

See HdStResourceRegistry::AllocateTextureHandle for details.

memoryRequestmemoryRequest in bytes.
std::set<HdStShaderCodeSharedPtr> HdSt_TextureHandleRegistry::Commit ( )

Commit textures. Return shader code instances that depend on the (re-)loaded textures so that they can add buffer sources based on the texture meta-data.

Also garbage collect textures and samplers if necessary.

HdSt_SamplerObjectRegistry* HdSt_TextureHandleRegistry::GetSamplerObjectRegistry ( ) const

Get sampler object registry.

Definition at line 122 of file textureHandleRegistry.h.

HdSt_TextureObjectRegistry* HdSt_TextureHandleRegistry::GetTextureObjectRegistry ( ) const

Get texture object registry.

Definition at line 116 of file textureHandleRegistry.h.

void HdSt_TextureHandleRegistry::MarkDirty ( HdStTextureObjectPtr const texture)

Mark texture dirty (thread-safe).

If set, the target memory of the texture will be recomputed during commit and the data structure tracking the associated handles will be updated potentially triggering texture garbage collection.

void HdSt_TextureHandleRegistry::MarkDirty ( HdStShaderCodePtr const shader)

Mark shader dirty (thread-safe).

If set, the shader is scheduled to be updated (i.e., have its AddResourcesFromTextures called) on the next commit.

void HdSt_TextureHandleRegistry::MarkSamplerGarbageCollectionNeeded ( )

Mark that sampler garbage collection needs to happen during next commit (thead-safe).

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