MemoryLayout.cs
1 namespace Ryujinx.Graphics.Gpu.Engine.Types 2 { 3 /// <summary> 4 /// Memory layout parameters, for block linear textures. 5 /// </summary> 6 struct MemoryLayout 7 { 8 #pragma warning disable CS0649 // Field is never assigned to 9 public uint Packed; 10 #pragma warning restore CS0649 11 12 public readonly int UnpackGobBlocksInX() 13 { 14 return 1 << (int)(Packed & 0xf); 15 } 16 17 public readonly int UnpackGobBlocksInY() 18 { 19 return 1 << (int)((Packed >> 4) & 0xf); 20 } 21 22 public readonly int UnpackGobBlocksInZ() 23 { 24 return 1 << (int)((Packed >> 8) & 0xf); 25 } 26 27 public readonly bool UnpackIsLinear() 28 { 29 return (Packed & 0x1000) != 0; 30 } 31 32 public readonly bool UnpackIsTarget3D() 33 { 34 return (Packed & 0x10000) != 0; 35 } 36 } 37 }