Implemented a lil edge case on RecreateSurface.

This commit is contained in:
Fernando Sahmkow
2019-02-09 20:44:24 -04:00
committed by FernandoS27
parent 99da6362c4
commit 2677cc88c8

View File

@@ -1247,6 +1247,14 @@ Surface RasterizerCacheOpenGL::RecreateSurface(const Surface& old_surface,
return new_surface;
}
if ((old_params.target == SurfaceTarget::Texture2DArray) &&
(new_params.target == SurfaceTarget::Texture2D) &&
GetFormatBpp(old_params.pixel_format) == GetFormatBpp(new_params.pixel_format) &&
old_params.type == new_params.type) {
FastCopySurface(old_surface, new_surface);
return new_surface;
}
switch (new_params.target) {
case SurfaceTarget::Texture2D:
CopySurface(old_surface, new_surface, copy_pbo.handle);