MemoryLayout.cs 642 B

1234567891011121314151617181920212223242526272829303132
  1. namespace Ryujinx.Graphics.Gpu.State
  2. {
  3. struct MemoryLayout
  4. {
  5. public uint Packed;
  6. public int UnpackGobBlocksInX()
  7. {
  8. return 1 << (int)(Packed & 0xf);
  9. }
  10. public int UnpackGobBlocksInY()
  11. {
  12. return 1 << (int)((Packed >> 4) & 0xf);
  13. }
  14. public int UnpackGobBlocksInZ()
  15. {
  16. return 1 << (int)((Packed >> 8) & 0xf);
  17. }
  18. public bool UnpackIsLinear()
  19. {
  20. return (Packed & 0x1000) != 0;
  21. }
  22. public bool UnpackIsTarget3D()
  23. {
  24. return (Packed & 0x10000) != 0;
  25. }
  26. }
  27. }