diff options
| author | gdk <gab.dark.100@gmail.com> | 2019-10-13 03:02:07 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 1876b346fea647e8284a66bb6d62c38801035cff (patch) | |
| tree | 6eeff094298cda84d1613dc5ec0691e51d7b35f1 /Ryujinx.Graphics/Gal/GalImage.cs | |
| parent | f617fb542a0e3d36012d77a4b5acbde7b08902f2 (diff) | |
Initial work
Diffstat (limited to 'Ryujinx.Graphics/Gal/GalImage.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/GalImage.cs | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/Ryujinx.Graphics/Gal/GalImage.cs b/Ryujinx.Graphics/Gal/GalImage.cs deleted file mode 100644 index 1345704d..00000000 --- a/Ryujinx.Graphics/Gal/GalImage.cs +++ /dev/null @@ -1,87 +0,0 @@ -using Ryujinx.Graphics.Texture; - -namespace Ryujinx.Graphics.Gal -{ - public struct GalImage - { - public int Width; - public int Height; - - // FIXME: separate layer and depth - public int Depth; - public int LayerCount; - public int TileWidth; - public int GobBlockHeight; - public int GobBlockDepth; - public int Pitch; - public int MaxMipmapLevel; - - public GalImageFormat Format; - public GalMemoryLayout Layout; - public GalTextureSource XSource; - public GalTextureSource YSource; - public GalTextureSource ZSource; - public GalTextureSource WSource; - public GalTextureTarget TextureTarget; - - public GalImage( - int width, - int height, - int depth, - int layerCount, - int tileWidth, - int gobBlockHeight, - int gobBlockDepth, - GalMemoryLayout layout, - GalImageFormat format, - GalTextureTarget textureTarget, - int maxMipmapLevel = 1, - GalTextureSource xSource = GalTextureSource.Red, - GalTextureSource ySource = GalTextureSource.Green, - GalTextureSource zSource = GalTextureSource.Blue, - GalTextureSource wSource = GalTextureSource.Alpha) - { - Width = width; - Height = height; - LayerCount = layerCount; - Depth = depth; - TileWidth = tileWidth; - GobBlockHeight = gobBlockHeight; - GobBlockDepth = gobBlockDepth; - Layout = layout; - Format = format; - MaxMipmapLevel = maxMipmapLevel; - XSource = xSource; - YSource = ySource; - ZSource = zSource; - WSource = wSource; - TextureTarget = textureTarget; - - Pitch = ImageUtils.GetPitch(format, width); - } - - public bool SizeMatches(GalImage image, bool ignoreLayer = false) - { - if (ImageUtils.GetBytesPerPixel(Format) != - ImageUtils.GetBytesPerPixel(image.Format)) - { - return false; - } - - if (ImageUtils.GetAlignedWidth(this) != - ImageUtils.GetAlignedWidth(image)) - { - return false; - } - - bool result = Height == image.Height && Depth == image.Depth; - - if (!ignoreLayer) - { - result = result && LayerCount == image.LayerCount; - } - - return result; - } - } -}
\ No newline at end of file |
