Texture.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. using Ryujinx.Graphics.Gal;
  2. namespace Ryujinx.Graphics.Gpu
  3. {
  4. public struct Texture
  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 TextureSwizzle Swizzle { get; private set; }
  12. public GalTextureFormat Format { get; private set; }
  13. public Texture(
  14. long Position,
  15. int Width,
  16. int Height)
  17. {
  18. this.Position = Position;
  19. this.Width = Width;
  20. this.Height = Height;
  21. Pitch = 0;
  22. BlockHeight = 16;
  23. Swizzle = TextureSwizzle.BlockLinear;
  24. Format = GalTextureFormat.A8B8G8R8;
  25. }
  26. public Texture(
  27. long Position,
  28. int Width,
  29. int Height,
  30. int Pitch,
  31. int BlockHeight,
  32. TextureSwizzle Swizzle,
  33. GalTextureFormat Format)
  34. {
  35. this.Position = Position;
  36. this.Width = Width;
  37. this.Height = Height;
  38. this.Pitch = Pitch;
  39. this.BlockHeight = BlockHeight;
  40. this.Swizzle = Swizzle;
  41. this.Format = Format;
  42. }
  43. }
  44. }