LinearSwizzle.cs 380 B

12345678910111213141516171819
  1. namespace Ryujinx.Graphics.Texture
  2. {
  3. class LinearSwizzle : ISwizzle
  4. {
  5. private int Pitch;
  6. private int Bpp;
  7. public LinearSwizzle(int Pitch, int Bpp)
  8. {
  9. this.Pitch = Pitch;
  10. this.Bpp = Bpp;
  11. }
  12. public int GetSwizzleOffset(int X, int Y)
  13. {
  14. return X * Bpp + Y * Pitch;
  15. }
  16. }
  17. }