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:
parent
cf7044e37b
commit
9493cdfe55
5 changed files with 99 additions and 98 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue