summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-08 23:30:53 -0400
committerGravatar Lioncash2018-08-08 23:34:57 -0400
commite831b80d699b5912597c572f197a879bcdfab45a (patch)
tree09ccdcfc5f2cf83b4e1ae4ec7aecfef594e6dd4a
parentgl_rasterizer_cache: Use std::vector::assign in LoadGLBuffer() for the non-ti... (diff)
downloadyuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.gz
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.tar.xz
yuzu-e831b80d699b5912597c572f197a879bcdfab45a.zip
gl_rasterizer_cache: Invert conditional in LoadGLBuffer()
It's generally easier to follow code using conditionals that operate in terms of the true case followed by the false case (no chance of overlooking the exclamation mark).
-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() {
456 456
457 MICROPROFILE_SCOPE(OpenGL_SurfaceLoad); 457 MICROPROFILE_SCOPE(OpenGL_SurfaceLoad);
458 458
459 if (!params.is_tiled) { 459 if (params.is_tiled) {
460 const u8* const texture_src_data_end = texture_src_data + copy_size;
461
462 gl_buffer.assign(texture_src_data, texture_src_data_end);
463 } else {
464 gl_buffer.resize(copy_size); 460 gl_buffer.resize(copy_size);
465 461
466 morton_to_gl_fns[static_cast<size_t>(params.pixel_format)]( 462 morton_to_gl_fns[static_cast<size_t>(params.pixel_format)](
467 params.width, params.block_height, params.height, gl_buffer.data(), params.addr); 463 params.width, params.block_height, params.height, gl_buffer.data(), params.addr);
464 } else {
465 const u8* const texture_src_data_end = texture_src_data + copy_size;
466
467 gl_buffer.assign(texture_src_data, texture_src_data_end);
468 } 468 }
469 469
470 ConvertFormatAsNeeded_LoadGLBuffer(gl_buffer, params.pixel_format, params.width, params.height); 470 ConvertFormatAsNeeded_LoadGLBuffer(gl_buffer, params.pixel_format, params.width, params.height);