Choose your operating system:
Windows
macOS
Linux
Module |
|
Header |
/Engine/Source/Runtime/RHI/Public/RHIDefinitions.h |
Include |
#include "RHIDefinitions.h" |
enum EBufferUsageFlags
{
None = 0,
Static = 1 << 0,
Dynamic = 1 << 1,
Volatile = 1 << 2,
UnorderedAccess = 1 << 3,
ByteAddressBuffer = 1 << 4,
SourceCopy = 1 << 5,
StreamOutput = 1 << 6,
DrawIndirect = 1 << 7,
ShaderResource = 1 << 8,
KeepCPUAccessible = 1 << 9,
FastVRAM = 1 << 10,
Shared = 1 << 12,
AccelerationStructure = 1 << 13,
VertexBuffer = 1 << 14,
IndexBuffer = 1 << 15,
StructuredBuffer = 1 << 16,
MultiGPUAllocate = 1 << 17,
MultiGPUGraphIgnore = 1 << 18,
AnyDynamic = (Dynamic | Volatile),
}
Name |
Description |
---|---|
None |
|
Static |
The buffer will be written to once. |
Dynamic |
The buffer will be written to occasionally, GPU read only, CPU write only. |
Volatile |
The buffer's data will have a lifetime of one frame. |
UnorderedAccess |
Allows an unordered access view to be created for the buffer. |
ByteAddressBuffer |
Create a byte address buffer, which is basically a structured buffer with a uint32 type. |
SourceCopy |
Buffer that the GPU will use as a source for a copy. |
StreamOutput |
Create a buffer that can be bound as a stream output target. |
DrawIndirect |
Create a buffer which contains the arguments used by DispatchIndirect or DrawIndirect. |
ShaderResource |
Create a buffer that can be bound as a shader resource. |
KeepCPUAccessible |
Request that this buffer is directly CPU accessible. |
FastVRAM |
Buffer should go in fast vram (hint only). Requires BUF_Transient |
Shared |
Buffer should be allocated from transient memory. |
AccelerationStructure |
Buffer contains opaque ray tracing acceleration structure data. |
VertexBuffer |
|
IndexBuffer |
|
StructuredBuffer |
|
MultiGPUAllocate |
Buffer memory is allocated independently for multiple GPUs, rather than shared via driver aliasing |
MultiGPUGraphIgnore |
Tells the render graph to not bother transferring across GPUs in multi-GPU scenarios. |
AnyDynamic |
Helper bit-masks. |
Resource usage flags - for vertex and index buffers.