aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.GAL/Target.cs
blob: 73497546eb9b6a799cf1e993f0fb9e6b867ed962 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
namespace Ryujinx.Graphics.GAL
{
    public enum Target
    {
        Texture1D,
        Texture2D,
        Texture3D,
        Texture1DArray,
        Texture2DArray,
        Texture2DMultisample,
        Texture2DMultisampleArray,
        Cubemap,
        CubemapArray,
        TextureBuffer,
    }

    public static class TargetExtensions
    {
        public static bool IsMultisample(this Target target)
        {
            return target == Target.Texture2DMultisample || target == Target.Texture2DMultisampleArray;
        }

        public static bool HasDepthOrLayers(this Target target)
        {
            return target == Target.Texture3D ||
                target == Target.Texture1DArray ||
                target == Target.Texture2DArray ||
                target == Target.Texture2DMultisampleArray ||
                target == Target.Cubemap ||
                target == Target.CubemapArray;
        }
    }
}