Commit ff9a88ad authored by Jonah Ryan-Davis's avatar Jonah Ryan-Davis Committed by Commit Bot

Remove deprecated reference to angle::SystemInfo::primaryGPUIndex

ANGLE has consolidated primaryGPUIndex into activeGPUIndex, which is
used to represent the expected index of the GPU that graphics calls are
sent to.

Bug: angleproject:3383
Change-Id: Id229f82417bb15e5e07e509beaf559d909b385a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1592115Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Commit-Queue: Jonah Ryan-Davis <jonahr@google.com>
Cr-Commit-Position: refs/heads/master@{#657355}
parent 21723b4c
......@@ -341,24 +341,22 @@ void FillGPUInfoFromSystemInfo(GPUInfo* gpu_info,
if (system_info->gpus.empty()) {
return;
}
if (system_info->primaryGPUIndex < 0) {
system_info->primaryGPUIndex = 0;
if (system_info->activeGPUIndex < 0) {
system_info->activeGPUIndex = 0;
}
angle::GPUDeviceInfo* primary =
&system_info->gpus[system_info->primaryGPUIndex];
angle::GPUDeviceInfo* active =
&system_info->gpus[system_info->activeGPUIndex];
gpu_info->gpu.vendor_id = primary->vendorId;
gpu_info->gpu.device_id = primary->deviceId;
gpu_info->gpu.driver_vendor = std::move(primary->driverVendor);
gpu_info->gpu.driver_version = std::move(primary->driverVersion);
gpu_info->gpu.driver_date = std::move(primary->driverDate);
if (system_info->primaryGPUIndex == system_info->activeGPUIndex) {
gpu_info->gpu.active = true;
}
gpu_info->gpu.vendor_id = active->vendorId;
gpu_info->gpu.device_id = active->deviceId;
gpu_info->gpu.driver_vendor = std::move(active->driverVendor);
gpu_info->gpu.driver_version = std::move(active->driverVersion);
gpu_info->gpu.driver_date = std::move(active->driverDate);
gpu_info->gpu.active = true;
for (size_t i = 0; i < system_info->gpus.size(); i++) {
if (static_cast<int>(i) == system_info->primaryGPUIndex) {
if (static_cast<int>(i) == system_info->activeGPUIndex) {
continue;
}
......@@ -368,9 +366,6 @@ void FillGPUInfoFromSystemInfo(GPUInfo* gpu_info,
device.driver_vendor = std::move(system_info->gpus[i].driverVendor);
device.driver_version = std::move(system_info->gpus[i].driverVersion);
device.driver_date = std::move(system_info->gpus[i].driverDate);
if (static_cast<int>(i) == system_info->activeGPUIndex) {
device.active = true;
}
gpu_info->secondary_gpus.push_back(device);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment