Class UploadBufferDX12
Uploading data to GPU buffer utility
Inheritance
UploadBufferDX12
Assembly: FlaxEngine.dll
File: Engine/GraphicsDevice/DirectX/DX12/UploadBufferDX12.h
Syntax
public class UploadBufferDX12
Constructors
UploadBufferDX12(GPUDeviceDX12* device)
Methods
Allocate(uint64 size, uint64 align)
Allocates memory for custom data in the buffer.
Declaration
public Allocation Allocate(uint64 size, uint64 align)
Parameters
|
uint64
size
Size of the data in bytes |
|
uint64
align
Data alignment in buffer in bytes |
Returns
|
Allocation
Dynamic location |
BeginGeneration(uint64 generation)
Declaration
public void BeginGeneration(uint64 generation)
Parameters
|
uint64
generation
|
ReleaseGPU()
Declaration
public void ReleaseGPU()
UploadBuffer(ID3D12GraphicsCommandList* commandList, ID3D12Resource* buffer, uint32 bufferOffset, const void* data, uint64 size)
Uploads data to the buffer.
Declaration
public void UploadBuffer(ID3D12GraphicsCommandList* commandList, ID3D12Resource* buffer, uint32 bufferOffset, const void* data, uint64 size)
Parameters
|
ID3D12GraphicsCommandList
commandList
GPU command list to record upload command to it |
|
ID3D12Resource
buffer
Destination buffer |
|
uint32
bufferOffset
Destination buffer offset in bytes. |
|
void
data
Data to allocate |
|
uint64
size
Size of the data in bytes |
UploadTexture(ID3D12GraphicsCommandList* commandList, ID3D12Resource* texture, const void* srcData, uint32 srcRowPitch, uint32 srcSlicePitch, int32 mipIndex, int32 arrayIndex)
Uploads data to the texture.
Declaration
public void UploadTexture(ID3D12GraphicsCommandList* commandList, ID3D12Resource* texture, const void* srcData, uint32 srcRowPitch, uint32 srcSlicePitch, int32 mipIndex, int32 arrayIndex)
Parameters
|
ID3D12GraphicsCommandList
commandList
GPU command list to record upload command to it |
|
ID3D12Resource
texture
Destination texture |
|
void
srcData
Data to allocate |
|
uint32
srcRowPitch
Source data row pitch value to upload. |
|
uint32
srcSlicePitch
Source data slice pitch value to upload. |
|
int32
mipIndex
Mip map to stream index |
|
int32
arrayIndex
Texture array index |