Module |
|
Header |
/Engine/Source/Runtime/Engine/Public/GPUSortManager.h |
Include |
#include "GPUSortManager.h" |
Source |
/Engine/Source/Runtime/Engine/Private/GPUSortManager.cpp |
void CopyUIntBufferToTargets
(
FRHICommandListImmediate & RHICmdList,
ERHIFeatureLevel::Type FeatureLevel,
FRHIShaderResourceView * SourceSRV,
FRHIUnorderedAccessView *const * TargetUAVs,
int32 * TargetSizes,
int32 StartingOffset,
int32 NumTargets
)
Copy one uint buffer into several overlapping targets. Each target is expected to be bigger than the previous one, so that copy resumes where it left. Ex : (ABCDEFGHIJK) -> (ABC, DEFGHI-, ------JK) This is essentially used to manage growable buffers in cases the binding needs to be set before the final size required is known. In this scenario, the smaller buffers are temporary and only the final (biggest) buffer becomes persistent, this is why it has apparently unused space at the beginning but it will be used the next frame to hold all of the data. Note that required calls to RHICmdList.TransitionResource need to be handled before and after this function.
Parameter |
Description |
---|---|
RHICmdList |
The command list used to issue the dispatch. |
FeatureLevel |
The current feature level, used to access the global shadermap. |
SourceSRV |
The source uint buffer to be copied into the others. |
TargetUAVs |
The destination overlapping uint buffers. |
TargetSizes |
The copy size of each of the buffers. Once a buffer size is reached, the copy targets the next buffer. |
StartingOffset |
The starting position at which the copy starts. Applies for both the source and targets. |
NumTargets |
The number of elements in TargetUAVs and TargetSizes. |