aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Texture/LinearSwizzle.cs
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2018-09-08 14:51:50 -0300
committergdkchan <gab.dark.100@gmail.com>2018-09-08 14:51:50 -0300
commitce1d5be212e6f71a7ca32c3bd7b48e32d9f51b9a (patch)
tree759fe422127ce08c545d4616ccc9691f668032ec /Ryujinx.Graphics/Texture/LinearSwizzle.cs
parenta0c78f792012cdea060444d7cb6a36dbabb04d52 (diff)
Move GPU emulation from Ryujinx.HLE to Ryujinx.Graphics and misc changes (#402)
* Move GPU LLE emulation from HLE to Graphics * Graphics: Move Gal/Texture to Texture * Remove Engines/ directory and namespace * Use tables for image formats * Abstract OpCode decoding * Simplify image table * Do not leak Read* symbols in TextureReader * Fixups * Rename IGalFrameBuffer -> IGalRenderTarget * Remove MaxBpp hardcoded value * Change yet again texture data and add G8R8 flipping * Rename GalFrameBufferFormat to GalSurfaceFormat * Unident EnsureSetup in ImageHandler * Add IsCompressed * Address some feedback
Diffstat (limited to 'Ryujinx.Graphics/Texture/LinearSwizzle.cs')
-rw-r--r--Ryujinx.Graphics/Texture/LinearSwizzle.cs19
1 files changed, 19 insertions, 0 deletions
diff --git a/Ryujinx.Graphics/Texture/LinearSwizzle.cs b/Ryujinx.Graphics/Texture/LinearSwizzle.cs
new file mode 100644
index 00000000..ef468e27
--- /dev/null
+++ b/Ryujinx.Graphics/Texture/LinearSwizzle.cs
@@ -0,0 +1,19 @@
+namespace Ryujinx.Graphics.Texture
+{
+ class LinearSwizzle : ISwizzle
+ {
+ private int Pitch;
+ private int Bpp;
+
+ public LinearSwizzle(int Pitch, int Bpp)
+ {
+ this.Pitch = Pitch;
+ this.Bpp = Bpp;
+ }
+
+ public int GetSwizzleOffset(int X, int Y)
+ {
+ return X * Bpp + Y * Pitch;
+ }
+ }
+} \ No newline at end of file