Initial code release
[adaptation/xorg-x11-drv-intel.git] / src / brw_defines.h
1  /**************************************************************************
2  * 
3  * Copyright 2005 Tungsten Graphics, Inc., Cedar Park, Texas.
4  * All Rights Reserved.
5  * 
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the
8  * "Software"), to deal in the Software without restriction, including
9  * without limitation the rights to use, copy, modify, merge, publish,
10  * distribute, sub license, and/or sell copies of the Software, and to
11  * permit persons to whom the Software is furnished to do so, subject to
12  * the following conditions:
13  * 
14  * The above copyright notice and this permission notice (including the
15  * next paragraph) shall be included in all copies or substantial portions
16  * of the Software.
17  * 
18  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21  * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
22  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25  * 
26  **************************************************************************/
27
28 #ifndef BRW_DEFINES_H
29 #define BRW_DEFINES_H
30
31 /*
32  */
33 #if 0
34 #define MI_NOOP                              0x00
35 #define MI_USER_INTERRUPT                    0x02
36 #define MI_WAIT_FOR_EVENT                    0x03
37 #define MI_FLUSH                             0x04
38 #define MI_REPORT_HEAD                       0x07
39 #define MI_ARB_ON_OFF                        0x08
40 #define MI_BATCH_BUFFER_END                  0x0A
41 #define MI_OVERLAY_FLIP                      0x11
42 #define MI_LOAD_SCAN_LINES_INCL              0x12
43 #define MI_LOAD_SCAN_LINES_EXCL              0x13
44 #define MI_DISPLAY_BUFFER_INFO               0x14
45 #define MI_SET_CONTEXT                       0x18
46 #define MI_STORE_DATA_IMM                    0x20
47 #define MI_STORE_DATA_INDEX                  0x21
48 #define MI_LOAD_REGISTER_IMM                 0x22
49 #define MI_STORE_REGISTER_MEM                0x24
50 #define MI_BATCH_BUFFER_START                0x31
51
52 #define MI_SYNCHRONOUS_FLIP                  0x0 
53 #define MI_ASYNCHRONOUS_FLIP                 0x1
54
55 #define MI_BUFFER_SECURE                     0x0 
56 #define MI_BUFFER_NONSECURE                  0x1
57
58 #define MI_ARBITRATE_AT_CHAIN_POINTS         0x0 
59 #define MI_ARBITRATE_BETWEEN_INSTS           0x1
60 #define MI_NO_ARBITRATION                    0x3 
61
62 #define MI_CONDITION_CODE_WAIT_DISABLED      0x0
63 #define MI_CONDITION_CODE_WAIT_0             0x1
64 #define MI_CONDITION_CODE_WAIT_1             0x2
65 #define MI_CONDITION_CODE_WAIT_2             0x3
66 #define MI_CONDITION_CODE_WAIT_3             0x4
67 #define MI_CONDITION_CODE_WAIT_4             0x5
68
69 #define MI_DISPLAY_PIPE_A                    0x0
70 #define MI_DISPLAY_PIPE_B                    0x1
71
72 #define MI_DISPLAY_PLANE_A                   0x0 
73 #define MI_DISPLAY_PLANE_B                   0x1
74 #define MI_DISPLAY_PLANE_C                   0x2
75
76 #define MI_STANDARD_FLIP                                 0x0
77 #define MI_ENQUEUE_FLIP_PERFORM_BASE_FRAME_NUMBER_LOAD   0x1
78 #define MI_ENQUEUE_FLIP_TARGET_FRAME_NUMBER_RELATIVE     0x2
79 #define MI_ENQUEUE_FLIP_ABSOLUTE_TARGET_FRAME_NUMBER     0x3
80
81 #define MI_PHYSICAL_ADDRESS                  0x0
82 #define MI_VIRTUAL_ADDRESS                   0x1
83
84 #define MI_BUFFER_MEMORY_MAIN                0x0 
85 #define MI_BUFFER_MEMORY_GTT                 0x2
86 #define MI_BUFFER_MEMORY_PER_PROCESS_GTT     0x3 
87
88 #define MI_FLIP_CONTINUE                     0x0
89 #define MI_FLIP_ON                           0x1
90 #define MI_FLIP_OFF                          0x2
91
92 #define MI_UNTRUSTED_REGISTER_SPACE          0x0
93 #define MI_TRUSTED_REGISTER_SPACE            0x1
94 #endif
95
96 /* 3D state:
97  */
98 #define _3DOP_3DSTATE_PIPELINED       0x0
99 #define _3DOP_3DSTATE_NONPIPELINED    0x1
100 #define _3DOP_3DCONTROL               0x2
101 #define _3DOP_3DPRIMITIVE             0x3
102
103 #define _3DSTATE_PIPELINED_POINTERS       0x00
104 #define _3DSTATE_BINDING_TABLE_POINTERS   0x01
105 #define _3DSTATE_VERTEX_BUFFERS           0x08
106 #define _3DSTATE_VERTEX_ELEMENTS          0x09
107 #define _3DSTATE_INDEX_BUFFER             0x0A
108 #define _3DSTATE_VF_STATISTICS            0x0B
109 #define _3DSTATE_DRAWING_RECTANGLE            0x00
110 #define _3DSTATE_CONSTANT_COLOR               0x01
111 #define _3DSTATE_SAMPLER_PALETTE_LOAD         0x02
112 #define _3DSTATE_CHROMA_KEY                   0x04
113 #define _3DSTATE_DEPTH_BUFFER                 0x05
114 #define _3DSTATE_POLY_STIPPLE_OFFSET          0x06
115 #define _3DSTATE_POLY_STIPPLE_PATTERN         0x07
116 #define _3DSTATE_LINE_STIPPLE                 0x08
117 #define _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP    0x09
118 #define _3DCONTROL    0x00
119 #define _3DPRIMITIVE  0x00
120
121 #define PIPE_CONTROL_NOWRITE          0x00
122 #define PIPE_CONTROL_WRITEIMMEDIATE   0x01
123 #define PIPE_CONTROL_WRITEDEPTH       0x02
124 #define PIPE_CONTROL_WRITETIMESTAMP   0x03
125
126 #define PIPE_CONTROL_GTTWRITE_PROCESS_LOCAL 0x00
127 #define PIPE_CONTROL_GTTWRITE_GLOBAL        0x01
128
129 #define _3DPRIM_POINTLIST         0x01
130 #define _3DPRIM_LINELIST          0x02
131 #define _3DPRIM_LINESTRIP         0x03
132 #define _3DPRIM_TRILIST           0x04
133 #define _3DPRIM_TRISTRIP          0x05
134 #define _3DPRIM_TRIFAN            0x06
135 #define _3DPRIM_QUADLIST          0x07
136 #define _3DPRIM_QUADSTRIP         0x08
137 #define _3DPRIM_LINELIST_ADJ      0x09
138 #define _3DPRIM_LINESTRIP_ADJ     0x0A
139 #define _3DPRIM_TRILIST_ADJ       0x0B
140 #define _3DPRIM_TRISTRIP_ADJ      0x0C
141 #define _3DPRIM_TRISTRIP_REVERSE  0x0D
142 #define _3DPRIM_POLYGON           0x0E
143 #define _3DPRIM_RECTLIST          0x0F
144 #define _3DPRIM_LINELOOP          0x10
145 #define _3DPRIM_POINTLIST_BF      0x11
146 #define _3DPRIM_LINESTRIP_CONT    0x12
147 #define _3DPRIM_LINESTRIP_BF      0x13
148 #define _3DPRIM_LINESTRIP_CONT_BF 0x14
149 #define _3DPRIM_TRIFAN_NOSTIPPLE  0x15
150
151 #define _3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL 0
152 #define _3DPRIM_VERTEXBUFFER_ACCESS_RANDOM     1
153
154 #define BRW_ANISORATIO_2     0 
155 #define BRW_ANISORATIO_4     1 
156 #define BRW_ANISORATIO_6     2 
157 #define BRW_ANISORATIO_8     3 
158 #define BRW_ANISORATIO_10    4 
159 #define BRW_ANISORATIO_12    5 
160 #define BRW_ANISORATIO_14    6 
161 #define BRW_ANISORATIO_16    7
162
163 #define BRW_BLENDFACTOR_ONE                 0x1
164 #define BRW_BLENDFACTOR_SRC_COLOR           0x2
165 #define BRW_BLENDFACTOR_SRC_ALPHA           0x3
166 #define BRW_BLENDFACTOR_DST_ALPHA           0x4
167 #define BRW_BLENDFACTOR_DST_COLOR           0x5
168 #define BRW_BLENDFACTOR_SRC_ALPHA_SATURATE  0x6
169 #define BRW_BLENDFACTOR_CONST_COLOR         0x7
170 #define BRW_BLENDFACTOR_CONST_ALPHA         0x8
171 #define BRW_BLENDFACTOR_SRC1_COLOR          0x9
172 #define BRW_BLENDFACTOR_SRC1_ALPHA          0x0A
173 #define BRW_BLENDFACTOR_ZERO                0x11
174 #define BRW_BLENDFACTOR_INV_SRC_COLOR       0x12
175 #define BRW_BLENDFACTOR_INV_SRC_ALPHA       0x13
176 #define BRW_BLENDFACTOR_INV_DST_ALPHA       0x14
177 #define BRW_BLENDFACTOR_INV_DST_COLOR       0x15
178 #define BRW_BLENDFACTOR_INV_CONST_COLOR     0x17
179 #define BRW_BLENDFACTOR_INV_CONST_ALPHA     0x18
180 #define BRW_BLENDFACTOR_INV_SRC1_COLOR      0x19
181 #define BRW_BLENDFACTOR_INV_SRC1_ALPHA      0x1A
182
183 #define BRW_BLENDFUNCTION_ADD               0
184 #define BRW_BLENDFUNCTION_SUBTRACT          1
185 #define BRW_BLENDFUNCTION_REVERSE_SUBTRACT  2
186 #define BRW_BLENDFUNCTION_MIN               3
187 #define BRW_BLENDFUNCTION_MAX               4
188
189 #define BRW_ALPHATEST_FORMAT_UNORM8         0
190 #define BRW_ALPHATEST_FORMAT_FLOAT32        1
191
192 #define BRW_CHROMAKEY_KILL_ON_ANY_MATCH  0
193 #define BRW_CHROMAKEY_REPLACE_BLACK      1
194
195 #define BRW_CLIP_API_OGL     0
196 #define BRW_CLIP_API_DX      1
197
198 #define BRW_CLIPMODE_NORMAL              0
199 #define BRW_CLIPMODE_CLIP_ALL            1
200 #define BRW_CLIPMODE_CLIP_NON_REJECTED   2
201 #define BRW_CLIPMODE_REJECT_ALL          3
202 #define BRW_CLIPMODE_ACCEPT_ALL          4
203
204 #define BRW_CLIP_NDCSPACE     0
205 #define BRW_CLIP_SCREENSPACE  1
206
207 #define BRW_COMPAREFUNCTION_ALWAYS       0
208 #define BRW_COMPAREFUNCTION_NEVER        1
209 #define BRW_COMPAREFUNCTION_LESS         2
210 #define BRW_COMPAREFUNCTION_EQUAL        3
211 #define BRW_COMPAREFUNCTION_LEQUAL       4
212 #define BRW_COMPAREFUNCTION_GREATER      5
213 #define BRW_COMPAREFUNCTION_NOTEQUAL     6
214 #define BRW_COMPAREFUNCTION_GEQUAL       7
215
216 #define BRW_COVERAGE_PIXELS_HALF     0
217 #define BRW_COVERAGE_PIXELS_1        1
218 #define BRW_COVERAGE_PIXELS_2        2
219 #define BRW_COVERAGE_PIXELS_4        3
220
221 #define BRW_CULLMODE_BOTH        0
222 #define BRW_CULLMODE_NONE        1
223 #define BRW_CULLMODE_FRONT       2
224 #define BRW_CULLMODE_BACK        3
225
226 #define BRW_DEFAULTCOLOR_R8G8B8A8_UNORM      0
227 #define BRW_DEFAULTCOLOR_R32G32B32A32_FLOAT  1
228
229 #define BRW_DEPTHFORMAT_D32_FLOAT_S8X24_UINT     0
230 #define BRW_DEPTHFORMAT_D32_FLOAT                1
231 #define BRW_DEPTHFORMAT_D24_UNORM_S8_UINT        2
232 #define BRW_DEPTHFORMAT_D16_UNORM                5
233
234 #define BRW_FLOATING_POINT_IEEE_754        0
235 #define BRW_FLOATING_POINT_NON_IEEE_754    1
236
237 #define BRW_FRONTWINDING_CW      0
238 #define BRW_FRONTWINDING_CCW     1
239
240 #define BRW_INDEX_BYTE     0
241 #define BRW_INDEX_WORD     1
242 #define BRW_INDEX_DWORD    2
243
244 #define BRW_LOGICOPFUNCTION_CLEAR            0
245 #define BRW_LOGICOPFUNCTION_NOR              1
246 #define BRW_LOGICOPFUNCTION_AND_INVERTED     2
247 #define BRW_LOGICOPFUNCTION_COPY_INVERTED    3
248 #define BRW_LOGICOPFUNCTION_AND_REVERSE      4
249 #define BRW_LOGICOPFUNCTION_INVERT           5
250 #define BRW_LOGICOPFUNCTION_XOR              6
251 #define BRW_LOGICOPFUNCTION_NAND             7
252 #define BRW_LOGICOPFUNCTION_AND              8
253 #define BRW_LOGICOPFUNCTION_EQUIV            9
254 #define BRW_LOGICOPFUNCTION_NOOP             10
255 #define BRW_LOGICOPFUNCTION_OR_INVERTED      11
256 #define BRW_LOGICOPFUNCTION_COPY             12
257 #define BRW_LOGICOPFUNCTION_OR_REVERSE       13
258 #define BRW_LOGICOPFUNCTION_OR               14
259 #define BRW_LOGICOPFUNCTION_SET              15  
260
261 #define BRW_MAPFILTER_NEAREST        0x0 
262 #define BRW_MAPFILTER_LINEAR         0x1 
263 #define BRW_MAPFILTER_ANISOTROPIC    0x2
264
265 #define BRW_MIPFILTER_NONE        0   
266 #define BRW_MIPFILTER_NEAREST     1   
267 #define BRW_MIPFILTER_LINEAR      3
268
269 #define BRW_POLYGON_FRONT_FACING     0
270 #define BRW_POLYGON_BACK_FACING      1
271
272 #define BRW_PREFILTER_ALWAYS     0x0 
273 #define BRW_PREFILTER_NEVER      0x1
274 #define BRW_PREFILTER_LESS       0x2
275 #define BRW_PREFILTER_EQUAL      0x3
276 #define BRW_PREFILTER_LEQUAL     0x4
277 #define BRW_PREFILTER_GREATER    0x5
278 #define BRW_PREFILTER_NOTEQUAL   0x6
279 #define BRW_PREFILTER_GEQUAL     0x7
280
281 #define BRW_PROVOKING_VERTEX_0    0
282 #define BRW_PROVOKING_VERTEX_1    1 
283 #define BRW_PROVOKING_VERTEX_2    2
284
285 #define BRW_RASTRULE_UPPER_LEFT  0    
286 #define BRW_RASTRULE_UPPER_RIGHT 1
287
288 #define BRW_RENDERTARGET_CLAMPRANGE_UNORM    0
289 #define BRW_RENDERTARGET_CLAMPRANGE_SNORM    1
290 #define BRW_RENDERTARGET_CLAMPRANGE_FORMAT   2
291
292 #define BRW_STENCILOP_KEEP               0
293 #define BRW_STENCILOP_ZERO               1
294 #define BRW_STENCILOP_REPLACE            2
295 #define BRW_STENCILOP_INCRSAT            3
296 #define BRW_STENCILOP_DECRSAT            4
297 #define BRW_STENCILOP_INCR               5
298 #define BRW_STENCILOP_DECR               6
299 #define BRW_STENCILOP_INVERT             7
300
301 #define BRW_SURFACE_MIPMAPLAYOUT_BELOW   0
302 #define BRW_SURFACE_MIPMAPLAYOUT_RIGHT   1
303
304 #define BRW_SURFACEFORMAT_R32G32B32A32_FLOAT             0x000 
305 #define BRW_SURFACEFORMAT_R32G32B32A32_SINT              0x001 
306 #define BRW_SURFACEFORMAT_R32G32B32A32_UINT              0x002 
307 #define BRW_SURFACEFORMAT_R32G32B32A32_UNORM             0x003 
308 #define BRW_SURFACEFORMAT_R32G32B32A32_SNORM             0x004 
309 #define BRW_SURFACEFORMAT_R64G64_FLOAT                   0x005 
310 #define BRW_SURFACEFORMAT_R32G32B32X32_FLOAT             0x006 
311 #define BRW_SURFACEFORMAT_R32G32B32A32_SSCALED           0x007
312 #define BRW_SURFACEFORMAT_R32G32B32A32_USCALED           0x008
313 #define BRW_SURFACEFORMAT_R32G32B32_FLOAT                0x040 
314 #define BRW_SURFACEFORMAT_R32G32B32_SINT                 0x041 
315 #define BRW_SURFACEFORMAT_R32G32B32_UINT                 0x042 
316 #define BRW_SURFACEFORMAT_R32G32B32_UNORM                0x043 
317 #define BRW_SURFACEFORMAT_R32G32B32_SNORM                0x044 
318 #define BRW_SURFACEFORMAT_R32G32B32_SSCALED              0x045 
319 #define BRW_SURFACEFORMAT_R32G32B32_USCALED              0x046 
320 #define BRW_SURFACEFORMAT_R16G16B16A16_UNORM             0x080 
321 #define BRW_SURFACEFORMAT_R16G16B16A16_SNORM             0x081 
322 #define BRW_SURFACEFORMAT_R16G16B16A16_SINT              0x082 
323 #define BRW_SURFACEFORMAT_R16G16B16A16_UINT              0x083 
324 #define BRW_SURFACEFORMAT_R16G16B16A16_FLOAT             0x084 
325 #define BRW_SURFACEFORMAT_R32G32_FLOAT                   0x085 
326 #define BRW_SURFACEFORMAT_R32G32_SINT                    0x086 
327 #define BRW_SURFACEFORMAT_R32G32_UINT                    0x087 
328 #define BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS       0x088 
329 #define BRW_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT        0x089 
330 #define BRW_SURFACEFORMAT_L32A32_FLOAT                   0x08A 
331 #define BRW_SURFACEFORMAT_R32G32_UNORM                   0x08B 
332 #define BRW_SURFACEFORMAT_R32G32_SNORM                   0x08C 
333 #define BRW_SURFACEFORMAT_R64_FLOAT                      0x08D 
334 #define BRW_SURFACEFORMAT_R16G16B16X16_UNORM             0x08E 
335 #define BRW_SURFACEFORMAT_R16G16B16X16_FLOAT             0x08F 
336 #define BRW_SURFACEFORMAT_A32X32_FLOAT                   0x090 
337 #define BRW_SURFACEFORMAT_L32X32_FLOAT                   0x091 
338 #define BRW_SURFACEFORMAT_I32X32_FLOAT                   0x092 
339 #define BRW_SURFACEFORMAT_R16G16B16A16_SSCALED           0x093
340 #define BRW_SURFACEFORMAT_R16G16B16A16_USCALED           0x094
341 #define BRW_SURFACEFORMAT_R32G32_SSCALED                 0x095
342 #define BRW_SURFACEFORMAT_R32G32_USCALED                 0x096
343 #define BRW_SURFACEFORMAT_B8G8R8A8_UNORM                 0x0C0 
344 #define BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB            0x0C1 
345 #define BRW_SURFACEFORMAT_R10G10B10A2_UNORM              0x0C2 
346 #define BRW_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB         0x0C3 
347 #define BRW_SURFACEFORMAT_R10G10B10A2_UINT               0x0C4 
348 #define BRW_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM       0x0C5 
349 #define BRW_SURFACEFORMAT_R8G8B8A8_UNORM                 0x0C7 
350 #define BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB            0x0C8 
351 #define BRW_SURFACEFORMAT_R8G8B8A8_SNORM                 0x0C9 
352 #define BRW_SURFACEFORMAT_R8G8B8A8_SINT                  0x0CA 
353 #define BRW_SURFACEFORMAT_R8G8B8A8_UINT                  0x0CB 
354 #define BRW_SURFACEFORMAT_R16G16_UNORM                   0x0CC 
355 #define BRW_SURFACEFORMAT_R16G16_SNORM                   0x0CD 
356 #define BRW_SURFACEFORMAT_R16G16_SINT                    0x0CE 
357 #define BRW_SURFACEFORMAT_R16G16_UINT                    0x0CF 
358 #define BRW_SURFACEFORMAT_R16G16_FLOAT                   0x0D0 
359 #define BRW_SURFACEFORMAT_B10G10R10A2_UNORM              0x0D1 
360 #define BRW_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB         0x0D2 
361 #define BRW_SURFACEFORMAT_R11G11B10_FLOAT                0x0D3 
362 #define BRW_SURFACEFORMAT_R32_SINT                       0x0D6 
363 #define BRW_SURFACEFORMAT_R32_UINT                       0x0D7 
364 #define BRW_SURFACEFORMAT_R32_FLOAT                      0x0D8 
365 #define BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS          0x0D9 
366 #define BRW_SURFACEFORMAT_X24_TYPELESS_G8_UINT           0x0DA 
367 #define BRW_SURFACEFORMAT_L16A16_UNORM                   0x0DF 
368 #define BRW_SURFACEFORMAT_I24X8_UNORM                    0x0E0 
369 #define BRW_SURFACEFORMAT_L24X8_UNORM                    0x0E1 
370 #define BRW_SURFACEFORMAT_A24X8_UNORM                    0x0E2 
371 #define BRW_SURFACEFORMAT_I32_FLOAT                      0x0E3 
372 #define BRW_SURFACEFORMAT_L32_FLOAT                      0x0E4 
373 #define BRW_SURFACEFORMAT_A32_FLOAT                      0x0E5 
374 #define BRW_SURFACEFORMAT_B8G8R8X8_UNORM                 0x0E9 
375 #define BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB            0x0EA 
376 #define BRW_SURFACEFORMAT_R8G8B8X8_UNORM                 0x0EB 
377 #define BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB            0x0EC 
378 #define BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP             0x0ED 
379 #define BRW_SURFACEFORMAT_B10G10R10X2_UNORM              0x0EE 
380 #define BRW_SURFACEFORMAT_L16A16_FLOAT                   0x0F0 
381 #define BRW_SURFACEFORMAT_R32_UNORM                      0x0F1 
382 #define BRW_SURFACEFORMAT_R32_SNORM                      0x0F2 
383 #define BRW_SURFACEFORMAT_R10G10B10X2_USCALED            0x0F3
384 #define BRW_SURFACEFORMAT_R8G8B8A8_SSCALED               0x0F4
385 #define BRW_SURFACEFORMAT_R8G8B8A8_USCALED               0x0F5
386 #define BRW_SURFACEFORMAT_R16G16_SSCALED                 0x0F6
387 #define BRW_SURFACEFORMAT_R16G16_USCALED                 0x0F7
388 #define BRW_SURFACEFORMAT_R32_SSCALED                    0x0F8
389 #define BRW_SURFACEFORMAT_R32_USCALED                    0x0F9
390 #define BRW_SURFACEFORMAT_B5G6R5_UNORM                   0x100 
391 #define BRW_SURFACEFORMAT_B5G6R5_UNORM_SRGB              0x101 
392 #define BRW_SURFACEFORMAT_B5G5R5A1_UNORM                 0x102 
393 #define BRW_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB            0x103 
394 #define BRW_SURFACEFORMAT_B4G4R4A4_UNORM                 0x104 
395 #define BRW_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB            0x105 
396 #define BRW_SURFACEFORMAT_R8G8_UNORM                     0x106 
397 #define BRW_SURFACEFORMAT_R8G8_SNORM                     0x107 
398 #define BRW_SURFACEFORMAT_R8G8_SINT                      0x108 
399 #define BRW_SURFACEFORMAT_R8G8_UINT                      0x109 
400 #define BRW_SURFACEFORMAT_R16_UNORM                      0x10A 
401 #define BRW_SURFACEFORMAT_R16_SNORM                      0x10B 
402 #define BRW_SURFACEFORMAT_R16_SINT                       0x10C 
403 #define BRW_SURFACEFORMAT_R16_UINT                       0x10D 
404 #define BRW_SURFACEFORMAT_R16_FLOAT                      0x10E 
405 #define BRW_SURFACEFORMAT_I16_UNORM                      0x111 
406 #define BRW_SURFACEFORMAT_L16_UNORM                      0x112 
407 #define BRW_SURFACEFORMAT_A16_UNORM                      0x113 
408 #define BRW_SURFACEFORMAT_L8A8_UNORM                     0x114 
409 #define BRW_SURFACEFORMAT_I16_FLOAT                      0x115
410 #define BRW_SURFACEFORMAT_L16_FLOAT                      0x116
411 #define BRW_SURFACEFORMAT_A16_FLOAT                      0x117 
412 #define BRW_SURFACEFORMAT_R5G5_SNORM_B6_UNORM            0x119 
413 #define BRW_SURFACEFORMAT_B5G5R5X1_UNORM                 0x11A 
414 #define BRW_SURFACEFORMAT_B5G5R5X1_UNORM_SRGB            0x11B
415 #define BRW_SURFACEFORMAT_R8G8_SSCALED                   0x11C
416 #define BRW_SURFACEFORMAT_R8G8_USCALED                   0x11D
417 #define BRW_SURFACEFORMAT_R16_SSCALED                    0x11E
418 #define BRW_SURFACEFORMAT_R16_USCALED                    0x11F
419 #define BRW_SURFACEFORMAT_R8_UNORM                       0x140 
420 #define BRW_SURFACEFORMAT_R8_SNORM                       0x141 
421 #define BRW_SURFACEFORMAT_R8_SINT                        0x142 
422 #define BRW_SURFACEFORMAT_R8_UINT                        0x143 
423 #define BRW_SURFACEFORMAT_A8_UNORM                       0x144 
424 #define BRW_SURFACEFORMAT_I8_UNORM                       0x145 
425 #define BRW_SURFACEFORMAT_L8_UNORM                       0x146 
426 #define BRW_SURFACEFORMAT_P4A4_UNORM                     0x147 
427 #define BRW_SURFACEFORMAT_A4P4_UNORM                     0x148
428 #define BRW_SURFACEFORMAT_R8_SSCALED                     0x149
429 #define BRW_SURFACEFORMAT_R8_USCALED                     0x14A
430 #define BRW_SURFACEFORMAT_R1_UINT                        0x181 
431 #define BRW_SURFACEFORMAT_YCRCB_NORMAL                   0x182 
432 #define BRW_SURFACEFORMAT_YCRCB_SWAPUVY                  0x183 
433 #define BRW_SURFACEFORMAT_BC1_UNORM                      0x186 
434 #define BRW_SURFACEFORMAT_BC2_UNORM                      0x187 
435 #define BRW_SURFACEFORMAT_BC3_UNORM                      0x188 
436 #define BRW_SURFACEFORMAT_BC4_UNORM                      0x189 
437 #define BRW_SURFACEFORMAT_BC5_UNORM                      0x18A 
438 #define BRW_SURFACEFORMAT_BC1_UNORM_SRGB                 0x18B 
439 #define BRW_SURFACEFORMAT_BC2_UNORM_SRGB                 0x18C 
440 #define BRW_SURFACEFORMAT_BC3_UNORM_SRGB                 0x18D 
441 #define BRW_SURFACEFORMAT_MONO8                          0x18E 
442 #define BRW_SURFACEFORMAT_YCRCB_SWAPUV                   0x18F 
443 #define BRW_SURFACEFORMAT_YCRCB_SWAPY                    0x190 
444 #define BRW_SURFACEFORMAT_DXT1_RGB                       0x191 
445 #define BRW_SURFACEFORMAT_FXT1                           0x192 
446 #define BRW_SURFACEFORMAT_R8G8B8_UNORM                   0x193 
447 #define BRW_SURFACEFORMAT_R8G8B8_SNORM                   0x194 
448 #define BRW_SURFACEFORMAT_R8G8B8_SSCALED                 0x195 
449 #define BRW_SURFACEFORMAT_R8G8B8_USCALED                 0x196 
450 #define BRW_SURFACEFORMAT_R64G64B64A64_FLOAT             0x197 
451 #define BRW_SURFACEFORMAT_R64G64B64_FLOAT                0x198 
452 #define BRW_SURFACEFORMAT_BC4_SNORM                      0x199 
453 #define BRW_SURFACEFORMAT_BC5_SNORM                      0x19A 
454 #define BRW_SURFACEFORMAT_R16G16B16_UNORM                0x19C 
455 #define BRW_SURFACEFORMAT_R16G16B16_SNORM                0x19D 
456 #define BRW_SURFACEFORMAT_R16G16B16_SSCALED              0x19E 
457 #define BRW_SURFACEFORMAT_R16G16B16_USCALED              0x19F
458
459 #define BRW_SURFACERETURNFORMAT_FLOAT32  0
460 #define BRW_SURFACERETURNFORMAT_S1       1
461
462 #define BRW_SURFACE_1D      0
463 #define BRW_SURFACE_2D      1
464 #define BRW_SURFACE_3D      2
465 #define BRW_SURFACE_CUBE    3
466 #define BRW_SURFACE_BUFFER  4
467 #define BRW_SURFACE_NULL    7
468
469 #define BRW_BORDER_COLOR_MODE_DEFAULT   0
470 #define BRW_BORDER_COLOR_MODE_LEGACY    1
471
472 #define BRW_TEXCOORDMODE_WRAP            0
473 #define BRW_TEXCOORDMODE_MIRROR          1
474 #define BRW_TEXCOORDMODE_CLAMP           2
475 #define BRW_TEXCOORDMODE_CUBE            3
476 #define BRW_TEXCOORDMODE_CLAMP_BORDER    4
477 #define BRW_TEXCOORDMODE_MIRROR_ONCE     5
478
479 #define BRW_THREAD_PRIORITY_NORMAL   0
480 #define BRW_THREAD_PRIORITY_HIGH     1
481
482 #define BRW_TILEWALK_XMAJOR                 0
483 #define BRW_TILEWALK_YMAJOR                 1
484
485 #define BRW_VERTEX_SUBPIXEL_PRECISION_8BITS  0
486 #define BRW_VERTEX_SUBPIXEL_PRECISION_4BITS  1
487
488 #define BRW_VERTEXBUFFER_ACCESS_VERTEXDATA     0
489 #define BRW_VERTEXBUFFER_ACCESS_INSTANCEDATA   1
490
491 #define BRW_VFCOMPONENT_NOSTORE      0
492 #define BRW_VFCOMPONENT_STORE_SRC    1
493 #define BRW_VFCOMPONENT_STORE_0      2
494 #define BRW_VFCOMPONENT_STORE_1_FLT  3
495 #define BRW_VFCOMPONENT_STORE_1_INT  4
496 #define BRW_VFCOMPONENT_STORE_VID    5
497 #define BRW_VFCOMPONENT_STORE_IID    6
498 #define BRW_VFCOMPONENT_STORE_PID    7
499
500
501
502 /* Execution Unit (EU) defines
503  */
504
505 #define BRW_ALIGN_1   0
506 #define BRW_ALIGN_16  1
507
508 #define BRW_ADDRESS_DIRECT                        0
509 #define BRW_ADDRESS_REGISTER_INDIRECT_REGISTER    1
510
511 #define BRW_CHANNEL_X     0
512 #define BRW_CHANNEL_Y     1
513 #define BRW_CHANNEL_Z     2
514 #define BRW_CHANNEL_W     3
515
516 #define BRW_COMPRESSION_NONE          0
517 #define BRW_COMPRESSION_2NDHALF       1
518 #define BRW_COMPRESSION_COMPRESSED    2
519
520 #define BRW_CONDITIONAL_NONE  0
521 #define BRW_CONDITIONAL_Z     1
522 #define BRW_CONDITIONAL_NZ    2
523 #define BRW_CONDITIONAL_EQ    1 /* Z */
524 #define BRW_CONDITIONAL_NEQ   2 /* NZ */
525 #define BRW_CONDITIONAL_G     3
526 #define BRW_CONDITIONAL_GE    4
527 #define BRW_CONDITIONAL_L     5
528 #define BRW_CONDITIONAL_LE    6
529 #define BRW_CONDITIONAL_C     7
530 #define BRW_CONDITIONAL_O     8
531
532 #define BRW_DEBUG_NONE        0
533 #define BRW_DEBUG_BREAKPOINT  1
534
535 #define BRW_DEPENDENCY_NORMAL         0
536 #define BRW_DEPENDENCY_NOTCLEARED     1
537 #define BRW_DEPENDENCY_NOTCHECKED     2
538 #define BRW_DEPENDENCY_DISABLE        3
539
540 #define BRW_EXECUTE_1     0
541 #define BRW_EXECUTE_2     1
542 #define BRW_EXECUTE_4     2
543 #define BRW_EXECUTE_8     3
544 #define BRW_EXECUTE_16    4
545 #define BRW_EXECUTE_32    5
546
547 #define BRW_HORIZONTAL_STRIDE_0   0
548 #define BRW_HORIZONTAL_STRIDE_1   1
549 #define BRW_HORIZONTAL_STRIDE_2   2
550 #define BRW_HORIZONTAL_STRIDE_4   3
551
552 #define BRW_INSTRUCTION_NORMAL    0
553 #define BRW_INSTRUCTION_SATURATE  1
554
555 #define BRW_MASK_ENABLE   0
556 #define BRW_MASK_DISABLE  1
557
558 #define BRW_OPCODE_MOV        1
559 #define BRW_OPCODE_SEL        2
560 #define BRW_OPCODE_NOT        4
561 #define BRW_OPCODE_AND        5
562 #define BRW_OPCODE_OR         6
563 #define BRW_OPCODE_XOR        7
564 #define BRW_OPCODE_SHR        8
565 #define BRW_OPCODE_SHL        9
566 #define BRW_OPCODE_RSR        10
567 #define BRW_OPCODE_RSL        11
568 #define BRW_OPCODE_ASR        12
569 #define BRW_OPCODE_CMP        16
570 #define BRW_OPCODE_JMPI       32
571 #define BRW_OPCODE_IF         34
572 #define BRW_OPCODE_IFF        35
573 #define BRW_OPCODE_ELSE       36
574 #define BRW_OPCODE_ENDIF      37
575 #define BRW_OPCODE_DO         38
576 #define BRW_OPCODE_WHILE      39
577 #define BRW_OPCODE_BREAK      40
578 #define BRW_OPCODE_CONTINUE   41
579 #define BRW_OPCODE_HALT       42
580 #define BRW_OPCODE_MSAVE      44
581 #define BRW_OPCODE_MRESTORE   45
582 #define BRW_OPCODE_PUSH       46
583 #define BRW_OPCODE_POP        47
584 #define BRW_OPCODE_WAIT       48
585 #define BRW_OPCODE_SEND       49
586 #define BRW_OPCODE_ADD        64
587 #define BRW_OPCODE_MUL        65
588 #define BRW_OPCODE_AVG        66
589 #define BRW_OPCODE_FRC        67
590 #define BRW_OPCODE_RNDU       68
591 #define BRW_OPCODE_RNDD       69
592 #define BRW_OPCODE_RNDE       70
593 #define BRW_OPCODE_RNDZ       71
594 #define BRW_OPCODE_MAC        72
595 #define BRW_OPCODE_MACH       73
596 #define BRW_OPCODE_LZD        74
597 #define BRW_OPCODE_SAD2       80
598 #define BRW_OPCODE_SADA2      81
599 #define BRW_OPCODE_DP4        84
600 #define BRW_OPCODE_DPH        85
601 #define BRW_OPCODE_DP3        86
602 #define BRW_OPCODE_DP2        87
603 #define BRW_OPCODE_DPA2       88
604 #define BRW_OPCODE_LINE       89
605 #define BRW_OPCODE_NOP        126
606
607 #define BRW_PREDICATE_NONE             0
608 #define BRW_PREDICATE_NORMAL           1
609 #define BRW_PREDICATE_ALIGN1_ANYV             2
610 #define BRW_PREDICATE_ALIGN1_ALLV             3
611 #define BRW_PREDICATE_ALIGN1_ANY2H            4
612 #define BRW_PREDICATE_ALIGN1_ALL2H            5
613 #define BRW_PREDICATE_ALIGN1_ANY4H            6
614 #define BRW_PREDICATE_ALIGN1_ALL4H            7
615 #define BRW_PREDICATE_ALIGN1_ANY8H            8
616 #define BRW_PREDICATE_ALIGN1_ALL8H            9
617 #define BRW_PREDICATE_ALIGN1_ANY16H           10
618 #define BRW_PREDICATE_ALIGN1_ALL16H           11
619 #define BRW_PREDICATE_ALIGN16_REPLICATE_X     2
620 #define BRW_PREDICATE_ALIGN16_REPLICATE_Y     3
621 #define BRW_PREDICATE_ALIGN16_REPLICATE_Z     4
622 #define BRW_PREDICATE_ALIGN16_REPLICATE_W     5
623 #define BRW_PREDICATE_ALIGN16_ANY4H           6
624 #define BRW_PREDICATE_ALIGN16_ALL4H           7
625
626 #define BRW_ARCHITECTURE_REGISTER_FILE    0
627 #define BRW_GENERAL_REGISTER_FILE         1
628 #define BRW_MESSAGE_REGISTER_FILE         2
629 #define BRW_IMMEDIATE_VALUE               3
630
631 #define BRW_REGISTER_TYPE_UD  0
632 #define BRW_REGISTER_TYPE_D   1
633 #define BRW_REGISTER_TYPE_UW  2
634 #define BRW_REGISTER_TYPE_W   3
635 #define BRW_REGISTER_TYPE_UB  4
636 #define BRW_REGISTER_TYPE_B   5
637 #define BRW_REGISTER_TYPE_VF  5 /* packed float vector, immediates only? */
638 #define BRW_REGISTER_TYPE_HF  6
639 #define BRW_REGISTER_TYPE_V   6 /* packed int vector, immediates only, uword dest only */
640 #define BRW_REGISTER_TYPE_F   7
641
642 #define BRW_ARF_NULL                  0x00
643 #define BRW_ARF_ADDRESS               0x10
644 #define BRW_ARF_ACCUMULATOR           0x20   
645 #define BRW_ARF_FLAG                  0x30
646 #define BRW_ARF_MASK                  0x40
647 #define BRW_ARF_MASK_STACK            0x50
648 #define BRW_ARF_MASK_STACK_DEPTH      0x60
649 #define BRW_ARF_STATE                 0x70
650 #define BRW_ARF_CONTROL               0x80
651 #define BRW_ARF_NOTIFICATION_COUNT    0x90
652 #define BRW_ARF_IP                    0xA0
653
654 #define BRW_AMASK   0
655 #define BRW_IMASK   1
656 #define BRW_LMASK   2
657 #define BRW_CMASK   3
658
659
660
661 #define BRW_THREAD_NORMAL     0
662 #define BRW_THREAD_ATOMIC     1
663 #define BRW_THREAD_SWITCH     2
664
665 #define BRW_VERTICAL_STRIDE_0                 0
666 #define BRW_VERTICAL_STRIDE_1                 1
667 #define BRW_VERTICAL_STRIDE_2                 2
668 #define BRW_VERTICAL_STRIDE_4                 3
669 #define BRW_VERTICAL_STRIDE_8                 4
670 #define BRW_VERTICAL_STRIDE_16                5
671 #define BRW_VERTICAL_STRIDE_32                6
672 #define BRW_VERTICAL_STRIDE_64                7
673 #define BRW_VERTICAL_STRIDE_128               8
674 #define BRW_VERTICAL_STRIDE_256               9
675 #define BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL   0xF
676
677 #define BRW_WIDTH_1       0
678 #define BRW_WIDTH_2       1
679 #define BRW_WIDTH_4       2
680 #define BRW_WIDTH_8       3
681 #define BRW_WIDTH_16      4
682
683 #define BRW_STATELESS_BUFFER_BOUNDARY_1K      0
684 #define BRW_STATELESS_BUFFER_BOUNDARY_2K      1
685 #define BRW_STATELESS_BUFFER_BOUNDARY_4K      2
686 #define BRW_STATELESS_BUFFER_BOUNDARY_8K      3
687 #define BRW_STATELESS_BUFFER_BOUNDARY_16K     4
688 #define BRW_STATELESS_BUFFER_BOUNDARY_32K     5
689 #define BRW_STATELESS_BUFFER_BOUNDARY_64K     6
690 #define BRW_STATELESS_BUFFER_BOUNDARY_128K    7
691 #define BRW_STATELESS_BUFFER_BOUNDARY_256K    8
692 #define BRW_STATELESS_BUFFER_BOUNDARY_512K    9
693 #define BRW_STATELESS_BUFFER_BOUNDARY_1M      10
694 #define BRW_STATELESS_BUFFER_BOUNDARY_2M      11
695
696 #define BRW_POLYGON_FACING_FRONT      0
697 #define BRW_POLYGON_FACING_BACK       1
698
699 #define BRW_MESSAGE_TARGET_NULL               0
700 #define BRW_MESSAGE_TARGET_MATH               1
701 #define BRW_MESSAGE_TARGET_SAMPLER            2
702 #define BRW_MESSAGE_TARGET_GATEWAY            3
703 #define BRW_MESSAGE_TARGET_DATAPORT_READ      4
704 #define BRW_MESSAGE_TARGET_DATAPORT_WRITE     5
705 #define BRW_MESSAGE_TARGET_URB                6
706 #define BRW_MESSAGE_TARGET_THREAD_SPAWNER     7
707
708 #define BRW_SAMPLER_RETURN_FORMAT_FLOAT32     0
709 #define BRW_SAMPLER_RETURN_FORMAT_UINT32      2
710 #define BRW_SAMPLER_RETURN_FORMAT_SINT32      3
711
712 #define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE              0
713 #define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE             0
714 #define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS        0
715 #define BRW_SAMPLER_MESSAGE_SIMD8_KILLPIX             1
716 #define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_LOD        1
717 #define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD         1
718 #define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_GRADIENTS  2
719 #define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_GRADIENTS    2
720 #define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE    0
721 #define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE     2
722 #define BRW_SAMPLER_MESSAGE_SIMD4X2_RESINFO           2
723 #define BRW_SAMPLER_MESSAGE_SIMD8_RESINFO             2
724 #define BRW_SAMPLER_MESSAGE_SIMD16_RESINFO            2
725 #define BRW_SAMPLER_MESSAGE_SIMD4X2_LD                3
726 #define BRW_SAMPLER_MESSAGE_SIMD8_LD                  3
727 #define BRW_SAMPLER_MESSAGE_SIMD16_LD                 3
728
729 #define BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW   0
730 #define BRW_DATAPORT_OWORD_BLOCK_1_OWORDHIGH  1
731 #define BRW_DATAPORT_OWORD_BLOCK_2_OWORDS     2
732 #define BRW_DATAPORT_OWORD_BLOCK_4_OWORDS     3
733 #define BRW_DATAPORT_OWORD_BLOCK_8_OWORDS     4
734
735 #define BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD     0
736 #define BRW_DATAPORT_OWORD_DUAL_BLOCK_4OWORDS    2
737
738 #define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS   2
739 #define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_16DWORDS  3
740
741 #define BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ          0
742 #define BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ     1
743 #define BRW_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ          2
744 #define BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ      3
745
746 #define BRW_DATAPORT_READ_TARGET_DATA_CACHE      0
747 #define BRW_DATAPORT_READ_TARGET_RENDER_CACHE    1
748 #define BRW_DATAPORT_READ_TARGET_SAMPLER_CACHE   2
749
750 #define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE                0
751 #define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE_REPLICATED     1
752 #define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN01         2
753 #define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN23         3
754 #define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_SINGLE_SOURCE_SUBSPAN01       4
755
756 #define BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE                0
757 #define BRW_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE           1
758 #define BRW_DATAPORT_WRITE_MESSAGE_DWORD_BLOCK_WRITE                2
759 #define BRW_DATAPORT_WRITE_MESSAGE_DWORD_SCATTERED_WRITE            3
760 #define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE              4
761 #define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VERTEX_BUFFER_WRITE     5
762 #define BRW_DATAPORT_WRITE_MESSAGE_FLUSH_RENDER_CACHE               7
763
764 #define BRW_MATH_FUNCTION_INV                              1
765 #define BRW_MATH_FUNCTION_LOG                              2
766 #define BRW_MATH_FUNCTION_EXP                              3
767 #define BRW_MATH_FUNCTION_SQRT                             4
768 #define BRW_MATH_FUNCTION_RSQ                              5
769 #define BRW_MATH_FUNCTION_SIN                              6 /* was 7 */
770 #define BRW_MATH_FUNCTION_COS                              7 /* was 8 */
771 #define BRW_MATH_FUNCTION_SINCOS                           8 /* was 6 */
772 #define BRW_MATH_FUNCTION_TAN                              9
773 #define BRW_MATH_FUNCTION_POW                              10
774 #define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER   11
775 #define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT                 12
776 #define BRW_MATH_FUNCTION_INT_DIV_REMAINDER                13
777
778 #define BRW_MATH_INTEGER_UNSIGNED     0
779 #define BRW_MATH_INTEGER_SIGNED       1
780
781 #define BRW_MATH_PRECISION_FULL        0
782 #define BRW_MATH_PRECISION_PARTIAL     1
783
784 #define BRW_MATH_SATURATE_NONE         0
785 #define BRW_MATH_SATURATE_SATURATE     1
786
787 #define BRW_MATH_DATA_VECTOR  0
788 #define BRW_MATH_DATA_SCALAR  1
789
790 #define BRW_URB_OPCODE_WRITE  0
791
792 #define BRW_URB_SWIZZLE_NONE          0
793 #define BRW_URB_SWIZZLE_INTERLEAVE    1
794 #define BRW_URB_SWIZZLE_TRANSPOSE     2
795
796 #define BRW_SCRATCH_SPACE_SIZE_1K     0
797 #define BRW_SCRATCH_SPACE_SIZE_2K     1
798 #define BRW_SCRATCH_SPACE_SIZE_4K     2
799 #define BRW_SCRATCH_SPACE_SIZE_8K     3
800 #define BRW_SCRATCH_SPACE_SIZE_16K    4
801 #define BRW_SCRATCH_SPACE_SIZE_32K    5
802 #define BRW_SCRATCH_SPACE_SIZE_64K    6
803 #define BRW_SCRATCH_SPACE_SIZE_128K   7
804 #define BRW_SCRATCH_SPACE_SIZE_256K   8
805 #define BRW_SCRATCH_SPACE_SIZE_512K   9
806 #define BRW_SCRATCH_SPACE_SIZE_1M     10
807 #define BRW_SCRATCH_SPACE_SIZE_2M     11
808
809
810
811
812 #define CMD_URB_FENCE                 0x6000
813 #define CMD_CONST_BUFFER_STATE        0x6001
814 #define CMD_CONST_BUFFER              0x6002
815
816 #define CMD_STATE_BASE_ADDRESS        0x6101
817 #define CMD_STATE_INSN_POINTER        0x6102
818 #define CMD_PIPELINE_SELECT           0x6104
819
820 #define CMD_PIPELINED_STATE_POINTERS  0x7800
821 #define CMD_BINDING_TABLE_PTRS        0x7801
822 #define CMD_VERTEX_BUFFER             0x7808
823 #define CMD_VERTEX_ELEMENT            0x7809
824 #define CMD_INDEX_BUFFER              0x780a
825 #define CMD_VF_STATISTICS             0x780b
826
827 #define CMD_DRAW_RECT                 0x7900
828 #define CMD_BLEND_CONSTANT_COLOR      0x7901
829 #define CMD_CHROMA_KEY                0x7904
830 #define CMD_DEPTH_BUFFER              0x7905
831 #define CMD_POLY_STIPPLE_OFFSET       0x7906
832 #define CMD_POLY_STIPPLE_PATTERN      0x7907
833 #define CMD_LINE_STIPPLE_PATTERN      0x7908
834 #define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7908
835
836 #define CMD_PIPE_CONTROL              0x7a00
837
838 #define CMD_3D_PRIM                   0x7b00
839
840 #define CMD_MI_FLUSH                  0x0200
841
842
843 /* Various values from the R0 vertex header:
844  */
845 #define R02_PRIM_END    0x1
846 #define R02_PRIM_START  0x2
847
848 /* media pipeline */
849
850 #define BRW_VFE_MODE_GENERIC            0x0
851 #define BRW_VFE_MODE_VLD_MPEG2          0x1
852 #define BRW_VFE_MODE_IS                 0x2
853 #define BRW_VFE_MODE_AVC_MC             0x4
854 #define BRW_VFE_MODE_AVC_IT             0x7
855 #define BRW_VFE_MODE_VC1_IT             0xB
856
857 #define BRW_VFE_DEBUG_COUNTER_FREE      0
858 #define BRW_VFE_DEBUG_COUNTER_FROZEN    1
859 #define BRW_VFE_DEBUG_COUNTER_ONCE      2
860 #define BRW_VFE_DEBUG_COUNTER_ALWAYS    3
861
862 /* VLD_STATE */
863 #define BRW_MPEG_TOP_FIELD              1
864 #define BRW_MPEG_BOTTOM_FIELD           2
865 #define BRW_MPEG_FRAME                  3
866 #define BRW_MPEG_QSCALE_LINEAR          0
867 #define BRW_MPEG_QSCALE_NONLINEAR       1
868 #define BRW_MPEG_ZIGZAG_SCAN            0
869 #define BRW_MPEG_ALTER_VERTICAL_SCAN    1
870 #define BRW_MPEG_I_PICTURE              1
871 #define BRW_MPEG_P_PICTURE              2
872 #define BRW_MPEG_B_PICTURE              3
873
874 #endif