Add feature queries to dawn_native/dawn_wire

This is so we can implement the adapter/device APIs fully
on dawn_wire.

Bug: dawn:689
Change-Id: I47f68157d081f359f871e0efe0d974dfe53de7d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/71521
Reviewed-by: Loko Kung <lokokung@google.com>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng
2021-12-15 00:12:30 +00:00
committed by Dawn LUCI CQ
parent fe1e929d5a
commit 89ddadcd1e
15 changed files with 130 additions and 17 deletions

View File

@@ -19,6 +19,7 @@
#include <unordered_map>
#include <vector>
#include "common/ityp_bitset.h"
#include "dawn/webgpu_cpp.h"
#include "dawn_native/DawnNative.h"
@@ -52,6 +53,9 @@ namespace dawn_native {
void EnableFeature(Feature feature);
bool IsEnabled(Feature feature) const;
bool IsEnabled(wgpu::FeatureName feature) const;
// Returns |count|, the number of features. Writes out all |count| values if |features| is
// non-null.
uint32_t EnumerateFeatures(wgpu::FeatureName* features) const;
std::vector<const char*> GetEnabledFeatureNames() const;
void InitializeDeviceProperties(WGPUDeviceProperties* properties) const;
};