Struct SparseUploader
Provides utility methods that you can use to upload data into GPU memory.
Namespace: Unity.Rendering
Assembly: solution.dll
Syntax
public struct SparseUploader
Remarks
To add uploads from jobs, use a ThreadedSparseUploader which you can create using SparseUploader.Begin. If you add uploads from jobs, the ThreadedSparseUploader submits them to the GPU in a series of compute shader dispatches when you call SparseUploader.EndAndCommit.
Constructors
Name | Description |
---|---|
Sparse |
Constructs a new sparse uploader with the specified buffer as the target. |
Methods
Name | Description |
---|---|
Begin(int, int, int) | Begins a new upload frame and returns a new ThreadedSparseUploader that is valid until the next call to SparseUploader.EndAndCommit. |
Compute |
Calculates statistics about the current and previous frame uploads. |
Dispose() | Disposes of the SparseUploader. |
End |
Ends an upload frame and dispatches any upload operations added to the passed in ThreadedSparseUploader. |
Frame |
Cleans up internal data and recovers buffers into the free buffer pool. |
Replace |
Replaces the destination GPU buffer with a new one. |