Skip to content
Snippets Groups Projects
Verified Commit 88c6d304 authored by Jaswant Panchumarti (Kitware)'s avatar Jaswant Panchumarti (Kitware)
Browse files

vtkWebGPUPolyDataMapper: Redo buffer uploads using writeBuffer

- turns out `writeBuffer` is the best way to efficiently upload data to device on wasm since emscripten doesn't make another copy on the wasm heap when `writeBuffer` is used.
parent dec42239
No related branches found
No related tags found
No related merge requests found
......@@ -22,11 +22,6 @@ VTK_ABI_NAMESPACE_BEGIN
class VTKRENDERINGWEBGPU_EXPORT vtkWebGPUInternalsBuffer
{
public:
/**
* Creates a buffer on the device and schedules a writeBuffer on the queue.
* Please prefer doing it yourself for larger buffers on WASM with mappedAtCreation=true
* instead of this approach to avoid an extra copy from WASM Heap.
*/
static wgpu::Buffer Upload(const wgpu::Device& device, unsigned long offset, void* data,
unsigned long sizeBytes, wgpu::BufferUsage usage, const char* label = nullptr);
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment