vulkan: Change mappable buffer memory selection logic For BufferMapExtendedUsages buffers that are read mappable make it prefer HOST_CACHED for instead of HOST_COHERENT. This matches the logic for mappable non-device local buffers already. For BufferMapExtendedUsages buffers that are write mappable make it prefer HOST_COHERENT over HOST_COHERENT+HOST_CACHED. This is based on ARM guidance from [1] and the fact that HOST_CACHED might have overhead but can't help if there is no CPU read access. For read+write mappable buffers they still prefer HOST_COHERENT+HOST_CACHED. If a memory type with both is not available they will now prefer HOST_CACHED memory over HOST_COHERENT memory. This also moves all the HOST_CACHED vs HOST_COHERENT logic out of GetRequiredMemoryPropertyFlags() since neither is actually required. [1] https://developer.arm.com/documentation/101897/0304/CPU-overheads/Vulkan-CPU-memory-mapping Bug: 422798184 Change-Id: I2727ad64a3f804257aa74c203ada9ddf3209ffff Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/265474 Reviewed-by: Shahbaz Youssefi <syoussefi@google.com> Reviewed-by: Corentin Wallez <cwallez@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.