summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2018-08-09 05:30:53 +0200
committerLioncash <mathew1800@gmail.com>2018-08-09 05:34:57 +0200
commite831b80d699b5912597c572f197a879bcdfab45a (patch)
tree09ccdcfc5f2cf83b4e1ae4ec7aecfef594e6dd4a
parentgl_rasterizer_cache: Use std::vector::assign in LoadGLBuffer() for the non-tiled case (diff)
downloadyuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.gz
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.bz2
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.lz
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.xz
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.zst
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.zip
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 9efb5cea4..9b202e5c3 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -456,15 +456,15 @@ void CachedSurface::LoadGLBuffer() {
MICROPROFILE_SCOPE(OpenGL_SurfaceLoad);
- if (!params.is_tiled) {
- const u8* const texture_src_data_end = texture_src_data + copy_size;
-
- gl_buffer.assign(texture_src_data, texture_src_data_end);
- } else {
+ if (params.is_tiled) {
gl_buffer.resize(copy_size);
morton_to_gl_fns[static_cast<size_t>(params.pixel_format)](
params.width, params.block_height, params.height, gl_buffer.data(), params.addr);
+ } else {
+ const u8* const texture_src_data_end = texture_src_data + copy_size;
+
+ gl_buffer.assign(texture_src_data, texture_src_data_end);
}
ConvertFormatAsNeeded_LoadGLBuffer(gl_buffer, params.pixel_format, params.width, params.height);