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-04-13 23:39:26 +00:00
|
|
|
index db9780a6c0b679354a5f74b1f89e32a8ff9dd2e3..0fc50588e4776939093fb79b346ac032bf17b237 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-04-13 23:39:26 +00:00
|
|
|
@@ -165,6 +165,11 @@ void GpuDataManagerImpl::OnBrowserThreadsStarted() {
|
2020-03-03 21:35:05 +00:00
|
|
|
base::AutoLock auto_lock(lock_);
|
2020-03-14 20:54:14 +00:00
|
|
|
private_->OnBrowserThreadsStarted();
|
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-04-13 23:39:26 +00:00
|
|
|
index d5595c91f4d63362e575ad31070335ee344261fa..986d21000988aa0880bac3f0a58003257f1a3ad3 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-13 23:39:26 +00:00
|
|
|
@@ -92,6 +92,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
2020-03-03 21:35:05 +00:00
|
|
|
bool Dx12VulkanRequested() const;
|
2020-03-14 20:54:14 +00:00
|
|
|
// Called from BrowserMainLoop::BrowserThreadsStarted().
|
|
|
|
void OnBrowserThreadsStarted();
|
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-03-14 20:54:14 +00:00
|
|
|
index aae01a85f5d37d4c8e809815540662dee1550dbc..ee05d2fb8524664d2e989779201a670a201dd8bb 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-03-14 20:54:14 +00:00
|
|
|
@@ -896,6 +896,10 @@ void GpuDataManagerImplPrivate::OnBrowserThreadsStarted() {
|
|
|
|
display::Screen::GetScreen()->AddObserver(owner_);
|
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-03-14 20:54:14 +00:00
|
|
|
index 6a082f73e77d9f5e7630cc4dbc18188c7e565c0b..d880de03d168908f2f7d4bc0c65e18e283de0005 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-03-14 20:54:14 +00:00
|
|
|
@@ -71,6 +71,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
2020-03-03 21:35:05 +00:00
|
|
|
void UpdateDxDiagNodeRequestStatus(bool request_continues);
|
|
|
|
bool Dx12VulkanRequested() const;
|
2020-03-14 20:54:14 +00:00
|
|
|
void OnBrowserThreadsStarted();
|
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>&
|