|
|
|
@ -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<u32>& 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<u32>& rect, GLuint
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MICROPROFILE_DEFINE(OpenGL_TextureDL, "OpenGL", "Texture Download", MP_RGB(128, 192, 64));
|
|
|
|
|
void CachedSurface::DownloadGLTexture(const MathUtil::Rectangle<u32>& 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]);
|
|
|
|
|