mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-10 05:57:51 +00:00
Rename DeviceDescriptor -> DawnDeviceDescriptor
This is preventing supporting DeviceDescriptor from upstream webgpu.h because the name conflicts with the existing struct. A typedef using the original name DeviceDescriptor is added until all embedders of Dawn are updated to use the new name. Bug: dawn:160, dawn:689 Change-Id: Ib9cb7443b7e46e3ffe29d2ec109f2f1a831754e7 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70581 Reviewed-by: Brandon Jones <bajones@chromium.org> Commit-Queue: Austin Eng <enga@chromium.org>
This commit is contained in:
@@ -62,7 +62,7 @@ namespace dawn_native {
|
||||
|
||||
// An optional parameter of Adapter::CreateDevice() to send additional information when creating
|
||||
// a Device. For example, we can use it to enable a workaround, optimization or feature.
|
||||
struct DAWN_NATIVE_EXPORT DeviceDescriptor {
|
||||
struct DAWN_NATIVE_EXPORT DawnDeviceDescriptor {
|
||||
std::vector<const char*> requiredFeatures;
|
||||
std::vector<const char*> forceEnabledToggles;
|
||||
std::vector<const char*> forceDisabledToggles;
|
||||
@@ -70,6 +70,10 @@ namespace dawn_native {
|
||||
const WGPURequiredLimits* requiredLimits = nullptr;
|
||||
};
|
||||
|
||||
// TODO(crbug.com/dawn/160): Remove when embedders of Dawn are updated to use
|
||||
// DawnDeviceDescriptor.
|
||||
using DeviceDescriptor = DawnDeviceDescriptor;
|
||||
|
||||
// A struct to record the information of a toggle. A toggle is a code path in Dawn device that
|
||||
// can be manually configured to run or not outside Dawn, including workarounds, special
|
||||
// features and optimizations.
|
||||
@@ -124,9 +128,9 @@ namespace dawn_native {
|
||||
// Create a device on this adapter, note that the interface will change to include at least
|
||||
// a device descriptor and a pointer to backend specific options.
|
||||
// On an error, nullptr is returned.
|
||||
WGPUDevice CreateDevice(const DeviceDescriptor* deviceDescriptor = nullptr);
|
||||
WGPUDevice CreateDevice(const DawnDeviceDescriptor* deviceDescriptor = nullptr);
|
||||
|
||||
void RequestDevice(const DeviceDescriptor* descriptor,
|
||||
void RequestDevice(const DawnDeviceDescriptor* descriptor,
|
||||
WGPURequestDeviceCallback callback,
|
||||
void* userdata);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user