Add validation, storage, and querying of limits

Adds a way to store the limits on the Adapter and the
Device. For now, adapter limits are always the default
limits, and device limits are stored but not used.

This CL also adds usage of an ErrorObjectIdResolver and
Provider in the WGPUDeviceProperties serialization and
deserialization helpers. Serializing/deserializing this
struct should never have objects.

Bug: dawn:685
Change-Id: I1479b4407b0f9ec9f9b2bff62cad7caa693c99d7
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/63983
Commit-Queue: Austin Eng <enga@chromium.org>
Reviewed-by: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Austin Eng
2021-09-13 18:49:09 +00:00
committed by Dawn LUCI CQ
parent caf6e8b3f0
commit 02fbf168e0
17 changed files with 375 additions and 4 deletions

View File

@@ -66,6 +66,8 @@ namespace dawn_native {
std::vector<const char*> requiredExtensions;
std::vector<const char*> forceEnabledToggles;
std::vector<const char*> forceDisabledToggles;
const WGPULimits* requiredLimits = nullptr;
};
// A struct to record the information of a toggle. A toggle is a code path in Dawn device that
@@ -108,6 +110,7 @@ namespace dawn_native {
std::vector<const char*> GetSupportedExtensions() const;
WGPUDeviceProperties GetAdapterProperties() const;
bool GetLimits(WGPULimits* limits) const;
// Check that the Adapter is able to support importing external images. This is necessary
// to implement the swapchain and interop APIs in Chromium.