summaryrefslogtreecommitdiff
path: root/source/slang/slang-type-system-shared.h
blob: 1c8dd56aa237ab43538e1b32a81c06e2745b46d1 (plain)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef SLANG_TYPE_SYSTEM_SHARED_H
#define SLANG_TYPE_SYSTEM_SHARED_H

#include "../../slang.h"

namespace Slang
{
#define FOREACH_BASE_TYPE(X)    \
    X(Void)                     \
    X(Bool)                     \
    X(Int8)                     \
    X(Int16)                    \
    X(Int)                      \
    X(Int64)                    \
    X(UInt8)                    \
    X(UInt16)                   \
    X(UInt)                     \
    X(UInt64)                   \
    X(Half)                     \
    X(Float)                    \
    X(Double)                   \
    X(Char)                     \
    X(IntPtr)                   \
    X(UIntPtr)                  \
/* end */

    enum class BaseType
    {
#define DEFINE_BASE_TYPE(NAME) NAME,
FOREACH_BASE_TYPE(DEFINE_BASE_TYPE)
#undef DEFINE_BASE_TYPE

        CountOf,
    };

    enum class SamplerStateFlavor : uint8_t
    {
        SamplerState,
        SamplerComparisonState,
    };

    const int kStdlibResourceAccessReadOnly = 0;
    const int kStdlibResourceAccessReadWrite = 1;
    const int kStdlibResourceAccessRasterizerOrdered = 2;
    const int kStdlibResourceAccessFeedback = 3;

    const int kStdlibShapeIndex1D = 0;
    const int kStdlibShapeIndex2D = 1;
    const int kStdlibShapeIndex3D = 2;
    const int kStdlibShapeIndexCube = 3;
    const int kStdlibShapeIndexBuffer = 4;

    const int kStdlibTextureShapeParameterIndex = 1;
    const int kStdlibTextureIsArrayParameterIndex = 2;
    const int kStdlibTextureIsMultisampleParameterIndex = 3;
    const int kStdlibTextureSampleCountParameterIndex = 4;
    const int kStdlibTextureAccessParameterIndex = 5;
    const int kStdlibTextureIsShadowParameterIndex = 6;
    const int kStdlibTextureIsCombinedParameterIndex = 7;
    const int kStdlibTextureFormatParameterIndex = 8;
}

#endif