Allow copy destination to have a different scale from source (#1711)

* Allow copy destination to have a different scale from source

Will result in more scaled copy destinations, but allows scaling in some games that copy textures to the output framebuffer.

* Support copying multiple levels/layers

Uses glFramebufferTextureLayer to copy multiple layers, copies levels individually (and scales the regions).

Remove CopyArrayScaled, since the backend copy handles it now.
This commit is contained in:
riperiperi 2020-11-20 20:14:45 +00:00 committed by GitHub
parent cf7044e37b
commit 9493cdfe55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 99 additions and 98 deletions

View file

@ -1,3 +1,5 @@
using Ryujinx.Common;
namespace Ryujinx.Graphics.GAL
{
public struct Extents2D
@ -14,5 +16,16 @@ namespace Ryujinx.Graphics.GAL
X2 = x2;
Y2 = y2;
}
public Extents2D Reduce(int level)
{
int div = 1 << level;
return new Extents2D(
X1 >> level,
Y1 >> level,
BitUtils.DivRoundUp(X2, div),
BitUtils.DivRoundUp(Y2, div));
}
}
}