Navigation
API > API/Runtime > API/Runtime/RHI > API/Runtime/RHI/FDynamicRHI
Description
Lock a staging buffer to read contents on the CPU that were written by the GPU, without having to stall. @discussion This function requires that you have issued an CopyToStagingBuffer invocation and verified that the FRHIGPUFence has been signaled before calling.
| Name | RHILockStagingBuffer |
| Type | function |
| Header File | /Engine/Source/Runtime/RHI/Public/DynamicRHI.h |
| Include Path | #include "DynamicRHI.h" |
| Source | /Engine/Source/Runtime/RHI/Private/RHICommandList.cpp |
virtual void * RHILockStagingBuffer
(
FRHIStagingBuffer * StagingBuffer,
FRHIGPUFence * Fence,
uint32 Offset,
uint32 SizeRHI
)
A pointer to the data starting at 'Offset' and of length 'SizeRHI' from 'StagingBuffer', or nullptr when there is an error.
Parameters
| Name | Remarks |
|---|---|
| StagingBuffer | The buffer to lock. |
| Fence | An optional fence synchronized with the last buffer update. |
| Offset | The offset in the buffer to return. |
| SizeRHI | The length of the region in the buffer to lock. |