diff options
| author | 2017-07-18 08:04:49 -0400 | |
|---|---|---|
| committer | 2017-07-18 08:04:49 -0400 | |
| commit | 35eee446c74b642b6b5fd54eeadb2d8062bc2139 (patch) | |
| tree | b537192701ae290292d231cecb773af7897a4d8b /src/video_core | |
| parent | Merge pull request #2804 from Kloen/theming (diff) | |
| parent | telemetry: Log performance, configuration, and system data. (diff) | |
| download | yuzu-35eee446c74b642b6b5fd54eeadb2d8062bc2139.tar.gz yuzu-35eee446c74b642b6b5fd54eeadb2d8062bc2139.tar.xz yuzu-35eee446c74b642b6b5fd54eeadb2d8062bc2139.zip | |
Merge pull request #2823 from bunnei/telemetry-data
telemetry: Log performance, configuration, and system data.
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/renderer_opengl/pica_to_gl.h | 7 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 15 |
2 files changed, 16 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/pica_to_gl.h b/src/video_core/renderer_opengl/pica_to_gl.h index 70298e211..c7fa1f873 100644 --- a/src/video_core/renderer_opengl/pica_to_gl.h +++ b/src/video_core/renderer_opengl/pica_to_gl.h | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include "common/common_funcs.h" | 12 | #include "common/common_funcs.h" |
| 13 | #include "common/common_types.h" | 13 | #include "common/common_types.h" |
| 14 | #include "common/logging/log.h" | 14 | #include "common/logging/log.h" |
| 15 | #include "core/core.h" | ||
| 15 | #include "video_core/regs_framebuffer.h" | 16 | #include "video_core/regs_framebuffer.h" |
| 16 | #include "video_core/regs_lighting.h" | 17 | #include "video_core/regs_lighting.h" |
| 17 | #include "video_core/regs_texturing.h" | 18 | #include "video_core/regs_texturing.h" |
| @@ -72,9 +73,9 @@ inline GLenum WrapMode(Pica::TexturingRegs::TextureConfig::WrapMode mode) { | |||
| 72 | } | 73 | } |
| 73 | 74 | ||
| 74 | if (static_cast<u32>(mode) > 3) { | 75 | if (static_cast<u32>(mode) > 3) { |
| 75 | // It is still unclear whether mode 4-7 are valid, so log it if a game uses them. | 76 | Core::Telemetry().AddField(Telemetry::FieldType::Session, |
| 76 | // TODO(wwylele): telemetry should be added here so we can collect more info about which | 77 | "VideoCore_Pica_UnsupportedTextureWrapMode", |
| 77 | // game uses this. | 78 | static_cast<u32>(mode)); |
| 78 | LOG_WARNING(Render_OpenGL, "Using texture wrap mode %u", static_cast<u32>(mode)); | 79 | LOG_WARNING(Render_OpenGL, "Using texture wrap mode %u", static_cast<u32>(mode)); |
| 79 | } | 80 | } |
| 80 | 81 | ||
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index d90c776f9..65c18aecc 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -481,9 +481,18 @@ bool RendererOpenGL::Init() { | |||
| 481 | glDebugMessageCallback(DebugHandler, nullptr); | 481 | glDebugMessageCallback(DebugHandler, nullptr); |
| 482 | } | 482 | } |
| 483 | 483 | ||
| 484 | LOG_INFO(Render_OpenGL, "GL_VERSION: %s", glGetString(GL_VERSION)); | 484 | const char* gl_version{reinterpret_cast<char const*>(glGetString(GL_VERSION))}; |
| 485 | LOG_INFO(Render_OpenGL, "GL_VENDOR: %s", glGetString(GL_VENDOR)); | 485 | const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))}; |
| 486 | LOG_INFO(Render_OpenGL, "GL_RENDERER: %s", glGetString(GL_RENDERER)); | 486 | const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))}; |
| 487 | |||
| 488 | LOG_INFO(Render_OpenGL, "GL_VERSION: %s", gl_version); | ||
| 489 | LOG_INFO(Render_OpenGL, "GL_VENDOR: %s", gpu_vendor); | ||
| 490 | LOG_INFO(Render_OpenGL, "GL_RENDERER: %s", gpu_model); | ||
| 491 | |||
| 492 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); | ||
| 493 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); | ||
| 494 | Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version", gl_version); | ||
| 495 | |||
| 487 | if (!GLAD_GL_VERSION_3_3) { | 496 | if (!GLAD_GL_VERSION_3_3) { |
| 488 | return false; | 497 | return false; |
| 489 | } | 498 | } |