summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Markus Wick2018-11-06 13:25:01 +0100
committerGravatar Markus Wick2018-11-06 17:45:32 +0100
commit2c87f10267af56186b267dc3f774cd4024989cb9 (patch)
treedabb121574ebf8618852e781ac7612d255f5cf2d /src
parentgl_resource_manager: Profile creation and deletion. (diff)
downloadyuzu-2c87f10267af56186b267dc3f774cd4024989cb9.tar.gz
yuzu-2c87f10267af56186b267dc3f774cd4024989cb9.tar.xz
yuzu-2c87f10267af56186b267dc3f774cd4024989cb9.zip
gl_rasterizer_cache: Add profiles for Copy and Blit.
They were missed, and Copy is very high in profile here. It doesn't block the GPU, but it stalls the driver thread. So with our bad GL instructions, this might block quite a while.
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 7d970efa0..49d63e6f3 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -562,9 +562,11 @@ void SwizzleFunc(const GLConversionArray& functions, const SurfaceParams& params
562 } 562 }
563} 563}
564 564
565MICROPROFILE_DEFINE(OpenGL_BlitSurface, "OpenGL", "BlitSurface", MP_RGB(128, 192, 64));
565static bool BlitSurface(const Surface& src_surface, const Surface& dst_surface, 566static bool BlitSurface(const Surface& src_surface, const Surface& dst_surface,
566 GLuint read_fb_handle, GLuint draw_fb_handle, GLenum src_attachment = 0, 567 GLuint read_fb_handle, GLuint draw_fb_handle, GLenum src_attachment = 0,
567 GLenum dst_attachment = 0, std::size_t cubemap_face = 0) { 568 GLenum dst_attachment = 0, std::size_t cubemap_face = 0) {
569 MICROPROFILE_SCOPE(OpenGL_BlitSurface);
568 570
569 const auto& src_params{src_surface->GetSurfaceParams()}; 571 const auto& src_params{src_surface->GetSurfaceParams()};
570 const auto& dst_params{dst_surface->GetSurfaceParams()}; 572 const auto& dst_params{dst_surface->GetSurfaceParams()};
@@ -704,9 +706,11 @@ static void FastCopySurface(const Surface& src_surface, const Surface& dst_surfa
704 0, 0, width, height, 1); 706 0, 0, width, height, 1);
705} 707}
706 708
709MICROPROFILE_DEFINE(OpenGL_CopySurface, "OpenGL", "CopySurface", MP_RGB(128, 192, 64));
707static void CopySurface(const Surface& src_surface, const Surface& dst_surface, 710static void CopySurface(const Surface& src_surface, const Surface& dst_surface,
708 GLuint copy_pbo_handle, GLenum src_attachment = 0, 711 GLuint copy_pbo_handle, GLenum src_attachment = 0,
709 GLenum dst_attachment = 0, std::size_t cubemap_face = 0) { 712 GLenum dst_attachment = 0, std::size_t cubemap_face = 0) {
713 MICROPROFILE_SCOPE(OpenGL_CopySurface);
710 ASSERT_MSG(dst_attachment == 0, "Unimplemented"); 714 ASSERT_MSG(dst_attachment == 0, "Unimplemented");
711 715
712 const auto& src_params{src_surface->GetSurfaceParams()}; 716 const auto& src_params{src_surface->GetSurfaceParams()};
@@ -975,7 +979,7 @@ static void ConvertFormatAsNeeded_FlushGLBuffer(std::vector<u8>& data, PixelForm
975 } 979 }
976} 980}
977 981
978MICROPROFILE_DEFINE(OpenGL_SurfaceLoad, "OpenGL", "Surface Load", MP_RGB(128, 64, 192)); 982MICROPROFILE_DEFINE(OpenGL_SurfaceLoad, "OpenGL", "Surface Load", MP_RGB(128, 192, 64));
979void CachedSurface::LoadGLBuffer() { 983void CachedSurface::LoadGLBuffer() {
980 MICROPROFILE_SCOPE(OpenGL_SurfaceLoad); 984 MICROPROFILE_SCOPE(OpenGL_SurfaceLoad);
981 gl_buffer.resize(params.max_mip_level); 985 gl_buffer.resize(params.max_mip_level);
@@ -1157,7 +1161,7 @@ void CachedSurface::UploadGLMipmapTexture(u32 mip_map, GLuint read_fb_handle,
1157 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0); 1161 glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
1158} 1162}
1159 1163
1160MICROPROFILE_DEFINE(OpenGL_TextureUL, "OpenGL", "Texture Upload", MP_RGB(128, 64, 192)); 1164MICROPROFILE_DEFINE(OpenGL_TextureUL, "OpenGL", "Texture Upload", MP_RGB(128, 192, 64));
1161void CachedSurface::UploadGLTexture(GLuint read_fb_handle, GLuint draw_fb_handle) { 1165void CachedSurface::UploadGLTexture(GLuint read_fb_handle, GLuint draw_fb_handle) {
1162 if (params.type == SurfaceType::Fill) 1166 if (params.type == SurfaceType::Fill)
1163 return; 1167 return;