Commit 2269f0f6 authored by zmo@chromium.org's avatar zmo@chromium.org

Use the updated AMD switchable info collection code.

BUG=376562
TEST=
R=kbr@chromium.org

Review URL: https://codereview.chromium.org/332843003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@276865 0039d316-1c4b-4281-b951-d872f2087c98
parent 8f7f2988
......@@ -66,6 +66,8 @@ GPU_EXPORT void MergeGPUInfoGL(GPUInfo* basic_gpu_info,
// Advanced Micro Devices has interesting configurations on laptops were
// there are two videocards that can alternatively a given process output.
// TODO(zmo): remove them when we remove the GetAMDVideocardType() in the
// internal src/third_party/amd.
enum AMDVideoCardType {
UNKNOWN,
STANDALONE,
......
......@@ -363,13 +363,14 @@ void CollectD3D11Support() {
} // namespace anonymous
#if !defined(GOOGLE_CHROME_BUILD)
AMDVideoCardType GetAMDVideocardType() {
return STANDALONE;
void GetAMDVideocardInfo(GPUInfo* gpu_info) {
DCHECK(gpu_info);
return;
}
#else
// This function has a real implementation for official builds that can
// be found in src/third_party/amd.
AMDVideoCardType GetAMDVideocardType();
void GetAMDVideocardInfo(GPUInfo* gpu_info);
#endif
bool CollectDriverInfoD3D(const std::wstring& device_id,
......@@ -433,9 +434,14 @@ bool CollectDriverInfoD3D(const std::wstring& device_id,
// signal the videocard is assumed to be switchable. Additionally,
// some switchable systems with Intel GPUs aren't correctly
// detected, so always count them.
AMDVideoCardType amd_card_type = GetAMDVideocardType();
gpu_info->amd_switchable = (gpu_info->gpu.vendor_id == 0x8086) ||
(amd_card_type != STANDALONE);
GetAMDVideocardInfo(gpu_info);
if (!gpu_info->amd_switchable &&
gpu_info->gpu.vendor_id == 0x8086) {
gpu_info->amd_switchable = true;
gpu_info->secondary_gpus.push_back(gpu_info->gpu);
gpu_info->gpu.vendor_id = 0x1002;
gpu_info->gpu.device_id = 0; // Unknown discrete AMD GPU.
}
}
}
......
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