vulkan: Use host cached memory for read buffers Investigation in https://crbug.com/432691010 found that memcpy() reading data from a read only transfer buffer was ~10x slower with Graphite/Dawn/Vulkan when compared to Ganesh/Vulkan. This was identified as being caused by dawn using host coherent memory instead of host cached. Switch BufferVK to use host cached memory for read only transfer buffers, aka those created with only BufferUsage::MapRead|Copydst, to avoid this hangup. BufferVk also has to make explicit flush and invalidate calls for non-host coherent memory. Bug: 432691010 Change-Id: I723f19a75e67fff5b2e45e9bac20b9e948fd3014 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/254435 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Kyle Charbonneau <kylechar@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.