[dawn] Don't sort adapters by type when no power preference is specified When powerPreference is Undefined, sorting adapters by type is unnecessary and can override the order returned by the OS/driver. Preserving that order lets users control adapter preference through OS system settings (e.g. Windows Graphics Settings per-app GPU preference), which is the expected behavior when no explicit preference is requested. This is achieved by assigning equal adapter type rank to all adapters when no power preference is given, combined with switching to stable_sort so that the original OS-provided order is preserved for adapters with equal rank (whether due to no power preference or to genuinely equal ranks under a specified preference). Bug: 499921569 Change-Id: I4a461be914212763299193bbb39ed40a6bd23b81 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/301355 Reviewed-by: Kai Ninomiya <kainino@chromium.org> Commit-Queue: Quyen Le <lehoangquyen@chromium.org>
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.