1 /*========================== begin_copyright_notice ============================
2 
3 Copyright (C) 2017-2021 Intel Corporation
4 
5 SPDX-License-Identifier: MIT
6 
7 ============================= end_copyright_notice ===========================*/
8 
9 #ifndef CODE_GEN_PUBLIC_ENUMS_H_
10 #define CODE_GEN_PUBLIC_ENUMS_H_
11 
12 #include "../IGC/common/EmUtils.h"
13 
14 namespace IGC
15 {
16     enum HullShaderDispatchModes : signed int
17     {
18         SINGLE_PATCH_DISPATCH_MODE,
19         DUAL_PATCH_DISPATCH_MODE,
20         EIGHT_PATCH_DISPATCH_MODE,
21     };
22 
23     enum DomainShaderDispatchModes : signed int
24     {
25         DS_SIMD4x2_DISPATCH_MODE = 0x0,
26         DS_SINGLE_PATCH_DISPATCH_MODE = 0x1,
27         DS_DUAL_PATCH_DISPATCH_MODE = 0x2
28     };
29 
30     enum PixelShaderPhaseType
31     {
32         PSPHASE_COARSE,
33         PSPHASE_PIXEL,
34         PSPHASE_SAMPLE,
35         PSPHASE_LEGACY,
36     };
37 
38     enum e_interpolation : signed int
39     {
40         EINTERPOLATION_UNDEFINED,
41         EINTERPOLATION_CONSTANT,
42         EINTERPOLATION_LINEAR,
43         EINTERPOLATION_LINEARCENTROID,
44         EINTERPOLATION_LINEARNOPERSPECTIVE,
45         EINTERPOLATION_LINEARNOPERSPECTIVECENTROID,
46         EINTERPOLATION_LINEARSAMPLE,
47         EINTERPOLATION_LINEARNOPERSPECTIVESAMPLE,
48         EINTERPOLATION_VERTEX,
49         NUMBER_EINTERPOLATION
50     };
51 
52     enum ShaderOutputType : signed int
53     {
54         SHADER_OUTPUT_TYPE_DEFAULT = 0,
55         SHADER_OUTPUT_TYPE_POSITION,
56         SHADER_OUTPUT_TYPE_CLIPDISTANCE_LO,
57         SHADER_OUTPUT_TYPE_CLIPDISTANCE_HI,
58         SHADER_OUTPUT_TYPE_DEPTHOUT,
59         SHADER_OUTPUT_TYPE_STENCIL,
60         SHADER_OUTPUT_TYPE_VIEWPORT_ARRAY_INDEX,
61         SHADER_OUTPUT_TYPE_RENDER_TARGET_ARRAY_INDEX,
62         SHADER_OUTPUT_TYPE_POINTWIDTH,
63         SHADER_OUTPUT_TYPE_OMASK,
64         SHADER_OUTPUT_TYPE_FINAL_LINE_DENSITY_TESSFACTOR,
65         SHADER_OUTPUT_TYPE_FINAL_LINE_DETAIL_TESSFACTOR,
66         SHADER_OUTPUT_TYPE_FINAL_QUAD_U_EQ_0_EDGE_TESSFACTOR,
67         SHADER_OUTPUT_TYPE_FINAL_QUAD_U_EQ_1_EDGE_TESSFACTOR,
68         SHADER_OUTPUT_TYPE_FINAL_QUAD_U_INSIDE_TESSFACTOR,
69         SHADER_OUTPUT_TYPE_FINAL_QUAD_V_EQ_0_EDGE_TESSFACTOR,
70         SHADER_OUTPUT_TYPE_FINAL_QUAD_V_EQ_1_EDGE_TESSFACTOR,
71         SHADER_OUTPUT_TYPE_FINAL_QUAD_V_INSIDE_TESSFACTOR,
72         SHADER_OUTPUT_TYPE_FINAL_TRI_U_EQ_0_EDGE_TESSFACTOR,
73         SHADER_OUTPUT_TYPE_FINAL_TRI_V_EQ_0_EDGE_TESSFACTOR,
74         SHADER_OUTPUT_TYPE_FINAL_TRI_W_EQ_0_EDGE_TESSFACTOR,
75         SHADER_OUTPUT_TYPE_FINAL_TRI_INSIDE_TESSFACTOR,
76         SHADER_OUTPUT_TYPE_COARSE_PIXEL_SIZE,
77         SHADER_OUTPUT_TYPE_UNKNOWN
78     };
79 
80     enum BufferType : short
81     {
82         CONSTANT_BUFFER = 0,
83         UAV,
84         RESOURCE,
85         SLM,
86         POINTER,
87         BINDLESS,
88         BINDLESS_CONSTANT_BUFFER,
89         BINDLESS_TEXTURE,
90         SAMPLER,
91         BINDLESS_SAMPLER,
92         RENDER_TARGET,
93         STATELESS,
94         STATELESS_READONLY,
95         STATELESS_A32,
96         SSH_BINDLESS,
97         SSH_BINDLESS_CONSTANT_BUFFER,
98         SSH_BINDLESS_TEXTURE,
99         BUFFER_TYPE_UNKNOWN = 31
100     };
101 
102     enum BufferAccessType : short
103     {
104         ACCESS_READ = 0,
105         ACCESS_WRITE,
106         ACCESS_READWRITE,
107         ACCESS_SAMPLE,
108         BUFFER_ACCESS_TYPE_UNKNOWN = 15,
109     };
110 
111     enum ADDRESS_SPACE : unsigned int
112     {
113         ADDRESS_SPACE_PRIVATE = 0,
114         ADDRESS_SPACE_GLOBAL = 1,
115         ADDRESS_SPACE_CONSTANT = 2,
116         ADDRESS_SPACE_LOCAL = 3,
117         ADDRESS_SPACE_GENERIC = 4,
118         ADDRESS_SPACE_A32 = 5,
119 
120         ADDRESS_SPACE_GLOBAL_OR_PRIVATE = 20,
121 
122         ADDRESS_SPACE_NUM_ADDRESSES
123     };
124 
125     enum AtomicOp : unsigned int
126     {
127         EATOMIC_IADD,
128         EATOMIC_SUB,
129         EATOMIC_INC,
130         EATOMIC_DEC,
131         EATOMIC_MIN,
132         EATOMIC_MAX,
133         EATOMIC_XCHG,
134         EATOMIC_CMPXCHG,
135         EATOMIC_AND,
136         EATOMIC_OR,
137         EATOMIC_XOR,
138         EATOMIC_IMIN,
139         EATOMIC_IMAX,
140         EATOMIC_UMAX,
141         EATOMIC_UMIN,
142         EATOMIC_PREDEC,
143         EATOMIC_FMIN,
144         EATOMIC_FMAX,
145         EATOMIC_FCMPWR,
146         EATOMIC_FADD,
147         EATOMIC_FSUB,
148         EATOMIC_FADD64,
149         //64 bit
150         EATOMIC_IADD64,
151         EATOMIC_SUB64,
152         EATOMIC_INC64,
153         EATOMIC_DEC64,
154         EATOMIC_MIN64,
155         EATOMIC_MAX64,
156         EATOMIC_XCHG64,
157         EATOMIC_CMPXCHG64,
158         EATOMIC_AND64,
159         EATOMIC_OR64,
160         EATOMIC_XOR64,
161         EATOMIC_IMIN64,
162         EATOMIC_IMAX64,
163         EATOMIC_UMAX64,
164         EATOMIC_UMIN64,
165         EATOMIC_PREDEC64,
166         EATOMIC_UNDEF
167     };
168 
169     enum class WaveOps : unsigned int
170     {
171         SUM,
172         PROD,
173         UMIN,
174         UMAX,
175         IMIN,
176         IMAX,
177         OR,
178         XOR,
179         AND,
180         FSUM,
181         FPROD,
182         FMIN,
183         FMAX,
184         UNDEF
185     };
186 
187     enum GroupOpType
188     {
189         GroupOperationScan,
190         GroupOperationReduce,
191         GroupOperationClusteredReduce
192     };
193 
194     enum SGVUsage
195     {
196         POSITION_X,
197         POSITION_Y,
198         POSITION_Z,
199         POSITION_W,
200         VFACE,
201         PRIMITIVEID,
202         GS_INSTANCEID,
203         POINT_WIDTH,
204         INPUT_COVERAGE_MASK,
205         SAMPLEINDEX,
206         CLIP_DISTANCE,
207         THREAD_ID_X,
208         THREAD_ID_Y,
209         THREAD_ID_Z,
210         THREAD_GROUP_ID_X,
211         THREAD_GROUP_ID_Y,
212         THREAD_GROUP_ID_Z,
213         THREAD_ID_IN_GROUP_X,
214         THREAD_ID_IN_GROUP_Y,
215         THREAD_ID_IN_GROUP_Z,
216         OUTPUT_CONTROL_POINT_ID,
217         DOMAIN_POINT_ID_X,
218         DOMAIN_POINT_ID_Y,
219         DOMAIN_POINT_ID_Z,
220         VERTEX_ID,
221         REQUESTED_COARSE_SIZE_X,
222         REQUESTED_COARSE_SIZE_Y,
223         ACTUAL_COARSE_SIZE_X,
224         ACTUAL_COARSE_SIZE_Y,
225         CLIP_DISTANCE_X,
226         CLIP_DISTANCE_Y,
227         CLIP_DISTANCE_Z,
228         CLIP_DISTANCE_W,
229         POSITION_X_OFFSET,
230         POSITION_Y_OFFSET,
231         RENDER_TARGET_ARRAY_INDEX,
232         MSAA_RATE,
233         XP0,
234         XP1,
235         XP2,
236         POINT_COORD_X,
237         POINT_COORD_Y,
238         VIEWPORT_INDEX,
239         NUM_SGV,
240     };
241 
242     enum Float_DenormMode
243     {
244         FLOAT_DENORM_FLUSH_TO_ZERO = 0,
245         FLOAT_DENORM_RETAIN,
246     };
247 
248     enum ERoundingMode
249     {
250         ROUND_TO_NEAREST_EVEN,
251         ROUND_TO_POSITIVE,
252         ROUND_TO_NEGATIVE,
253         ROUND_TO_ZERO,
254 
255         ROUND_TO_ANY   // dont care
256     };
257 
258 
259 }
260 
261 #endif //CODE_GEN_PUBLIC_ENUMS_H_
262