Implemented a lil edge case on RecreateSurface.
This commit is contained in:
committed by
FernandoS27
parent
99da6362c4
commit
2677cc88c8
@@ -1247,6 +1247,14 @@ Surface RasterizerCacheOpenGL::RecreateSurface(const Surface& old_surface,
|
|||||||
return new_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) {
|
switch (new_params.target) {
|
||||||
case SurfaceTarget::Texture2D:
|
case SurfaceTarget::Texture2D:
|
||||||
CopySurface(old_surface, new_surface, copy_pbo.handle);
|
CopySurface(old_surface, new_surface, copy_pbo.handle);
|
||||||
|
|||||||
Reference in New Issue
Block a user