Record the first needed feature when checking capabilities. Currently as the `InitialCapsAddedBy` entries are processed, if a feature isn't supported the feature set as the `unsupportedReason` but, if a format like `R16Unorm` is in two separate features then it will overwrite the `unsupportedReason` with the later feature name. This is only the case for the entries in `Unorm16TextureFormats` at the moment, but if that feature is missing and `TextureFormatsTier1` is also missing the error is always for `TextureFormatsTier1`. On some machines, the more general `TextureFormatsTier1` is not supported when `Unorm16TextureFormats` is supported, the current error message gives no way to know you could enable the more specific feature. This CL changes the error reporting such that if a `unsupportedReason` is set it does not overrwrite with a later feature. So, we'll get the earlier `Unorm16TextureFormats` as the missing feature. Change-Id: I58314c221629ae4790a0e5f4c91cbbb910d72e81 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/290338 Reviewed-by: Loko Kung <lokokung@google.com> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: dan sinclair <dsinclair@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.