UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FTexture2DMipAllocator_AsyncCreate Class Reference

#include <Texture2DMipAllocator_AsyncCreate.h>

+ Inheritance diagram for FTexture2DMipAllocator_AsyncCreate:

Public Member Functions

 FTexture2DMipAllocator_AsyncCreate (UTexture *Texture)
 
 ~FTexture2DMipAllocator_AsyncCreate ()
 
bool AllocateMips (const FTextureUpdateContext &Context, FTextureMipInfoArray &OutMipInfos, const FTextureUpdateSyncOptions &SyncOptions) final override
 
bool UploadMips (const FTextureUpdateContext &Context, const FTextureUpdateSyncOptions &SyncOptions) final override
 
void Cancel (const FTextureUpdateSyncOptions &SyncOptions) final override
 
ETickThread GetCancelThread () const final override
 
- Public Member Functions inherited from FTextureMipAllocator
 FTextureMipAllocator (UTexture *Texture, ETickState InTickState, ETickThread InTickThread)
 
 FTextureMipAllocator (const FTextureMipAllocator &)
 
 FTextureMipAllocator (FTextureMipAllocator &&)
 
virtual ~FTextureMipAllocator ()
 
FORCEINLINE ETickState GetNextTickState () const
 
FORCEINLINE ETickThread GetNextTickThread () const
 
bool FinalizeMips (const FTextureUpdateContext &Context, const FTextureUpdateSyncOptions &SyncOptions)
 
void ExecuteCancel (const FTextureUpdateSyncOptions &SyncOptions)
 
ETickThread ExecuteGetCancelThread () const
 
const FTextureRHIRefGetIntermediateTextureRHI () const
 

Protected Member Functions

void ReleaseAllocatedMipData ()
 
- Protected Member Functions inherited from FTextureMipAllocator
FORCEINLINE void AdvanceTo (ETickState InState, ETickThread InThread)
 

Protected Attributes

int32 FinalSizeX = 0
 
int32 FinalSizeY = 0
 
EPixelFormat FinalFormat = EPixelFormat::PF_Unknown
 
TArray< void *, TInlineAllocator< MAX_TEXTURE_MIP_COUNT > > FinalMipData
 
- Protected Attributes inherited from FTextureMipAllocator
const FStreamableRenderResourceState ResourceState
 
const int32 CurrentFirstLODIdx = INDEX_NONE
 
const int32 PendingFirstLODIdx = INDEX_NONE
 
FTextureRHIRef IntermediateTextureRHI
 

Additional Inherited Members

- Public Types inherited from FTextureMipAllocator
enum class  ETickState : uint32 { AllocateMips , UploadMips , Done }
 
enum class  ETickThread : uint32 { Async , Render , None }
 

Detailed Description

FTexture2DMipAllocator_AsyncCreate implements FTextureMipAllocator using RHIAsyncCreateTexture2D. It uses a more efficient path than FTexture2DMipAllocator_AsyncReallocate because it can run some steps on async threads (and not just on the render thread). Can only be used when GRHISupportsAsyncTextureCreation is true.

Constructor & Destructor Documentation

◆ FTexture2DMipAllocator_AsyncCreate()

FTexture2DMipAllocator_AsyncCreate::FTexture2DMipAllocator_AsyncCreate ( UTexture Texture)

◆ ~FTexture2DMipAllocator_AsyncCreate()

FTexture2DMipAllocator_AsyncCreate::~FTexture2DMipAllocator_AsyncCreate ( )

Member Function Documentation

◆ AllocateMips()

bool FTexture2DMipAllocator_AsyncCreate::AllocateMips ( const FTextureUpdateContext Context,
FTextureMipInfoArray OutMipInfos,
const FTextureUpdateSyncOptions SyncOptions 
)
finaloverridevirtual

Allocate the FTextureMipInfoArray and configure the entries for the new (streamed in) mips. In particular, the FTextureMipAllocator must set valid FTextureMipInfo::DestData so that the mip data provider can write the mip data to.

Parameters
Context- An update context constant throughout the FTextureStreamIn update. Gives things like which texture asset is updated and what mips are streamed in.
OutMipInfos- The array of FTextureMipInfo that must be correctly configured so that FTextureMipDataProvider know what is being requested and where to write data to.
SyncOptions- Different sync options to control when the next tick of FTextureStreamIn can be scheduled.

Return true unless the texture update needs to be aborted because of invalid data or setup.

Implements FTextureMipAllocator.

◆ Cancel()

void FTexture2DMipAllocator_AsyncCreate::Cancel ( const FTextureUpdateSyncOptions SyncOptions)
finaloverridevirtual

Cancel the progression and release any temporary resources. Called within the FTextureStreamIn update when the stream in request is aborted or cannot complete correctly The Cancel() function is called on the thread returned by GetCancelThread().

Parameters
SyncOptions- Different sync options to control when the next tick of FTextureStreamIn can be scheduled.

Implements FTextureMipAllocator.

◆ GetCancelThread()

FTextureMipAllocator::ETickThread FTexture2DMipAllocator_AsyncCreate::GetCancelThread ( ) const
finaloverridevirtual

Implements FTextureMipAllocator.

◆ ReleaseAllocatedMipData()

void FTexture2DMipAllocator_AsyncCreate::ReleaseAllocatedMipData ( )
protected

◆ UploadMips()

bool FTexture2DMipAllocator_AsyncCreate::UploadMips ( const FTextureUpdateContext Context,
const FTextureUpdateSyncOptions SyncOptions 
)
finaloverridevirtual

Upload the new mip data to the GPU. The

Parameters
Context- An update context constant throughout the FTextureStreamIn update. Gives things like which texture asset is updated and what mips are streamed in.
SyncOptions- Different sync options to control when the next tick of FTextureStreamIn can be scheduled.

Return true unless the texture update needs to be aborted because of invalid data or setup.

Implements FTextureMipAllocator.

Member Data Documentation

◆ FinalFormat

EPixelFormat FTexture2DMipAllocator_AsyncCreate::FinalFormat = EPixelFormat::PF_Unknown
protected

◆ FinalMipData

TArray<void*, TInlineAllocator<MAX_TEXTURE_MIP_COUNT> > FTexture2DMipAllocator_AsyncCreate::FinalMipData
protected

◆ FinalSizeX

int32 FTexture2DMipAllocator_AsyncCreate::FinalSizeX = 0
protected

◆ FinalSizeY

int32 FTexture2DMipAllocator_AsyncCreate::FinalSizeY = 0
protected

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