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
|
2023-07-18 22:26:27 +00:00
|
|
|
index e496fc3cab0eed155123f5fc0e3cb5c4332bfcea..db062a89b241ea7d73b01a28adf6725e9f951e4d 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
|
2023-07-18 22:26:27 +00:00
|
|
|
@@ -225,6 +225,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();
|
|
|
|
+}
|
2023-07-18 22:26:27 +00:00
|
|
|
#endif // BUILDFLAG(IS_WIN)
|
2020-03-03 21:35:05 +00:00
|
|
|
|
2023-07-18 22:26:27 +00:00
|
|
|
void GpuDataManagerImpl::PostCreateThreads() {
|
2020-03-03 21:35:05 +00:00
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
2023-07-18 22:26:27 +00:00
|
|
|
index c57305681efb469d296c90df68b6cdbea927580d..6dda1a5465e08df64b539ee203b7c40386d16e72 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
|
2023-07-18 22:26:27 +00:00
|
|
|
@@ -121,6 +121,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
|
|
|
bool Dx12Requested() const;
|
|
|
|
bool VulkanRequested() const;
|
2020-04-21 00:25:38 +00:00
|
|
|
void TerminateInfoCollectionGpuProcess();
|
2020-03-03 21:35:05 +00:00
|
|
|
+ bool DxdiagDx12VulkanRequested() const;
|
|
|
|
#endif
|
2023-07-18 22:26:27 +00:00
|
|
|
// Called from BrowserMainLoop::PostCreateThreads().
|
|
|
|
// TODO(content/browser/gpu/OWNERS): This should probably use a
|
2020-03-03 21:35:05 +00:00
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
2023-11-28 21:40:12 +00:00
|
|
|
index 6b7f461089ea44ab26e06889c786e65c5bdcd286..392ca4f7222fc1612de02ea2c4d0654d5d37867d 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
|
2023-09-06 01:17:56 +00:00
|
|
|
@@ -1222,6 +1222,12 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
2021-06-22 19:17:16 +00:00
|
|
|
if (host)
|
2020-04-21 00:25:38 +00:00
|
|
|
host->ForceShutdown();
|
2020-03-03 21:35:05 +00:00
|
|
|
}
|
2021-06-22 19:17:16 +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
|
|
|
|
|
2023-07-18 22:26:27 +00:00
|
|
|
void GpuDataManagerImplPrivate::PostCreateThreads() {
|
2020-03-03 21:35:05 +00:00
|
|
|
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
2023-09-06 01:17:56 +00:00
|
|
|
index 6d5e9789ad9eab175087cc6bd30100d83d90a13b..d1946374205973cf2856acf4fe81fbe7c62c923e 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
|
2023-07-18 22:26:27 +00:00
|
|
|
@@ -86,6 +86,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
|
|
|
bool Dx12Requested() const;
|
2020-07-14 01:13:34 +00:00
|
|
|
bool VulkanRequested() const;
|
2020-04-21 00:25:38 +00:00
|
|
|
void TerminateInfoCollectionGpuProcess();
|
2020-03-03 21:35:05 +00:00
|
|
|
+ bool DxdiagDx12VulkanRequested() const;
|
|
|
|
#endif
|
2023-07-18 22:26:27 +00:00
|
|
|
void PostCreateThreads();
|
2021-06-22 19:17:16 +00:00
|
|
|
void UpdateDawnInfo(const std::vector<std::string>& dawn_info_list);
|