aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/State/CopyBufferSwizzle.cs
blob: 24071372eb12bb9d58894eaa50a548dd0d49c6b2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace Ryujinx.Graphics.Gpu.State
{
    struct CopyBufferSwizzle
    {
        public uint Swizzle;

        public int UnpackComponentSize()
        {
            return (int)((Swizzle >> 16) & 3) + 1;
        }

        public int UnpackSrcComponentsCount()
        {
            return (int)((Swizzle >> 20) & 7) + 1;
        }

        public int UnpackDstComponentsCount()
        {
            return (int)((Swizzle >> 24) & 7) + 1;
        }
    }
}