From 2e2d6cf5e58685933f5dc4c89294c56051b1553c Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Tue, 20 Jul 2021 14:02:08 -0300 Subject: gl_texture_cache: Workaround slow PBO downloads on radeonsi There's an optimization bug on non-git mesa versions where not specifying GL_CLIENT_STORAGE_BIT causes very slow reads on the CPU side. Add this bit for all vendors. --- src/video_core/renderer_opengl/gl_texture_cache.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/renderer_opengl/gl_texture_cache.h b/src/video_core/renderer_opengl/gl_texture_cache.h index 25fe61566..cf3b789e3 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.h +++ b/src/video_core/renderer_opengl/gl_texture_cache.h @@ -122,7 +122,7 @@ private: bool has_broken_texture_view_formats = false; StagingBuffers upload_buffers{GL_MAP_WRITE_BIT, GL_MAP_WRITE_BIT | GL_MAP_FLUSH_EXPLICIT_BIT}; - StagingBuffers download_buffers{GL_MAP_READ_BIT, GL_MAP_READ_BIT}; + StagingBuffers download_buffers{GL_MAP_READ_BIT | GL_CLIENT_STORAGE_BIT, GL_MAP_READ_BIT}; OGLTexture null_image_1d_array; OGLTexture null_image_cube_array; -- cgit v1.2.3