Commit 26c8862d authored by rouslan@chromium.org's avatar rouslan@chromium.org

Revert of Use the updated AMD switchable info collection code....

Revert of Use the updated AMD switchable info collection code. (https://codereview.chromium.org/332843003/)

Reason for revert:
The patch appears to have broken windows perf bot:

http://build.chromium.org/p/chromium.perf/builders/Win%20Builder/builds/69732

Original issue's description:
> Use the updated AMD switchable info collection code.
> 
> BUG=376562
> TEST=
> R=kbr@chromium.org
> 
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=276865

TBR=kbr@chromium.org,zmo@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=376562

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

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