Method AddUpload
AddUpload(void*, int, int, int)
Adds a new pending upload operation to execute when you call SparseUploader.EndAndCommit.
Declaration
public void AddUpload(void* src, int size, int offsetInBytes, int repeatCount = 1)
Parameters
Type | Name | Description |
---|---|---|
void* | src | The source pointer of data to upload. |
int | size | The amount of data, in bytes, to read from the source pointer. |
int | offsetInBytes | The destination offset of the data in the GPU buffer. |
int | repeatCount | The number of times to repeat the source data in the destination buffer when uploading. |
Remarks
When this operation executes, the SparseUploader copies data from the source pointer.
AddUpload<T>(T, int, int)
Adds a new pending upload operation to execute when you call SparseUploader.EndAndCommit.
Declaration
public void AddUpload<T>(T val, int offsetInBytes, int repeatCount = 1) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
T | val | The source data to upload. |
int | offsetInBytes | The destination offset of the data in the GPU buffer. |
int | repeatCount | The number of times to repeat the source data in the destination buffer when uploading. |
Type Parameters
Name | Description |
---|---|
T | Any unmanaged simple type. |
Remarks
When this operation executes, the SparseUploader copies data from the source value.
AddUpload<T>(NativeArray<T>, int, int)
Adds a new pending upload operation to execute when you call SparseUploader.EndAndCommit.
Declaration
public void AddUpload<T>(NativeArray<T> array, int offsetInBytes, int repeatCount = 1) where T : unmanaged
Parameters
Type | Name | Description |
---|---|---|
Native |
array | The source array of data to upload. |
int | offsetInBytes | The destination offset of the data in the GPU buffer. |
int | repeatCount | The number of times to repeat the source data in the destination buffer when uploading. |
Type Parameters
Name | Description |
---|---|
T | Any unmanaged simple type. |
Remarks
When this operation executes, the SparseUploader copies data from the source array.