diff options
author | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-16 03:14:04 +0200 |
---|---|---|
committer | FernandoS27 <fsahmkow27@gmail.com> | 2018-10-18 00:52:10 +0200 |
commit | cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d (patch) | |
tree | f320eb08f2893613a3ec72d73d99cf66251abaa8 /src/video_core/renderer_opengl | |
parent | Implement GetInRange in the Rasterizer Cache (diff) | |
download | yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.tar yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.tar.gz yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.tar.bz2 yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.tar.lz yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.tar.xz yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.tar.zst yuzu-cb9fdc7a26ecbf62b384c9828a3c9cbcc350b76d.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index b20ef8fae..9c8925383 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp @@ -1123,8 +1123,8 @@ Surface RasterizerCacheOpenGL::GetSurface(const SurfaceParams& params, bool pres } else if (preserve_contents) { // If surface parameters changed and we care about keeping the previous data, recreate // the surface from the old one - Unregister(surface); Surface new_surface{RecreateSurface(surface, params)}; + Unregister(surface); Register(new_surface); return new_surface; } else { @@ -1214,7 +1214,6 @@ Surface RasterizerCacheOpenGL::RecreateSurface(const Surface& old_surface, const bool is_blit{old_params.pixel_format == new_params.pixel_format}; switch (new_params.target) { - case SurfaceParams::SurfaceTarget::Texture3D: case SurfaceParams::SurfaceTarget::Texture2D: if (is_blit) { BlitSurface(old_surface, new_surface, read_framebuffer.handle, draw_framebuffer.handle); @@ -1222,6 +1221,9 @@ Surface RasterizerCacheOpenGL::RecreateSurface(const Surface& old_surface, CopySurface(old_surface, new_surface, copy_pbo.handle); } break; + case SurfaceParams::SurfaceTarget::Texture3D: + AccurateCopySurface(old_surface, new_surface); + break; case SurfaceParams::SurfaceTarget::TextureCubemap: { if (old_params.rt.array_mode != 1) { // TODO(bunnei): This is used by Breath of the Wild, I'm not sure how to implement this |