Debugging.cs 693 B

12345678910111213141516171819202122232425
  1. using System;
  2. namespace Ryujinx.Graphics.Gpu
  3. {
  4. static class Debugging
  5. {
  6. public static void PrintTexInfo(string prefix, Image.Texture tex)
  7. {
  8. if (tex == null)
  9. {
  10. Console.WriteLine(prefix + " null");
  11. return;
  12. }
  13. string range = $"{tex.Address:X}..{(tex.Address + tex.Size):X}";
  14. int debugId = tex.HostTexture.GetStorageDebugId();
  15. string str = $"{prefix} p {debugId:X8} {tex.Info.Target} {tex.Info.FormatInfo.Format} {tex.Info.Width}x{tex.Info.Height}x{tex.Info.DepthOrLayers} mips {tex.Info.Levels} addr {range}";
  16. Console.WriteLine(str);
  17. }
  18. }
  19. }