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-12-22 22:14:44 +00:00
|
|
|
index 3b9289d822f747876c5f71ee23bae4e27800a4ab..5715b785ef8e24c902f8e58a98d28bd74cf9a8ee 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-09-21 08:00:36 +00:00
|
|
|
@@ -229,6 +229,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-10-20 01:40:58 +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-12-22 22:14:44 +00:00
|
|
|
index e57176b02c899d702fac00b7b60cfb1acb14bf26..1b89297e3c5e87b0212e4a487c6850722da77f8f 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-09-21 08:00:36 +00:00
|
|
|
@@ -97,6 +97,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
|
2020-08-12 18:33:58 +00:00
|
|
|
// Update the GPU feature info. This updates the blocklist and enabled status
|
2020-03-03 21:35:05 +00:00
|
|
|
// 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-12-22 22:14:44 +00:00
|
|
|
index 9086292908352e6e81fef7fa05b139cdb66c662b..ae2f8717bc482308727b8fa7ff12af325b2db3de 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-12-22 22:14:44 +00:00
|
|
|
@@ -1032,6 +1032,11 @@ 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 {
|
2020-07-14 01:13:34 +00:00
|
|
|
+ return !(gpu_info_vulkan_request_failed_ ||
|
|
|
|
+ gpu_info_dx12_request_failed_ ||
|
2020-03-03 21:35:05 +00:00
|
|
|
+ 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-12-22 22:14:44 +00:00
|
|
|
index a91832f439045fe91b426bfbeebeaa36914421cd..f2716eae69b1d2c0efaf70cc22eb4e739c033e7f 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-07-14 01:13:34 +00:00
|
|
|
@@ -75,6 +75,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
|
|
|
bool VulkanRequested() 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>&
|