Add adapterType to WGPUDeviceProperties

This Dawn-internal struct is used to send Adapter information from
the GPU to Renderer process. We need adapterType to determine the
isFallbackAdapter property of GPUAdapter in Chromium.

Bug: chromium:1266550
Change-Id: Ia0457119f45a165e7bdb5b85c43c120391c7001b
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/70580
Reviewed-by: Brandon Jones <bajones@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Auto-Submit: Austin Eng <enga@chromium.org>
This commit is contained in:
Austin Eng 2021-11-23 22:25:56 +00:00 committed by Dawn LUCI CQ
parent 62238ec684
commit 77ac40a7b0
2 changed files with 2 additions and 0 deletions

View File

@ -1108,6 +1108,7 @@
"members": [ "members": [
{"name": "device ID", "type": "uint32_t"}, {"name": "device ID", "type": "uint32_t"},
{"name": "vendor ID", "type": "uint32_t"}, {"name": "vendor ID", "type": "uint32_t"},
{"name": "adapter type", "type": "adapter type"},
{"name": "texture compression BC", "type": "bool", "default": "false"}, {"name": "texture compression BC", "type": "bool", "default": "false"},
{"name": "texture compression ETC2", "type": "bool", "default": "false"}, {"name": "texture compression ETC2", "type": "bool", "default": "false"},
{"name": "texture compression ASTC", "type": "bool", "default": "false"}, {"name": "texture compression ASTC", "type": "bool", "default": "false"},

View File

@ -111,6 +111,7 @@ namespace dawn_native {
WGPUDeviceProperties adapterProperties = {}; WGPUDeviceProperties adapterProperties = {};
adapterProperties.deviceID = mPCIInfo.deviceId; adapterProperties.deviceID = mPCIInfo.deviceId;
adapterProperties.vendorID = mPCIInfo.vendorId; adapterProperties.vendorID = mPCIInfo.vendorId;
adapterProperties.adapterType = static_cast<WGPUAdapterType>(mAdapterType);
mSupportedFeatures.InitializeDeviceProperties(&adapterProperties); mSupportedFeatures.InitializeDeviceProperties(&adapterProperties);
// This is OK for now because there are no limit feature structs. // This is OK for now because there are no limit feature structs.