[native] Update adapter type sorting to deter CPU and unknown adapters. - This change modulates the change in https://dawn-review.git.corp.google.com/c/dawn/+/301355 a bit so that real GPU cards retain OS order when the power preference is undefined, but makes CPU and Undefined adapters sorted later in the list. - The reason we are updating this is because in the bug below, specifically w.r.t the findings in comment#20, there is reason to believe that CPU adapters might be being chosen in some cases for angle tests and potentially causing timeouts. - Note that the fix in CaptureAndReplayTests to remove the glfwTerminate() call is necessary to make those tests avoid destroying resources that are destroyed later on in ~DawnTest. Also, it is important to note that the CaptureAndReplayTests have actually been running on only Swiftshader since the change above landed, and the real hardware testing for these tests have been unintentionally suppressed. This change re-enables those tests which is what caught the bad glfwTerminate() call. Note that I'm not actually positive that removing that call is "correct" but Gemini pointed out that SurfaceTests which does a lot of the same GLFW setup does not call it, and removing it does seem to address some crashes I saw in CQ. Bug: 517972806 Change-Id: I61a3673cf789192b65634b28fc08769f20026d86 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/344555 Commit-Queue: Loko Kung <lokokung@google.com> Reviewed-by: Shrek Shao <shrekshao@google.com> Reviewed-by: 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.