native: Recycle CommandAllocator blocks with MemoryBlockAllocator CommandAllocator allocated and freed its blocks from scratch every time a command buffer was recorded and destroyed, so steady-state recording (record -> submit -> destroy -> record) paid a fresh allocation for every block of every command buffer. Wire CommandAllocator to use MemoryBlockAllocator, a device-owned pool that recycles fixed-size blocks (default 16KB). DeviceBase owns the pool in mMemoryBlockAllocator and drives Tick() and TrimMemory() from its own Tick() and ReduceMemoryUsage() paths. CommandAllocator and CommandIterator return un-acquired blocks back to the pool during command destruction. Bug: 533386841 Change-Id: I6b062779f675c6073141cfa74fec3e54fc66b2a6 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/323835 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@google.com>
Dawn is an open-source and cross-platform implementation of the WebGPU standard. More precisely it implements webgpu.h that is a one-to-one mapping with the WebGPU IDL. Dawn is meant to be integrated as part of a larger system and is the underlying implementation of WebGPU in Chromium.
Dawn provides several WebGPU building blocks:
webgpu.h version that Dawn implements.webgpu.h.Helpful links:
Developer documentation:
User documentation: (TODO, figure out what overlaps with the webgpu.h docs)
BSD 3-Clause License, please see LICENSE.
This is not an officially supported Google product.