TextureInfo.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. using Ryujinx.Graphics.Gal;
  2. namespace Ryujinx.Graphics.Texture
  3. {
  4. public struct TextureInfo
  5. {
  6. public long Position { get; private set; }
  7. public int Width { get; private set; }
  8. public int Height { get; private set; }
  9. public int Pitch { get; private set; }
  10. public int BlockHeight { get; private set; }
  11. public int TileWidth { get; private set; }
  12. public TextureSwizzle Swizzle { get; private set; }
  13. public GalImageFormat Format { get; private set; }
  14. public TextureInfo(
  15. long Position,
  16. int Width,
  17. int Height)
  18. {
  19. this.Position = Position;
  20. this.Width = Width;
  21. this.Height = Height;
  22. Pitch = 0;
  23. BlockHeight = 16;
  24. TileWidth = 1;
  25. Swizzle = TextureSwizzle.BlockLinear;
  26. Format = GalImageFormat.A8B8G8R8 | GalImageFormat.Unorm;
  27. }
  28. public TextureInfo(
  29. long Position,
  30. int Width,
  31. int Height,
  32. int Pitch,
  33. int BlockHeight,
  34. int TileWidth,
  35. TextureSwizzle Swizzle,
  36. GalImageFormat Format)
  37. {
  38. this.Position = Position;
  39. this.Width = Width;
  40. this.Height = Height;
  41. this.Pitch = Pitch;
  42. this.BlockHeight = BlockHeight;
  43. this.TileWidth = TileWidth;
  44. this.Swizzle = Swizzle;
  45. this.Format = Format;
  46. }
  47. }
  48. }