diff options
| author | 2014-12-05 23:53:49 -0200 | |
|---|---|---|
| committer | 2014-12-13 02:08:02 -0200 | |
| commit | 0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9 (patch) | |
| tree | 40fee084c551bfb497e68181447298f862ea68ca /src/video_core | |
| parent | Implement text path trimming for shorter paths. (diff) | |
| download | yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.gz yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.tar.xz yuzu-0600e2d8b5b30bd68c8b19cb1f2051e096e7caa9.zip | |
Convert old logging calls to new logging macros
Diffstat (limited to 'src/video_core')
| -rw-r--r-- | src/video_core/clipper.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/command_processor.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/debug_utils/debug_utils.cpp | 18 | ||||
| -rw-r--r-- | src/video_core/gpu_debugger.h | 2 | ||||
| -rw-r--r-- | src/video_core/primitive_assembly.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/rasterizer.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_shader_util.cpp | 24 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 12 | ||||
| -rw-r--r-- | src/video_core/vertex_shader.cpp | 6 | ||||
| -rw-r--r-- | src/video_core/video_core.cpp | 4 |
10 files changed, 50 insertions, 38 deletions
diff --git a/src/video_core/clipper.cpp b/src/video_core/clipper.cpp index fbe4047ce..632fb959a 100644 --- a/src/video_core/clipper.cpp +++ b/src/video_core/clipper.cpp | |||
| @@ -157,7 +157,7 @@ void ProcessTriangle(OutputVertex &v0, OutputVertex &v1, OutputVertex &v2) { | |||
| 157 | 157 | ||
| 158 | InitScreenCoordinates(vtx2); | 158 | InitScreenCoordinates(vtx2); |
| 159 | 159 | ||
| 160 | DEBUG_LOG(GPU, | 160 | LOG_TRACE(Render_Software, |
| 161 | "Triangle %lu/%lu (%lu buffer vertices) at position (%.3f, %.3f, %.3f, %.3f), " | 161 | "Triangle %lu/%lu (%lu buffer vertices) at position (%.3f, %.3f, %.3f, %.3f), " |
| 162 | "(%.3f, %.3f, %.3f, %.3f), (%.3f, %.3f, %.3f, %.3f) and " | 162 | "(%.3f, %.3f, %.3f, %.3f), (%.3f, %.3f, %.3f, %.3f) and " |
| 163 | "screen position (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f)", | 163 | "screen position (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f), (%.2f, %.2f, %.2f)", |
diff --git a/src/video_core/command_processor.cpp b/src/video_core/command_processor.cpp index 431139cc2..b74cd3261 100644 --- a/src/video_core/command_processor.cpp +++ b/src/video_core/command_processor.cpp | |||
| @@ -114,7 +114,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 114 | (vertex_attribute_formats[i] == 2) ? *(s16*)srcdata : | 114 | (vertex_attribute_formats[i] == 2) ? *(s16*)srcdata : |
| 115 | *(float*)srcdata; | 115 | *(float*)srcdata; |
| 116 | input.attr[i][comp] = float24::FromFloat32(srcval); | 116 | input.attr[i][comp] = float24::FromFloat32(srcval); |
| 117 | DEBUG_LOG(GPU, "Loaded component %x of attribute %x for vertex %x (index %x) from 0x%08x + 0x%08lx + 0x%04lx: %f", | 117 | LOG_TRACE(HW_GPU, "Loaded component %x of attribute %x for vertex %x (index %x) from 0x%08x + 0x%08lx + 0x%04lx: %f", |
| 118 | comp, i, vertex, index, | 118 | comp, i, vertex, index, |
| 119 | attribute_config.GetBaseAddress(), | 119 | attribute_config.GetBaseAddress(), |
| 120 | vertex_attribute_sources[i] - base_address, | 120 | vertex_attribute_sources[i] - base_address, |
| @@ -176,7 +176,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 176 | auto& uniform = VertexShader::GetFloatUniform(uniform_setup.index); | 176 | auto& uniform = VertexShader::GetFloatUniform(uniform_setup.index); |
| 177 | 177 | ||
| 178 | if (uniform_setup.index > 95) { | 178 | if (uniform_setup.index > 95) { |
| 179 | ERROR_LOG(GPU, "Invalid VS uniform index %d", (int)uniform_setup.index); | 179 | LOG_ERROR(HW_GPU, "Invalid VS uniform index %d", (int)uniform_setup.index); |
| 180 | break; | 180 | break; |
| 181 | } | 181 | } |
| 182 | 182 | ||
| @@ -192,7 +192,7 @@ static inline void WritePicaReg(u32 id, u32 value, u32 mask) { | |||
| 192 | uniform.x = float24::FromRawFloat24(uniform_write_buffer[2] & 0xFFFFFF); | 192 | uniform.x = float24::FromRawFloat24(uniform_write_buffer[2] & 0xFFFFFF); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | DEBUG_LOG(GPU, "Set uniform %x to (%f %f %f %f)", (int)uniform_setup.index, | 195 | LOG_TRACE(HW_GPU, "Set uniform %x to (%f %f %f %f)", (int)uniform_setup.index, |
| 196 | uniform.x.ToFloat32(), uniform.y.ToFloat32(), uniform.z.ToFloat32(), | 196 | uniform.x.ToFloat32(), uniform.y.ToFloat32(), uniform.z.ToFloat32(), |
| 197 | uniform.w.ToFloat32()); | 197 | uniform.w.ToFloat32()); |
| 198 | 198 | ||
diff --git a/src/video_core/debug_utils/debug_utils.cpp b/src/video_core/debug_utils/debug_utils.cpp index 71b03f31c..1a20f19ec 100644 --- a/src/video_core/debug_utils/debug_utils.cpp +++ b/src/video_core/debug_utils/debug_utils.cpp | |||
| @@ -248,8 +248,8 @@ void DumpShader(const u32* binary_data, u32 binary_size, const u32* swizzle_data | |||
| 248 | it->component_mask = it->component_mask | component_mask; | 248 | it->component_mask = it->component_mask | component_mask; |
| 249 | } | 249 | } |
| 250 | } catch (const std::out_of_range& ) { | 250 | } catch (const std::out_of_range& ) { |
| 251 | _dbg_assert_msg_(GPU, 0, "Unknown output attribute mapping"); | 251 | _dbg_assert_msg_(HW_GPU, 0, "Unknown output attribute mapping"); |
| 252 | ERROR_LOG(GPU, "Unknown output attribute mapping: %03x, %03x, %03x, %03x", | 252 | LOG_ERROR(HW_GPU, "Unknown output attribute mapping: %03x, %03x, %03x, %03x", |
| 253 | (int)output_attributes[i].map_x.Value(), | 253 | (int)output_attributes[i].map_x.Value(), |
| 254 | (int)output_attributes[i].map_y.Value(), | 254 | (int)output_attributes[i].map_y.Value(), |
| 255 | (int)output_attributes[i].map_z.Value(), | 255 | (int)output_attributes[i].map_z.Value(), |
| @@ -309,7 +309,7 @@ static int is_pica_tracing = false; | |||
| 309 | void StartPicaTracing() | 309 | void StartPicaTracing() |
| 310 | { | 310 | { |
| 311 | if (is_pica_tracing) { | 311 | if (is_pica_tracing) { |
| 312 | ERROR_LOG(GPU, "StartPicaTracing called even though tracing already running!"); | 312 | LOG_WARNING(HW_GPU, "StartPicaTracing called even though tracing already running!"); |
| 313 | return; | 313 | return; |
| 314 | } | 314 | } |
| 315 | 315 | ||
| @@ -342,7 +342,7 @@ void OnPicaRegWrite(u32 id, u32 value) | |||
| 342 | std::unique_ptr<PicaTrace> FinishPicaTracing() | 342 | std::unique_ptr<PicaTrace> FinishPicaTracing() |
| 343 | { | 343 | { |
| 344 | if (!is_pica_tracing) { | 344 | if (!is_pica_tracing) { |
| 345 | ERROR_LOG(GPU, "FinishPicaTracing called even though tracing already running!"); | 345 | LOG_WARNING(HW_GPU, "FinishPicaTracing called even though tracing isn't running!"); |
| 346 | return {}; | 346 | return {}; |
| 347 | } | 347 | } |
| 348 | 348 | ||
| @@ -357,7 +357,7 @@ std::unique_ptr<PicaTrace> FinishPicaTracing() | |||
| 357 | } | 357 | } |
| 358 | 358 | ||
| 359 | const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const TextureInfo& info) { | 359 | const Math::Vec4<u8> LookupTexture(const u8* source, int x, int y, const TextureInfo& info) { |
| 360 | _dbg_assert_(GPU, info.format == Pica::Regs::TextureFormat::RGB8); | 360 | _dbg_assert_(Debug_GPU, info.format == Pica::Regs::TextureFormat::RGB8); |
| 361 | 361 | ||
| 362 | // Cf. rasterizer code for an explanation of this algorithm. | 362 | // Cf. rasterizer code for an explanation of this algorithm. |
| 363 | int texel_index_within_tile = 0; | 363 | int texel_index_within_tile = 0; |
| @@ -421,7 +421,7 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) { | |||
| 421 | // Initialize write structure | 421 | // Initialize write structure |
| 422 | png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); | 422 | png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, nullptr, nullptr, nullptr); |
| 423 | if (png_ptr == nullptr) { | 423 | if (png_ptr == nullptr) { |
| 424 | ERROR_LOG(GPU, "Could not allocate write struct\n"); | 424 | LOG_ERROR(Debug_GPU, "Could not allocate write struct\n"); |
| 425 | goto finalise; | 425 | goto finalise; |
| 426 | 426 | ||
| 427 | } | 427 | } |
| @@ -429,13 +429,13 @@ void DumpTexture(const Pica::Regs::TextureConfig& texture_config, u8* data) { | |||
| 429 | // Initialize info structure | 429 | // Initialize info structure |
| 430 | info_ptr = png_create_info_struct(png_ptr); | 430 | info_ptr = png_create_info_struct(png_ptr); |
| 431 | if (info_ptr == nullptr) { | 431 | if (info_ptr == nullptr) { |
| 432 | ERROR_LOG(GPU, "Could not allocate info struct\n"); | 432 | LOG_ERROR(Debug_GPU, "Could not allocate info struct\n"); |
| 433 | goto finalise; | 433 | goto finalise; |
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | // Setup Exception handling | 436 | // Setup Exception handling |
| 437 | if (setjmp(png_jmpbuf(png_ptr))) { | 437 | if (setjmp(png_jmpbuf(png_ptr))) { |
| 438 | ERROR_LOG(GPU, "Error during png creation\n"); | 438 | LOG_ERROR(Debug_GPU, "Error during png creation\n"); |
| 439 | goto finalise; | 439 | goto finalise; |
| 440 | } | 440 | } |
| 441 | 441 | ||
| @@ -582,7 +582,7 @@ void DumpTevStageConfig(const std::array<Pica::Regs::TevStageConfig,6>& stages) | |||
| 582 | stage_info += "Stage " + std::to_string(index) + ": " + GetColorCombinerStr(tev_stage) + " " + GetAlphaCombinerStr(tev_stage) + "\n"; | 582 | stage_info += "Stage " + std::to_string(index) + ": " + GetColorCombinerStr(tev_stage) + " " + GetAlphaCombinerStr(tev_stage) + "\n"; |
| 583 | } | 583 | } |
| 584 | 584 | ||
| 585 | DEBUG_LOG(GPU, "%s", stage_info.c_str()); | 585 | LOG_TRACE(HW_GPU, "%s", stage_info.c_str()); |
| 586 | } | 586 | } |
| 587 | 587 | ||
| 588 | } // namespace | 588 | } // namespace |
diff --git a/src/video_core/gpu_debugger.h b/src/video_core/gpu_debugger.h index 1242eb58f..16b1656bb 100644 --- a/src/video_core/gpu_debugger.h +++ b/src/video_core/gpu_debugger.h | |||
| @@ -39,7 +39,7 @@ public: | |||
| 39 | virtual void GXCommandProcessed(int total_command_count) | 39 | virtual void GXCommandProcessed(int total_command_count) |
| 40 | { | 40 | { |
| 41 | const GSP_GPU::Command& cmd = observed->ReadGXCommandHistory(total_command_count-1); | 41 | const GSP_GPU::Command& cmd = observed->ReadGXCommandHistory(total_command_count-1); |
| 42 | ERROR_LOG(GSP, "Received command: id=%x", (int)cmd.id.Value()); | 42 | LOG_TRACE(Debug_GPU, "Received command: id=%x", (int)cmd.id.Value()); |
| 43 | } | 43 | } |
| 44 | 44 | ||
| 45 | protected: | 45 | protected: |
diff --git a/src/video_core/primitive_assembly.cpp b/src/video_core/primitive_assembly.cpp index dabf2d1a3..102693ed9 100644 --- a/src/video_core/primitive_assembly.cpp +++ b/src/video_core/primitive_assembly.cpp | |||
| @@ -43,7 +43,7 @@ void PrimitiveAssembler<VertexType>::SubmitVertex(VertexType& vtx, TriangleHandl | |||
| 43 | break; | 43 | break; |
| 44 | 44 | ||
| 45 | default: | 45 | default: |
| 46 | ERROR_LOG(GPU, "Unknown triangle topology %x:", (int)topology); | 46 | LOG_ERROR(Render_Software, "Unknown triangle topology %x:", (int)topology); |
| 47 | break; | 47 | break; |
| 48 | } | 48 | } |
| 49 | } | 49 | } |
diff --git a/src/video_core/rasterizer.cpp b/src/video_core/rasterizer.cpp index a35f0c0d8..b7e04a560 100644 --- a/src/video_core/rasterizer.cpp +++ b/src/video_core/rasterizer.cpp | |||
| @@ -252,7 +252,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 252 | return combiner_output.rgb(); | 252 | return combiner_output.rgb(); |
| 253 | 253 | ||
| 254 | default: | 254 | default: |
| 255 | ERROR_LOG(GPU, "Unknown color combiner source %d\n", (int)source); | 255 | LOG_ERROR(HW_GPU, "Unknown color combiner source %d\n", (int)source); |
| 256 | return {}; | 256 | return {}; |
| 257 | } | 257 | } |
| 258 | }; | 258 | }; |
| @@ -272,7 +272,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 272 | return combiner_output.a(); | 272 | return combiner_output.a(); |
| 273 | 273 | ||
| 274 | default: | 274 | default: |
| 275 | ERROR_LOG(GPU, "Unknown alpha combiner source %d\n", (int)source); | 275 | LOG_ERROR(HW_GPU, "Unknown alpha combiner source %d\n", (int)source); |
| 276 | return 0; | 276 | return 0; |
| 277 | } | 277 | } |
| 278 | }; | 278 | }; |
| @@ -283,7 +283,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 283 | case ColorModifier::SourceColor: | 283 | case ColorModifier::SourceColor: |
| 284 | return values; | 284 | return values; |
| 285 | default: | 285 | default: |
| 286 | ERROR_LOG(GPU, "Unknown color factor %d\n", (int)factor); | 286 | LOG_ERROR(HW_GPU, "Unknown color factor %d\n", (int)factor); |
| 287 | return {}; | 287 | return {}; |
| 288 | } | 288 | } |
| 289 | }; | 289 | }; |
| @@ -293,7 +293,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 293 | case AlphaModifier::SourceAlpha: | 293 | case AlphaModifier::SourceAlpha: |
| 294 | return value; | 294 | return value; |
| 295 | default: | 295 | default: |
| 296 | ERROR_LOG(GPU, "Unknown color factor %d\n", (int)factor); | 296 | LOG_ERROR(HW_GPU, "Unknown color factor %d\n", (int)factor); |
| 297 | return 0; | 297 | return 0; |
| 298 | } | 298 | } |
| 299 | }; | 299 | }; |
| @@ -307,7 +307,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 307 | return ((input[0] * input[1]) / 255).Cast<u8>(); | 307 | return ((input[0] * input[1]) / 255).Cast<u8>(); |
| 308 | 308 | ||
| 309 | default: | 309 | default: |
| 310 | ERROR_LOG(GPU, "Unknown color combiner operation %d\n", (int)op); | 310 | LOG_ERROR(HW_GPU, "Unknown color combiner operation %d\n", (int)op); |
| 311 | return {}; | 311 | return {}; |
| 312 | } | 312 | } |
| 313 | }; | 313 | }; |
| @@ -321,7 +321,7 @@ void ProcessTriangle(const VertexShader::OutputVertex& v0, | |||
| 321 | return input[0] * input[1] / 255; | 321 | return input[0] * input[1] / 255; |
| 322 | 322 | ||
| 323 | default: | 323 | default: |
| 324 | ERROR_LOG(GPU, "Unknown alpha combiner operation %d\n", (int)op); | 324 | LOG_ERROR(HW_GPU, "Unknown alpha combiner operation %d\n", (int)op); |
| 325 | return 0; | 325 | return 0; |
| 326 | } | 326 | } |
| 327 | }; | 327 | }; |
diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp index fdac9ae1a..d0f82e6cd 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.cpp +++ b/src/video_core/renderer_opengl/gl_shader_util.cpp | |||
| @@ -20,7 +20,7 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 20 | int info_log_length; | 20 | int info_log_length; |
| 21 | 21 | ||
| 22 | // Compile Vertex Shader | 22 | // Compile Vertex Shader |
| 23 | DEBUG_LOG(GPU, "Compiling vertex shader."); | 23 | LOG_DEBUG(Render_OpenGL, "Compiling vertex shader..."); |
| 24 | 24 | ||
| 25 | glShaderSource(vertex_shader_id, 1, &vertex_shader, nullptr); | 25 | glShaderSource(vertex_shader_id, 1, &vertex_shader, nullptr); |
| 26 | glCompileShader(vertex_shader_id); | 26 | glCompileShader(vertex_shader_id); |
| @@ -32,11 +32,15 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 32 | if (info_log_length > 1) { | 32 | if (info_log_length > 1) { |
| 33 | std::vector<char> vertex_shader_error(info_log_length); | 33 | std::vector<char> vertex_shader_error(info_log_length); |
| 34 | glGetShaderInfoLog(vertex_shader_id, info_log_length, nullptr, &vertex_shader_error[0]); | 34 | glGetShaderInfoLog(vertex_shader_id, info_log_length, nullptr, &vertex_shader_error[0]); |
| 35 | DEBUG_LOG(GPU, "%s", &vertex_shader_error[0]); | 35 | if (result) { |
| 36 | LOG_DEBUG(Render_OpenGL, "%s", &vertex_shader_error[0]); | ||
| 37 | } else { | ||
| 38 | LOG_ERROR(Render_OpenGL, "Error compiling vertex shader:\n%s", &vertex_shader_error[0]); | ||
| 39 | } | ||
| 36 | } | 40 | } |
| 37 | 41 | ||
| 38 | // Compile Fragment Shader | 42 | // Compile Fragment Shader |
| 39 | DEBUG_LOG(GPU, "Compiling fragment shader."); | 43 | LOG_DEBUG(Render_OpenGL, "Compiling fragment shader..."); |
| 40 | 44 | ||
| 41 | glShaderSource(fragment_shader_id, 1, &fragment_shader, nullptr); | 45 | glShaderSource(fragment_shader_id, 1, &fragment_shader, nullptr); |
| 42 | glCompileShader(fragment_shader_id); | 46 | glCompileShader(fragment_shader_id); |
| @@ -48,11 +52,15 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 48 | if (info_log_length > 1) { | 52 | if (info_log_length > 1) { |
| 49 | std::vector<char> fragment_shader_error(info_log_length); | 53 | std::vector<char> fragment_shader_error(info_log_length); |
| 50 | glGetShaderInfoLog(fragment_shader_id, info_log_length, nullptr, &fragment_shader_error[0]); | 54 | glGetShaderInfoLog(fragment_shader_id, info_log_length, nullptr, &fragment_shader_error[0]); |
| 51 | DEBUG_LOG(GPU, "%s", &fragment_shader_error[0]); | 55 | if (result) { |
| 56 | LOG_DEBUG(Render_OpenGL, "%s", &fragment_shader_error[0]); | ||
| 57 | } else { | ||
| 58 | LOG_ERROR(Render_OpenGL, "Error compiling fragment shader:\n%s", &fragment_shader_error[0]); | ||
| 59 | } | ||
| 52 | } | 60 | } |
| 53 | 61 | ||
| 54 | // Link the program | 62 | // Link the program |
| 55 | DEBUG_LOG(GPU, "Linking program."); | 63 | LOG_DEBUG(Render_OpenGL, "Linking program..."); |
| 56 | 64 | ||
| 57 | GLuint program_id = glCreateProgram(); | 65 | GLuint program_id = glCreateProgram(); |
| 58 | glAttachShader(program_id, vertex_shader_id); | 66 | glAttachShader(program_id, vertex_shader_id); |
| @@ -66,7 +74,11 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { | |||
| 66 | if (info_log_length > 1) { | 74 | if (info_log_length > 1) { |
| 67 | std::vector<char> program_error(info_log_length); | 75 | std::vector<char> program_error(info_log_length); |
| 68 | glGetProgramInfoLog(program_id, info_log_length, nullptr, &program_error[0]); | 76 | glGetProgramInfoLog(program_id, info_log_length, nullptr, &program_error[0]); |
| 69 | DEBUG_LOG(GPU, "%s", &program_error[0]); | 77 | if (result) { |
| 78 | LOG_DEBUG(Render_OpenGL, "%s", &program_error[0]); | ||
| 79 | } else { | ||
| 80 | LOG_ERROR(Render_OpenGL, "Error linking shader:\n%s", &program_error[0]); | ||
| 81 | } | ||
| 70 | } | 82 | } |
| 71 | 83 | ||
| 72 | glDeleteShader(vertex_shader_id); | 84 | glDeleteShader(vertex_shader_id); |
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 06de6afbd..e2caeeb8f 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -90,7 +90,7 @@ void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& | |||
| 90 | const VAddr framebuffer_vaddr = Memory::PhysicalToVirtualAddress( | 90 | const VAddr framebuffer_vaddr = Memory::PhysicalToVirtualAddress( |
| 91 | framebuffer.active_fb == 1 ? framebuffer.address_left2 : framebuffer.address_left1); | 91 | framebuffer.active_fb == 1 ? framebuffer.address_left2 : framebuffer.address_left1); |
| 92 | 92 | ||
| 93 | DEBUG_LOG(GPU, "0x%08x bytes from 0x%08x(%dx%d), fmt %x", | 93 | LOG_TRACE(Render_OpenGL, "0x%08x bytes from 0x%08x(%dx%d), fmt %x", |
| 94 | framebuffer.stride * framebuffer.height, | 94 | framebuffer.stride * framebuffer.height, |
| 95 | framebuffer_vaddr, (int)framebuffer.width, | 95 | framebuffer_vaddr, (int)framebuffer.width, |
| 96 | (int)framebuffer.height, (int)framebuffer.format); | 96 | (int)framebuffer.height, (int)framebuffer.format); |
| @@ -98,15 +98,15 @@ void RendererOpenGL::LoadFBToActiveGLTexture(const GPU::Regs::FramebufferConfig& | |||
| 98 | const u8* framebuffer_data = Memory::GetPointer(framebuffer_vaddr); | 98 | const u8* framebuffer_data = Memory::GetPointer(framebuffer_vaddr); |
| 99 | 99 | ||
| 100 | // TODO: Handle other pixel formats | 100 | // TODO: Handle other pixel formats |
| 101 | _dbg_assert_msg_(RENDER, framebuffer.color_format == GPU::Regs::PixelFormat::RGB8, | 101 | _dbg_assert_msg_(Render_OpenGL, framebuffer.color_format == GPU::Regs::PixelFormat::RGB8, |
| 102 | "Unsupported 3DS pixel format."); | 102 | "Unsupported 3DS pixel format."); |
| 103 | 103 | ||
| 104 | size_t pixel_stride = framebuffer.stride / 3; | 104 | size_t pixel_stride = framebuffer.stride / 3; |
| 105 | // OpenGL only supports specifying a stride in units of pixels, not bytes, unfortunately | 105 | // OpenGL only supports specifying a stride in units of pixels, not bytes, unfortunately |
| 106 | _dbg_assert_(RENDER, pixel_stride * 3 == framebuffer.stride); | 106 | _dbg_assert_(Render_OpenGL, pixel_stride * 3 == framebuffer.stride); |
| 107 | // Ensure no bad interactions with GL_UNPACK_ALIGNMENT, which by default | 107 | // Ensure no bad interactions with GL_UNPACK_ALIGNMENT, which by default |
| 108 | // only allows rows to have a memory alignement of 4. | 108 | // only allows rows to have a memory alignement of 4. |
| 109 | _dbg_assert_(RENDER, pixel_stride % 4 == 0); | 109 | _dbg_assert_(Render_OpenGL, pixel_stride % 4 == 0); |
| 110 | 110 | ||
| 111 | glBindTexture(GL_TEXTURE_2D, texture.handle); | 111 | glBindTexture(GL_TEXTURE_2D, texture.handle); |
| 112 | glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)pixel_stride); | 112 | glPixelStorei(GL_UNPACK_ROW_LENGTH, (GLint)pixel_stride); |
| @@ -263,11 +263,11 @@ void RendererOpenGL::Init() { | |||
| 263 | 263 | ||
| 264 | int err = ogl_LoadFunctions(); | 264 | int err = ogl_LoadFunctions(); |
| 265 | if (ogl_LOAD_SUCCEEDED != err) { | 265 | if (ogl_LOAD_SUCCEEDED != err) { |
| 266 | ERROR_LOG(RENDER, "Failed to initialize GL functions! Exiting..."); | 266 | LOG_CRITICAL(Render_OpenGL, "Failed to initialize GL functions! Exiting..."); |
| 267 | exit(-1); | 267 | exit(-1); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | NOTICE_LOG(RENDER, "GL_VERSION: %s\n", glGetString(GL_VERSION)); | 270 | LOG_INFO(Render_OpenGL, "GL_VERSION: %s", glGetString(GL_VERSION)); |
| 271 | InitOpenGLObjects(); | 271 | InitOpenGLObjects(); |
| 272 | } | 272 | } |
| 273 | 273 | ||
diff --git a/src/video_core/vertex_shader.cpp b/src/video_core/vertex_shader.cpp index 0dff11a0f..477e78cfe 100644 --- a/src/video_core/vertex_shader.cpp +++ b/src/video_core/vertex_shader.cpp | |||
| @@ -206,7 +206,7 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 206 | case Instruction::OpCode::CALL: | 206 | case Instruction::OpCode::CALL: |
| 207 | increment_pc = false; | 207 | increment_pc = false; |
| 208 | 208 | ||
| 209 | _dbg_assert_(GPU, state.call_stack_pointer - state.call_stack < sizeof(state.call_stack)); | 209 | _dbg_assert_(HW_GPU, state.call_stack_pointer - state.call_stack < sizeof(state.call_stack)); |
| 210 | 210 | ||
| 211 | *++state.call_stack_pointer = state.program_counter - shader_memory; | 211 | *++state.call_stack_pointer = state.program_counter - shader_memory; |
| 212 | // TODO: Does this offset refer to the beginning of shader memory? | 212 | // TODO: Does this offset refer to the beginning of shader memory? |
| @@ -218,7 +218,7 @@ static void ProcessShaderCode(VertexShaderState& state) { | |||
| 218 | break; | 218 | break; |
| 219 | 219 | ||
| 220 | default: | 220 | default: |
| 221 | ERROR_LOG(GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", | 221 | LOG_ERROR(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x", |
| 222 | (int)instr.opcode.Value(), instr.GetOpCodeName().c_str(), instr.hex); | 222 | (int)instr.opcode.Value(), instr.GetOpCodeName().c_str(), instr.hex); |
| 223 | break; | 223 | break; |
| 224 | } | 224 | } |
| @@ -285,7 +285,7 @@ OutputVertex RunShader(const InputVertex& input, int num_attributes) | |||
| 285 | state.debug.max_opdesc_id, registers.vs_main_offset, | 285 | state.debug.max_opdesc_id, registers.vs_main_offset, |
| 286 | registers.vs_output_attributes); | 286 | registers.vs_output_attributes); |
| 287 | 287 | ||
| 288 | DEBUG_LOG(GPU, "Output vertex: pos (%.2f, %.2f, %.2f, %.2f), col(%.2f, %.2f, %.2f, %.2f), tc0(%.2f, %.2f)", | 288 | LOG_TRACE(Render_Software, "Output vertex: pos (%.2f, %.2f, %.2f, %.2f), col(%.2f, %.2f, %.2f, %.2f), tc0(%.2f, %.2f)", |
| 289 | ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(), ret.pos.w.ToFloat32(), | 289 | ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(), ret.pos.w.ToFloat32(), |
| 290 | ret.color.x.ToFloat32(), ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(), | 290 | ret.color.x.ToFloat32(), ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(), |
| 291 | ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32()); | 291 | ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32()); |
diff --git a/src/video_core/video_core.cpp b/src/video_core/video_core.cpp index b581ff4da..6791e4007 100644 --- a/src/video_core/video_core.cpp +++ b/src/video_core/video_core.cpp | |||
| @@ -30,13 +30,13 @@ void Init(EmuWindow* emu_window) { | |||
| 30 | 30 | ||
| 31 | g_current_frame = 0; | 31 | g_current_frame = 0; |
| 32 | 32 | ||
| 33 | NOTICE_LOG(VIDEO, "initialized OK"); | 33 | LOG_DEBUG(Render, "initialized OK"); |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | /// Shutdown the video core | 36 | /// Shutdown the video core |
| 37 | void Shutdown() { | 37 | void Shutdown() { |
| 38 | delete g_renderer; | 38 | delete g_renderer; |
| 39 | NOTICE_LOG(VIDEO, "shutdown OK"); | 39 | LOG_DEBUG(Render, "shutdown OK"); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | } // namespace | 42 | } // namespace |