mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	telemetry: Log performance, configuration, and system data.
This commit is contained in:
		
							parent
							
								
									822e8d21ea
								
							
						
					
					
						commit
						df8b9863f9
					
				
					 5 changed files with 96 additions and 18 deletions
				
			
		|  | @ -12,6 +12,7 @@ | |||
| #include "common/common_funcs.h" | ||||
| #include "common/common_types.h" | ||||
| #include "common/logging/log.h" | ||||
| #include "core/core.h" | ||||
| #include "video_core/regs_framebuffer.h" | ||||
| #include "video_core/regs_lighting.h" | ||||
| #include "video_core/regs_texturing.h" | ||||
|  | @ -72,9 +73,9 @@ inline GLenum WrapMode(Pica::TexturingRegs::TextureConfig::WrapMode mode) { | |||
|     } | ||||
| 
 | ||||
|     if (static_cast<u32>(mode) > 3) { | ||||
|         // It is still unclear whether mode 4-7 are valid, so log it if a game uses them.
 | ||||
|         // TODO(wwylele): telemetry should be added here so we can collect more info about which
 | ||||
|         // game uses this.
 | ||||
|         Core::Telemetry().AddField(Telemetry::FieldType::Session, | ||||
|                                    "VideoCore_Pica_UnsupportedTextureWrapMode", | ||||
|                                    static_cast<u32>(mode)); | ||||
|         LOG_WARNING(Render_OpenGL, "Using texture wrap mode %u", static_cast<u32>(mode)); | ||||
|     } | ||||
| 
 | ||||
|  |  | |||
|  | @ -481,9 +481,18 @@ bool RendererOpenGL::Init() { | |||
|         glDebugMessageCallback(DebugHandler, nullptr); | ||||
|     } | ||||
| 
 | ||||
|     LOG_INFO(Render_OpenGL, "GL_VERSION: %s", glGetString(GL_VERSION)); | ||||
|     LOG_INFO(Render_OpenGL, "GL_VENDOR: %s", glGetString(GL_VENDOR)); | ||||
|     LOG_INFO(Render_OpenGL, "GL_RENDERER: %s", glGetString(GL_RENDERER)); | ||||
|     const char* gl_version{reinterpret_cast<char const*>(glGetString(GL_VERSION))}; | ||||
|     const char* gpu_vendor{reinterpret_cast<char const*>(glGetString(GL_VENDOR))}; | ||||
|     const char* gpu_model{reinterpret_cast<char const*>(glGetString(GL_RENDERER))}; | ||||
| 
 | ||||
|     LOG_INFO(Render_OpenGL, "GL_VERSION: %s", gl_version); | ||||
|     LOG_INFO(Render_OpenGL, "GL_VENDOR: %s", gpu_vendor); | ||||
|     LOG_INFO(Render_OpenGL, "GL_RENDERER: %s", gpu_model); | ||||
| 
 | ||||
|     Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Vendor", gpu_vendor); | ||||
|     Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_Model", gpu_model); | ||||
|     Core::Telemetry().AddField(Telemetry::FieldType::UserSystem, "GPU_OpenGL_Version", gl_version); | ||||
| 
 | ||||
|     if (!GLAD_GL_VERSION_3_3) { | ||||
|         return false; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue