UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FRHIGPUBufferReadback Class Referencefinal

#include <RHIGPUReadback.h>

+ Inheritance diagram for FRHIGPUBufferReadback:

Public Member Functions

RHI_API FRHIGPUBufferReadback (FName RequestName)
 
RHI_API void EnqueueCopy (FRHICommandList &RHICmdList, FRHIBuffer *SourceBuffer, uint32 NumBytes=0) override
 
RHI_API voidLock (uint32 NumBytes) override
 
RHI_API void Unlock () override
 
RHI_API uint64 GetGPUSizeBytes () const
 
- Public Member Functions inherited from FRHIGPUMemoryReadback
 FRHIGPUMemoryReadback (FName RequestName)
 
virtual ~FRHIGPUMemoryReadback ()
 
bool IsReady ()
 
bool IsReady (FRHIGPUMask GPUMask)
 
void Wait (FRHICommandListImmediate &RHICmdList, FRHIGPUMask GPUMask) const
 
virtual void EnqueueCopy (FRHICommandList &RHICmdList, FRHITexture *SourceTexture, const FIntVector &SourcePosition, uint32 SourceSlice, const FIntVector &Size)
 
void EnqueueCopy (FRHICommandList &RHICmdList, FRHITexture *SourceTexture, FResolveRect Rect=FResolveRect(), uint32 SourceSlice=0)
 
const FRHIGPUMaskGetLastCopyGPUMask () const
 
FName GetName () const
 

Additional Inherited Members

- Protected Attributes inherited from FRHIGPUMemoryReadback
FGPUFenceRHIRef Fence
 
FRHIGPUMask LastCopyGPUMask
 
uint32 LastLockGPUIndex
 

Detailed Description

Buffer readback implementation.

Constructor & Destructor Documentation

◆ FRHIGPUBufferReadback()

FRHIGPUBufferReadback::FRHIGPUBufferReadback ( FName  RequestName)

Member Function Documentation

◆ EnqueueCopy()

void FRHIGPUBufferReadback::EnqueueCopy ( FRHICommandList RHICmdList,
FRHIBuffer SourceBuffer,
uint32  NumBytes = 0 
)
overridevirtual

Copy the current state of the resource to the readback data.

Parameters
RHICmdListThe command list to enqueue the copy request on.
SourceBufferThe buffer holding the source data.
NumBytesThe number of bytes to copy. If 0, this will copy the entire buffer.

Reimplemented from FRHIGPUMemoryReadback.

◆ GetGPUSizeBytes()

uint64 FRHIGPUBufferReadback::GetGPUSizeBytes ( ) const

◆ Lock()

void * FRHIGPUBufferReadback::Lock ( uint32  NumBytes)
overridevirtual

Returns the CPU accessible pointer that backs this staging buffer.

Parameters
NumBytesThe maximum number of bytes the host will read from this pointer.
Returns
A CPU accessible pointer to the backing buffer.

Implements FRHIGPUMemoryReadback.

◆ Unlock()

void FRHIGPUBufferReadback::Unlock ( )
overridevirtual

Signals that the host is finished reading from the backing buffer.

Implements FRHIGPUMemoryReadback.


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