2018-04-08 19:17:35 +00:00
|
|
|
using Ryujinx.Graphics.Gal;
|
|
|
|
|
2018-09-08 17:51:50 +00:00
|
|
|
namespace Ryujinx.Graphics.Texture
|
2018-04-08 19:17:35 +00:00
|
|
|
{
|
2018-09-08 17:51:50 +00:00
|
|
|
public struct TextureInfo
|
2018-04-08 19:17:35 +00:00
|
|
|
{
|
|
|
|
public long Position { get; private set; }
|
|
|
|
|
|
|
|
public int Width { get; private set; }
|
|
|
|
public int Height { get; private set; }
|
2018-04-08 20:09:41 +00:00
|
|
|
public int Pitch { get; private set; }
|
2018-04-08 19:17:35 +00:00
|
|
|
|
|
|
|
public int BlockHeight { get; private set; }
|
2018-07-19 05:30:21 +00:00
|
|
|
public int TileWidth { get; private set; }
|
2018-04-08 19:17:35 +00:00
|
|
|
|
|
|
|
public TextureSwizzle Swizzle { get; private set; }
|
|
|
|
|
2018-09-08 17:51:50 +00:00
|
|
|
public GalImageFormat Format { get; private set; }
|
2018-04-08 19:17:35 +00:00
|
|
|
|
2018-06-24 00:39:25 +00:00
|
|
|
public TextureInfo(
|
2018-04-13 18:12:58 +00:00
|
|
|
long Position,
|
|
|
|
int Width,
|
|
|
|
int Height)
|
|
|
|
{
|
|
|
|
this.Position = Position;
|
|
|
|
this.Width = Width;
|
|
|
|
this.Height = Height;
|
|
|
|
|
|
|
|
Pitch = 0;
|
|
|
|
|
|
|
|
BlockHeight = 16;
|
|
|
|
|
2018-07-19 05:30:21 +00:00
|
|
|
TileWidth = 1;
|
|
|
|
|
2018-04-13 18:12:58 +00:00
|
|
|
Swizzle = TextureSwizzle.BlockLinear;
|
|
|
|
|
2018-09-08 17:51:50 +00:00
|
|
|
Format = GalImageFormat.A8B8G8R8 | GalImageFormat.Unorm;
|
2018-04-13 18:12:58 +00:00
|
|
|
}
|
|
|
|
|
2018-06-24 00:39:25 +00:00
|
|
|
public TextureInfo(
|
2018-04-08 19:17:35 +00:00
|
|
|
long Position,
|
|
|
|
int Width,
|
|
|
|
int Height,
|
2018-04-08 20:09:41 +00:00
|
|
|
int Pitch,
|
2018-04-08 19:17:35 +00:00
|
|
|
int BlockHeight,
|
2018-07-19 05:30:21 +00:00
|
|
|
int TileWidth,
|
2018-04-08 19:17:35 +00:00
|
|
|
TextureSwizzle Swizzle,
|
2018-09-08 17:51:50 +00:00
|
|
|
GalImageFormat Format)
|
2018-04-08 19:17:35 +00:00
|
|
|
{
|
2018-07-19 05:30:21 +00:00
|
|
|
this.Position = Position;
|
|
|
|
this.Width = Width;
|
|
|
|
this.Height = Height;
|
|
|
|
this.Pitch = Pitch;
|
|
|
|
this.BlockHeight = BlockHeight;
|
|
|
|
this.TileWidth = TileWidth;
|
|
|
|
this.Swizzle = Swizzle;
|
|
|
|
this.Format = Format;
|
2018-04-08 19:17:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|