| 999 | } |
| 1000 | |
| 1001 | void vtkWebGPUConfiguration::DumpMemoryStatistics() |
| 1002 | { |
| 1003 | #if VTK_USE_DAWN_WEBGPU |
| 1004 | auto* memoryDump = new DawnMemoryDump(); |
| 1005 | dawn::native::DumpMemoryStatistics(this->GetDevice().Get(), memoryDump); |
| 1006 | std::ostringstream os; |
| 1007 | memoryDump->PrintSelf(os, vtkIndent()); |
| 1008 | vtkVLog(this->GetGPUMemoryLogVerbosity(), << os.str()); |
| 1009 | delete memoryDump; |
| 1010 | #else |
| 1011 | // Cannot do anything here because we don't know if the textures/buffers |
| 1012 | // created through `this->CreateTexture` or `this->CreateBuffer` are still alive. |
| 1013 | vtkVLog(this->GetGPUMemoryLogVerbosity(), |
| 1014 | "Cannot determine memory statistics for allocated webgpu objects in this webgpu " |
| 1015 | "implementation"); |
| 1016 | #endif |
| 1017 | } |
| 1018 | VTK_ABI_NAMESPACE_END |