|
VTK
9.7.20261114
|
#include <vtkWebGPUContextDevice2DPrivate.h>
Linear allocator for dynamic WebGPU buffers.
Definition at line 25 of file vtkWebGPUContextDevice2DPrivate.h.
Public Member Functions | |
| vtkWebGPULinearAllocator (const std::string &label) | |
| ~vtkWebGPULinearAllocator () | |
| void | Reset () |
| Resets the internal offset and releases all stale buffers. | |
| uint64_t | Allocate (vtkWebGPUConfiguration *config, uint64_t sizeInBytes, WGPUBufferUsage usage) |
| Reserves a contiguous block of memory in the current WebGPU buffer. | |
| WGPUBuffer | GetBuffer () const |
| Gets the active WebGPU buffer object. | |
|
inline |
Definition at line 28 of file vtkWebGPUContextDevice2DPrivate.h.
|
inline |
Definition at line 33 of file vtkWebGPUContextDevice2DPrivate.h.
|
inline |
Resets the internal offset and releases all stale buffers.
Definition at line 44 of file vtkWebGPUContextDevice2DPrivate.h.
|
inline |
Reserves a contiguous block of memory in the current WebGPU buffer.
If the requested size exceeds the remaining capacity, the current buffer is marked as stale, and a new buffer is allocated (doubling the capacity).
| config | The WebGPU configuration used to create new buffers. |
| sizeInBytes | The exact number of bytes needed. |
| usage | The expected WebGPU usage flags for the buffer. |
Definition at line 66 of file vtkWebGPUContextDevice2DPrivate.h.
|
inline |
Gets the active WebGPU buffer object.
Definition at line 95 of file vtkWebGPUContextDevice2DPrivate.h.