File: igc_regkeys_enums_defs.h

package info (click to toggle)
intel-graphics-compiler 1.0.17791.18-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 102,312 kB
  • sloc: cpp: 935,343; lisp: 286,143; ansic: 16,196; python: 3,279; yacc: 2,487; lex: 1,642; pascal: 300; sh: 174; makefile: 27
file content (103 lines) | stat: -rw-r--r-- 5,599 bytes parent folder | download
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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*========================== begin_copyright_notice ============================

Copyright (C) 2022-2023 Intel Corporation

SPDX-License-Identifier: MIT

============================= end_copyright_notice ===========================*/

//===----------------------------------------------------------------------===//
///
/// This header contains enums that we want to expose via registry keys.
/// By including this at the point of enum definition and using the results
/// in igc_flags.h, we can guarantee that the implementation does not get out
/// of sync with the advertised options.
///
/// Here are the steps to add a new entry (see below for examples):
/// 1. Come up with a name that represents a single entry in your enum (for
///    example, LSC_CACHE_CTRL_OPTION).
/// 2. wrap it in an #ifdef so that only the given value is selected at an
///    include site.
/// 3. Make a define with the plural of the name that lists out the options
///    (for example, LSC_CACHE_CTRL_OPTIONS).
/// 4. At enum definition:
///        a. define the singular macro
///        b. include this file
///        c. invoke the plural macro
///        d. undef both the singular and plural macros
/// 5. Do the same in igc_regkeys.h so the plural macro can be referenced in
///    igc_flags.h.
///
//===----------------------------------------------------------------------===//

#define LSC_CACHE_CTRL_NUM 12
#ifdef LSC_CACHE_CTRL_OPTION
    #define LSC_CACHE_CTRL_OPTIONS_WITH_CTRL_NUM(ctrl_num)                                                                                                      \
        LSC_CACHE_CTRL_OPTION(LSC_L1DEF_L3DEF,     0,  "default")                                                                       \
        LSC_CACHE_CTRL_OPTION(LSC_L1UC_L3UC,       1,  "Load: L1 uncached   L3 uncached # Store: L1 uncached      L3 uncached")         \
        LSC_CACHE_CTRL_OPTION(LSC_L1UC_L3C_WB,     2,  "Load: L1 uncached   L3 cached   # Store: L1 uncached      L3 write-back")       \
        LSC_CACHE_CTRL_OPTION(LSC_L1C_WT_L3UC,     3,  "Load: L1 cached     L3 uncached # Store: L1 write-through L3 uncached")         \
        LSC_CACHE_CTRL_OPTION(LSC_L1C_WT_L3C_WB,   4,  "Load: L1 cached     L3 cached   # Store: L1 write-through L3 write-back")       \
        LSC_CACHE_CTRL_OPTION(LSC_L1S_L3UC,        5,  "Load: L1 streaming  L3 uncached # Store: L1 streaming     L3 uncached")         \
        LSC_CACHE_CTRL_OPTION(LSC_L1S_L3C_WB,      6,  "Load: L1 streaming  L3 cached   # Store: L1 streaming     L3 write-back")       \
        LSC_CACHE_CTRL_OPTION(LSC_L1IAR_WB_L3C_WB, 7,  "Load: L1 invalidate after read L3 cached # Store: L1 write-back L3 write-back") \
        LSC_CACHE_CTRL_OPTION(LSC_L1UC_L3CC,       8,  "Load: L1 uncached   L3 const-cached # Store: N/A")                              \
        LSC_CACHE_CTRL_OPTION(LSC_L1C_L3CC,        9,  "Load: L1 cached     L3 const-cached # Store: N/A")                              \
        LSC_CACHE_CTRL_OPTION(LSC_L1IAR_L3IAR,     10, "Load: L1 invalidate after read L3 invalidate after read # Store: N/A")          \
                                                                                                                                        \
        LSC_CACHE_CTRL_OPTION(LSC_CC_INVALID,      11, "Invalid") \
        LSC_CACHE_CTRL_OPTION(LSC_CC_NUM,          ctrl_num, "Invalid")

    #define LSC_CACHE_CTRL_OPTIONS LSC_CACHE_CTRL_OPTIONS_WITH_CTRL_NUM(LSC_CACHE_CTRL_NUM)
#endif // LSC_CACHE_CTRL_OPTION

#ifdef EARLY_OUT_CS_PATTERN
    #define EARLY_OUT_CS_PATTERNS                           \
        EARLY_OUT_CS_PATTERN(SamplePatternEnable,     0x1)  \
        EARLY_OUT_CS_PATTERN(DPMaxPatternEnable,      0x2)  \
        EARLY_OUT_CS_PATTERN(DPFSatPatternEnable,     0x4)  \
        EARLY_OUT_CS_PATTERN(NdotLPatternEnable,      0x8)  \
        EARLY_OUT_CS_PATTERN(SelectFcmpPatternEnable, 0x10)
#endif // EARLY_OUT_CS_PATTERN

#ifdef EARLY_OUT_PS_PATTERN
    #define EARLY_OUT_PS_PATTERNS                             \
        EARLY_OUT_PS_PATTERN(SamplePatternEnable,       0x1)  \
        EARLY_OUT_PS_PATTERN(DPMaxPatternEnable,        0x2)  \
        EARLY_OUT_PS_PATTERN(DPFSatPatternEnable,       0x4)  \
        EARLY_OUT_PS_PATTERN(NdotLPatternEnable,        0x8)  \
        EARLY_OUT_PS_PATTERN(DirectOutputPatternEnable, 0x10) \
        EARLY_OUT_PS_PATTERN(MulMaxMatchEnable,         0x20)
#endif // EARLY_OUT_PS_PATTERN

// Not able to convert a C++ value (ShaderType::) back to preprocessor
// copy value by hand
#ifdef SHADER_TYPE_MASK
#define SHADER_TYPE_MASKS   \
            SHADER_TYPE_MASK(VS,       0x2) \
            SHADER_TYPE_MASK(HS,       0x4) \
            SHADER_TYPE_MASK(DS,       0x8) \
            SHADER_TYPE_MASK(GS,       0x10)\
            SHADER_TYPE_MASK(TS,       0x20)\
            SHADER_TYPE_MASK(MS,       0x40)\
            SHADER_TYPE_MASK(PS,       0x80)\
            SHADER_TYPE_MASK(CS,       0x100)   \
            SHADER_TYPE_MASK(OCL,      0x200)   \
            SHADER_TYPE_MASK(RT,       0x400)
#endif // SHADER_TYPE_MASKS

#ifdef FP_BINOP_INSTRUCTION
    #define FP_BINOP_INSTRUCTIONS                  \
            FP_BINOP_INSTRUCTION(FAdd,       0x1)  \
            FP_BINOP_INSTRUCTION(FSub,       0x2)  \
            FP_BINOP_INSTRUCTION(FMul,       0x4)  \
            FP_BINOP_INSTRUCTION(FDiv,       0x8)
#endif // FP_BINOP_INSTRUCTION

#ifdef TRIBOOL_OPTION
#define TRIBOOL_OPTIONS         \
    TRIBOOL_OPTION(Default, -1) \
    TRIBOOL_OPTION(Disabled, 0) \
    TRIBOOL_OPTION(Enabled,  1)
#endif // TRIBOOL_OPTION