author | Robert Mader <robert.mader@posteo.de> |
Wed, 23 Jun 2021 21:25:23 +0000 | |
changeset 584195 | 240cbdff5521cadcc818770a074db3c67a8324fe |
parent 584194 | 3b2212d68b0849890b35d676bfb2cdba1e3df2ad |
child 584196 | 9d21dce2fa37d04dfaa172ba7cd353980b4b410b |
push id | 38561 |
push user | nbeleuzu@mozilla.com |
push date | Thu, 24 Jun 2021 02:39:52 +0000 |
treeherder | mozilla-central@1f6c9c348681 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | aosmond |
bugs | 1717857 |
milestone | 91.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
--- a/widget/gtk/GfxInfo.cpp +++ b/widget/gtk/GfxInfo.cpp @@ -308,16 +308,24 @@ void GfxInfo::GetData() { if (!mesaVendor.IsEmpty()) { mVendorId = mesaVendor; } if (!mesaDevice.IsEmpty()) { mDeviceId = mesaDevice; } + + if (!mIsAccelerated && mVendorId.IsEmpty()) { + mVendorId.Assign(glVendor.get()); + } + + if (!mIsAccelerated && mDeviceId.IsEmpty()) { + mDeviceId.Assign(glRenderer.get()); + } } else if (glVendor.EqualsLiteral("NVIDIA Corporation")) { CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(DeviceVendor::NVIDIA), mVendorId); mDriverVendor.AssignLiteral("nvidia/unknown"); // TODO: Use NV-CONTROL X11 extension to query Device ID and VRAM. } else if (glVendor.EqualsLiteral("ATI Technologies Inc.")) { CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(DeviceVendor::ATI), mVendorId); @@ -389,34 +397,40 @@ void GfxInfo::GetData() { CopyUTF16toUTF8(GfxDriverInfo::GetDeviceVendor(DeviceVendor::Qualcomm), mVendorId); } } } // If we still don't have a vendor ID, we can try the PCI vendor list. if (mVendorId.IsEmpty()) { - if (pciVendors.Length() == 1) { - mVendorId = pciVendors[0]; - } else if (pciVendors.IsEmpty()) { + if (pciVendors.IsEmpty()) { gfxCriticalNote << "No GPUs detected via PCI"; } else { - gfxCriticalNote - << "More than 1 GPU detected via PCI, cannot deduce vendor"; + for (size_t i = 0; i < pciVendors.Length(); ++i) { + if (mVendorId.IsEmpty()) { + mVendorId = pciVendors[i]; + } else if (mVendorId != pciVendors[i]) { + gfxCriticalNote << "More than 1 GPU vendor detected via PCI, cannot " + "deduce vendor"; + mVendorId.Truncate(); + break; + } + } } } // If we know the vendor ID, but didn't get a device ID, we can guess from the // PCI device list. if (mDeviceId.IsEmpty() && !mVendorId.IsEmpty()) { for (size_t i = 0; i < pciLen; ++i) { if (mVendorId.Equals(pciVendors[i])) { if (mDeviceId.IsEmpty()) { mDeviceId = pciDevices[i]; - } else { + } else if (mDeviceId != pciDevices[i]) { gfxCriticalNote << "More than 1 GPU from same vendor detected via " "PCI, cannot deduce device"; mDeviceId.Truncate(); break; } } } }