diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 66b6022cb..aa3009b5b 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -723,11 +723,14 @@ void CachedSurface::FlushGLBuffer(PAddr flush_start, PAddr flush_end) { } } +MICROPROFILE_DEFINE(OpenGL_TextureUL, "OpenGL", "Texture Upload", MP_RGB(128, 64, 192)); void CachedSurface::UploadGLTexture(const MathUtil::Rectangle& rect, GLuint read_fb_handle, GLuint draw_fb_handle) { if (type == SurfaceType::Fill) return; + MICROPROFILE_SCOPE(OpenGL_TextureUL); + ASSERT(gl_buffer_size == width * height * GetGLBytesPerPixel(pixel_format)); // Load data from memory to the surface @@ -782,11 +785,14 @@ void CachedSurface::UploadGLTexture(const MathUtil::Rectangle& rect, GLuint } } +MICROPROFILE_DEFINE(OpenGL_TextureDL, "OpenGL", "Texture Download", MP_RGB(128, 192, 64)); void CachedSurface::DownloadGLTexture(const MathUtil::Rectangle& rect, GLuint read_fb_handle, GLuint draw_fb_handle) { if (type == SurfaceType::Fill) return; + MICROPROFILE_SCOPE(OpenGL_TextureDL); + if (gl_buffer == nullptr) { gl_buffer_size = width * height * GetGLBytesPerPixel(pixel_format); gl_buffer.reset(new u8[gl_buffer_size]);