Catch a couple more common GPU errors to avoid sending crash reports
These errors are happening quite a bit and don't give much useful info in the crash reports. Bug: 385396982 Change-Id: I9d8a0a45661f61ee7e7a14e74ba2b2145b766377 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6138584 Reviewed-by: Ayu Ishii <ayui@chromium.org> Reviewed-by: Mike Wasserman <msw@chromium.org> Commit-Queue: Clark DuVall <cduvall@chromium.org> Cr-Commit-Position: refs/heads/main@{#1401572}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
6d37ed5178
commit
3d3e68023f
@ -39,9 +39,10 @@ namespace {
|
||||
enum class GpuErrorReason {
|
||||
kOther = 0,
|
||||
kDxgiErrorDeviceHung = 1,
|
||||
kDxgiErrorDeviceRemoved = 2,
|
||||
kDeviceRemoved = 2,
|
||||
kDeviceCreationFailed = 3,
|
||||
kMaxValue = kDeviceCreationFailed,
|
||||
kOutOfMemory = 4,
|
||||
kMaxValue = kOutOfMemory,
|
||||
};
|
||||
|
||||
void FatalGpuErrorFn(const char* msg) {
|
||||
@ -50,10 +51,14 @@ void FatalGpuErrorFn(const char* msg) {
|
||||
GpuErrorReason error_reason = GpuErrorReason::kOther;
|
||||
if (msg_str.find("DXGI_ERROR_DEVICE_HUNG") != std::string::npos) {
|
||||
error_reason = GpuErrorReason::kDxgiErrorDeviceHung;
|
||||
} else if (msg_str.find("DXGI_ERROR_DEVICE_REMOVED") != std::string::npos) {
|
||||
error_reason = GpuErrorReason::kDxgiErrorDeviceRemoved;
|
||||
} else if (msg_str.find("DXGI_ERROR_DEVICE_REMOVED") != std::string::npos ||
|
||||
msg_str.find("VK_ERROR_DEVICE_LOST") != std::string::npos) {
|
||||
error_reason = GpuErrorReason::kDeviceRemoved;
|
||||
} else if (msg_str.find("Failed to create device") != std::string::npos) {
|
||||
error_reason = GpuErrorReason::kDeviceCreationFailed;
|
||||
} else if (msg_str.find("VK_ERROR_OUT_OF_DEVICE_MEMORY") !=
|
||||
std::string::npos) {
|
||||
error_reason = GpuErrorReason::kOutOfMemory;
|
||||
}
|
||||
base::UmaHistogramEnumeration("OnDeviceModel.GpuErrorReason", error_reason);
|
||||
if (error_reason == GpuErrorReason::kOther) {
|
||||
|
@ -12158,8 +12158,9 @@ Called by update_permissions_policy_enum.py.-->
|
||||
<enum name="GpuErrorReason">
|
||||
<int value="0" label="Other"/>
|
||||
<int value="1" label="DXGI_ERROR_DEVICE_HUNG"/>
|
||||
<int value="2" label="DXGI_ERROR_DEVICE_REMOVED"/>
|
||||
<int value="2" label="DXGI_ERROR_DEVICE_REMOVED or VK_ERROR_DEVICE_LOST"/>
|
||||
<int value="3" label="Failed to create device."/>
|
||||
<int value="4" label="VK_ERROR_OUT_OF_DEVICE_MEMORY"/>
|
||||
</enum>
|
||||
|
||||
<enum name="GpuImageUsageState">
|
||||
|
Reference in New Issue
Block a user