diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-16 04:10:32 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-16 08:13:27 +0100 |
commit | fd62bdf37745bbddd3fe2824d312c9da7c49a3ca (patch) | |
tree | 796fbc3e4e283c7933fcfd7dfd495132da95b351 /src/video_core/renderer_opengl/gl_texture_cache.cpp | |
parent | Merge pull request #3401 from FernandoS27/synchronization (diff) | |
download | yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.gz yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.bz2 yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.lz yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.xz yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.tar.zst yuzu-fd62bdf37745bbddd3fe2824d312c9da7c49a3ca.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index d4b81cd87..5c1ae1418 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -260,6 +260,13 @@ CachedSurface::~CachedSurface() = default; void CachedSurface::DownloadTexture(std::vector<u8>& staging_buffer) { MICROPROFILE_SCOPE(OpenGL_Texture_Download); + if (params.IsBuffer()) { + glGetNamedBufferSubData(texture_buffer.handle, 0, + static_cast<GLsizeiptr>(params.GetHostSizeInBytes()), + staging_buffer.data()); + return; + } + SCOPE_EXIT({ glPixelStorei(GL_PACK_ROW_LENGTH, 0); }); for (u32 level = 0; level < params.emulated_levels; ++level) { |