summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-01-14 21:39:48 +0100
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-01-14 21:39:48 +0100
commit66a1c777c9ce6a19e9205534f3f4910940722f26 (patch)
treee6e61fb06b7c7456064a5148e8dd5561461e0914 /src
parentgl_texture_cache: Fix format for RGBX16F (diff)
downloadyuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.tar
yuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.tar.gz
yuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.tar.bz2
yuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.tar.lz
yuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.tar.xz
yuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.tar.zst
yuzu-66a1c777c9ce6a19e9205534f3f4910940722f26.zip
Diffstat (limited to 'src')
-rw-r--r--src/video_core/renderer_opengl/gl_texture_cache.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp
index 0996053f5..e95eb069e 100644
--- a/src/video_core/renderer_opengl/gl_texture_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp
@@ -253,14 +253,12 @@ void CachedSurface::DownloadTexture(std::vector<u8>& staging_buffer) {
glPixelStorei(GL_PACK_ALIGNMENT, std::min(8U, params.GetRowAlignment(level)));
glPixelStorei(GL_PACK_ROW_LENGTH, static_cast<GLint>(params.GetMipWidth(level)));
const std::size_t mip_offset = params.GetHostMipmapLevelOffset(level);
+ u8* const mip_data = staging_buffer.data() + mip_offset;
+ const GLsizei size = static_cast<GLsizei>(params.GetHostMipmapSize(level));
if (is_compressed) {
- glGetCompressedTextureImage(texture.handle, level,
- static_cast<GLsizei>(params.GetHostMipmapSize(level)),
- staging_buffer.data() + mip_offset);
+ glGetCompressedTextureImage(texture.handle, level, size, mip_data);
} else {
- glGetTextureImage(texture.handle, level, format, type,
- static_cast<GLsizei>(params.GetHostMipmapSize(level)),
- staging_buffer.data() + mip_offset);
+ glGetTextureImage(texture.handle, level, format, type, size, mip_data);
}
}
}