mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-11-23 02:25:12 +00:00
9493cdfe55
* 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.
31 lines
No EOL
680 B
C#
31 lines
No EOL
680 B
C#
using Ryujinx.Common;
|
|
|
|
namespace Ryujinx.Graphics.GAL
|
|
{
|
|
public struct Extents2D
|
|
{
|
|
public int X1 { get; }
|
|
public int Y1 { get; }
|
|
public int X2 { get; }
|
|
public int Y2 { get; }
|
|
|
|
public Extents2D(int x1, int y1, int x2, int y2)
|
|
{
|
|
X1 = x1;
|
|
Y1 = y1;
|
|
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));
|
|
}
|
|
}
|
|
} |