summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 2db845da6..1fc4e56b1 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -7,6 +7,7 @@
7 7
8#include "common/color.h" 8#include "common/color.h"
9#include "common/math_util.h" 9#include "common/math_util.h"
10#include "common/profiler.h"
10 11
11#include "core/hw/gpu.h" 12#include "core/hw/gpu.h"
12#include "core/memory.h" 13#include "core/memory.h"
@@ -873,11 +874,15 @@ void RasterizerOpenGL::ReloadDepthBuffer() {
873 state.Apply(); 874 state.Apply();
874} 875}
875 876
877Common::Profiling::TimingCategory buffer_commit_category("Framebuffer Commit");
878
876void RasterizerOpenGL::CommitColorBuffer() { 879void RasterizerOpenGL::CommitColorBuffer() {
877 if (last_fb_color_addr != 0) { 880 if (last_fb_color_addr != 0) {
878 u8* color_buffer = Memory::GetPhysicalPointer(last_fb_color_addr); 881 u8* color_buffer = Memory::GetPhysicalPointer(last_fb_color_addr);
879 882
880 if (color_buffer != nullptr) { 883 if (color_buffer != nullptr) {
884 Common::Profiling::ScopeTimer timer(buffer_commit_category);
885
881 u32 bytes_per_pixel = Pica::Regs::BytesPerColorPixel(fb_color_texture.format); 886 u32 bytes_per_pixel = Pica::Regs::BytesPerColorPixel(fb_color_texture.format);
882 887
883 std::unique_ptr<u8[]> temp_gl_color_buffer(new u8[fb_color_texture.width * fb_color_texture.height * bytes_per_pixel]); 888 std::unique_ptr<u8[]> temp_gl_color_buffer(new u8[fb_color_texture.width * fb_color_texture.height * bytes_per_pixel]);
@@ -913,6 +918,8 @@ void RasterizerOpenGL::CommitDepthBuffer() {
913 u8* depth_buffer = Memory::GetPhysicalPointer(last_fb_depth_addr); 918 u8* depth_buffer = Memory::GetPhysicalPointer(last_fb_depth_addr);
914 919
915 if (depth_buffer != nullptr) { 920 if (depth_buffer != nullptr) {
921 Common::Profiling::ScopeTimer timer(buffer_commit_category);
922
916 u32 bytes_per_pixel = Pica::Regs::BytesPerDepthPixel(fb_depth_texture.format); 923 u32 bytes_per_pixel = Pica::Regs::BytesPerDepthPixel(fb_depth_texture.format);
917 924
918 // OpenGL needs 4 bpp alignment for D24 925 // OpenGL needs 4 bpp alignment for D24