2020-03-03 21:35:05 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: Deepak Mohan <hop2deep@gmail.com>
|
|
|
|
Date: Fri, 28 Feb 2020 15:08:26 -0800
|
|
|
|
Subject: gpu: notify when dxdiag request for gpu info fails
|
|
|
|
|
|
|
|
We rely on the signal OnGpuInfoUpdate to process gpu info.
|
|
|
|
When Electron wants to collect the complete info in a single run
|
|
|
|
it checks for the presence of dx_diagnostics attribute, as these
|
|
|
|
are the only async calls that happens in the gpu process, but
|
|
|
|
there are times when this call can fail due to crash or software
|
|
|
|
rendering and there is no signal from browser process on this event
|
|
|
|
to identify it.
|
|
|
|
|
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
|
2020-06-22 17:35:10 +00:00
|
|
|
index 572ada5883716fcd7f8d1eb274405308747efa38..106f3237db5482b511789158229269cf2c42df83 100644
|
2020-03-03 21:35:05 +00:00
|
|
|
--- a/content/browser/gpu/gpu_data_manager_impl.cc
|
|
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
|
2020-06-22 17:35:10 +00:00
|
|
|
@@ -174,6 +174,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
|
2020-03-03 21:35:05 +00:00
|
|
|
base::AutoLock auto_lock(lock_);
|
2020-04-21 00:25:38 +00:00
|
|
|
private_->TerminateInfoCollectionGpuProcess();
|
2020-03-03 21:35:05 +00:00
|
|
|
}
|
2020-04-21 00:25:38 +00:00
|
|
|
+
|
2020-03-03 21:35:05 +00:00
|
|
|
+bool GpuDataManagerImpl::DxdiagDx12VulkanRequested() const {
|
|
|
|
+ base::AutoLock auto_lock(lock_);
|
|
|
|
+ return private_->DxdiagDx12VulkanRequested();
|
|
|
|
+}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void GpuDataManagerImpl::UpdateGpuFeatureInfo(
|
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
2020-06-22 17:35:10 +00:00
|
|
|
index 10cec4f37ad3ac13816047b9bbd44323af28627f..7cd91daede31c29d6f231f9a351326c3747872c4 100644
|
2020-03-03 21:35:05 +00:00
|
|
|
--- a/content/browser/gpu/gpu_data_manager_impl.h
|
|
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl.h
|
2020-04-21 00:25:38 +00:00
|
|
|
@@ -93,6 +93,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
2020-03-14 20:54:14 +00:00
|
|
|
// Called from BrowserMainLoop::BrowserThreadsStarted().
|
|
|
|
void OnBrowserThreadsStarted();
|
2020-04-21 00:25:38 +00:00
|
|
|
void TerminateInfoCollectionGpuProcess();
|
2020-03-03 21:35:05 +00:00
|
|
|
+ bool DxdiagDx12VulkanRequested() const;
|
|
|
|
#endif
|
|
|
|
// Update the GPU feature info. This updates the blacklist and enabled status
|
|
|
|
// of GPU rasterization. In the future this will be used for more features.
|
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
2020-06-22 17:35:10 +00:00
|
|
|
index b93f088bc12209b62fb12ecd2c7e635359127810..5b1ea3da37892ccd893b09cdc13367ae824fff94 100644
|
2020-03-03 21:35:05 +00:00
|
|
|
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
|
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
2020-06-22 17:35:10 +00:00
|
|
|
@@ -970,6 +970,10 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
2020-04-21 00:25:38 +00:00
|
|
|
host->ForceShutdown();
|
2020-03-03 21:35:05 +00:00
|
|
|
}
|
2020-03-14 20:54:14 +00:00
|
|
|
|
2020-03-03 21:35:05 +00:00
|
|
|
+bool GpuDataManagerImplPrivate::DxdiagDx12VulkanRequested() const {
|
|
|
|
+ return !(gpu_info_dx12_vulkan_request_failed_ ||
|
|
|
|
+ gpu_info_dx_diag_request_failed_);
|
|
|
|
+}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
|
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
2020-06-22 17:35:10 +00:00
|
|
|
index 7f1b9ac981fbb94895d975a4cb32bb54b2a9e649..30c64e09608d4fb7a5dbf7bf94e398ec646d4098 100644
|
2020-03-03 21:35:05 +00:00
|
|
|
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
|
|
|
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
2020-06-22 17:35:10 +00:00
|
|
|
@@ -73,6 +73,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
2020-03-03 21:35:05 +00:00
|
|
|
bool Dx12VulkanRequested() const;
|
2020-03-14 20:54:14 +00:00
|
|
|
void OnBrowserThreadsStarted();
|
2020-04-21 00:25:38 +00:00
|
|
|
void TerminateInfoCollectionGpuProcess();
|
2020-03-03 21:35:05 +00:00
|
|
|
+ bool DxdiagDx12VulkanRequested() const;
|
|
|
|
#endif
|
|
|
|
void UpdateGpuFeatureInfo(const gpu::GpuFeatureInfo& gpu_feature_info,
|
|
|
|
const base::Optional<gpu::GpuFeatureInfo>&
|