Merge pull request #15525 from hyperlogic/feature/backtrace-gpu-ident

Add gpu_name, gpu_driver & gpu_memory to crash annotations
This commit is contained in:
Anthony Thibault 2019-05-08 16:09:13 -07:00 committed by GitHub
commit 4ee39355f1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1069,6 +1069,14 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
}
}
{
// identify gpu as early as possible to help identify OpenGL initialization errors.
auto gpuIdent = GPUIdent::getInstance();
setCrashAnnotation("gpu_name", gpuIdent->getName().toStdString());
setCrashAnnotation("gpu_driver", gpuIdent->getDriver().toStdString());
setCrashAnnotation("gpu_memory", std::to_string(gpuIdent->getMemory()));
}
// make sure the debug draw singleton is initialized on the main thread.
DebugDraw::getInstance().removeMarker("");