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 HSW_SCS_ZERO					0
473#define HSW_SCS_ONE						1
474#define HSW_SCS_RED						4
475#define HSW_SCS_GREEN					5
476#define HSW_SCS_BLUE					6
477#define HSW_SCS_ALPHA					7
478
479#define BRW_TEXCOORDMODE_WRAP            0
480#define BRW_TEXCOORDMODE_MIRROR          1
481#define BRW_TEXCOORDMODE_CLAMP           2
482#define BRW_TEXCOORDMODE_CUBE            3
483#define BRW_TEXCOORDMODE_CLAMP_BORDER    4
484#define BRW_TEXCOORDMODE_MIRROR_ONCE     5
485
486#define BRW_THREAD_PRIORITY_NORMAL   0
487#define BRW_THREAD_PRIORITY_HIGH     1
488
489#define BRW_TILEWALK_XMAJOR                 0
490#define BRW_TILEWALK_YMAJOR                 1
491
492#define BRW_VERTEX_SUBPIXEL_PRECISION_8BITS  0
493#define BRW_VERTEX_SUBPIXEL_PRECISION_4BITS  1
494
495#define BRW_VERTEXBUFFER_ACCESS_VERTEXDATA     0
496#define BRW_VERTEXBUFFER_ACCESS_INSTANCEDATA   1
497
498#define BRW_VFCOMPONENT_NOSTORE      0
499#define BRW_VFCOMPONENT_STORE_SRC    1
500#define BRW_VFCOMPONENT_STORE_0      2
501#define BRW_VFCOMPONENT_STORE_1_FLT  3
502#define BRW_VFCOMPONENT_STORE_1_INT  4
503#define BRW_VFCOMPONENT_STORE_VID    5
504#define BRW_VFCOMPONENT_STORE_IID    6
505#define BRW_VFCOMPONENT_STORE_PID    7
506
507
508
509/* Execution Unit (EU) defines
510 */
511
512#define BRW_ALIGN_1   0
513#define BRW_ALIGN_16  1
514
515#define BRW_ADDRESS_DIRECT                        0
516#define BRW_ADDRESS_REGISTER_INDIRECT_REGISTER    1
517
518#define BRW_CHANNEL_X     0
519#define BRW_CHANNEL_Y     1
520#define BRW_CHANNEL_Z     2
521#define BRW_CHANNEL_W     3
522
523#define BRW_COMPRESSION_NONE          0
524#define BRW_COMPRESSION_2NDHALF       1
525#define BRW_COMPRESSION_COMPRESSED    2
526
527#define BRW_CONDITIONAL_NONE  0
528#define BRW_CONDITIONAL_Z     1
529#define BRW_CONDITIONAL_NZ    2
530#define BRW_CONDITIONAL_EQ    1	/* Z */
531#define BRW_CONDITIONAL_NEQ   2	/* NZ */
532#define BRW_CONDITIONAL_G     3
533#define BRW_CONDITIONAL_GE    4
534#define BRW_CONDITIONAL_L     5
535#define BRW_CONDITIONAL_LE    6
536#define BRW_CONDITIONAL_C     7
537#define BRW_CONDITIONAL_O     8
538
539#define BRW_DEBUG_NONE        0
540#define BRW_DEBUG_BREAKPOINT  1
541
542#define BRW_DEPENDENCY_NORMAL         0
543#define BRW_DEPENDENCY_NOTCLEARED     1
544#define BRW_DEPENDENCY_NOTCHECKED     2
545#define BRW_DEPENDENCY_DISABLE        3
546
547#define BRW_EXECUTE_1     0
548#define BRW_EXECUTE_2     1
549#define BRW_EXECUTE_4     2
550#define BRW_EXECUTE_8     3
551#define BRW_EXECUTE_16    4
552#define BRW_EXECUTE_32    5
553
554#define BRW_HORIZONTAL_STRIDE_0   0
555#define BRW_HORIZONTAL_STRIDE_1   1
556#define BRW_HORIZONTAL_STRIDE_2   2
557#define BRW_HORIZONTAL_STRIDE_4   3
558
559#define BRW_INSTRUCTION_NORMAL    0
560#define BRW_INSTRUCTION_SATURATE  1
561
562#define BRW_MASK_ENABLE   0
563#define BRW_MASK_DISABLE  1
564
565#define BRW_OPCODE_MOV        1
566#define BRW_OPCODE_SEL        2
567#define BRW_OPCODE_NOT        4
568#define BRW_OPCODE_AND        5
569#define BRW_OPCODE_OR         6
570#define BRW_OPCODE_XOR        7
571#define BRW_OPCODE_SHR        8
572#define BRW_OPCODE_SHL        9
573#define BRW_OPCODE_RSR        10
574#define BRW_OPCODE_RSL        11
575#define BRW_OPCODE_ASR        12
576#define BRW_OPCODE_CMP        16
577#define BRW_OPCODE_JMPI       32
578#define BRW_OPCODE_IF         34
579#define BRW_OPCODE_IFF        35
580#define BRW_OPCODE_ELSE       36
581#define BRW_OPCODE_ENDIF      37
582#define BRW_OPCODE_DO         38
583#define BRW_OPCODE_WHILE      39
584#define BRW_OPCODE_BREAK      40
585#define BRW_OPCODE_CONTINUE   41
586#define BRW_OPCODE_HALT       42
587#define BRW_OPCODE_MSAVE      44
588#define BRW_OPCODE_MRESTORE   45
589#define BRW_OPCODE_PUSH       46
590#define BRW_OPCODE_POP        47
591#define BRW_OPCODE_WAIT       48
592#define BRW_OPCODE_SEND       49
593#define BRW_OPCODE_ADD        64
594#define BRW_OPCODE_MUL        65
595#define BRW_OPCODE_AVG        66
596#define BRW_OPCODE_FRC        67
597#define BRW_OPCODE_RNDU       68
598#define BRW_OPCODE_RNDD       69
599#define BRW_OPCODE_RNDE       70
600#define BRW_OPCODE_RNDZ       71
601#define BRW_OPCODE_MAC        72
602#define BRW_OPCODE_MACH       73
603#define BRW_OPCODE_LZD        74
604#define BRW_OPCODE_SAD2       80
605#define BRW_OPCODE_SADA2      81
606#define BRW_OPCODE_DP4        84
607#define BRW_OPCODE_DPH        85
608#define BRW_OPCODE_DP3        86
609#define BRW_OPCODE_DP2        87
610#define BRW_OPCODE_DPA2       88
611#define BRW_OPCODE_LINE       89
612#define BRW_OPCODE_NOP        126
613
614#define BRW_PREDICATE_NONE             0
615#define BRW_PREDICATE_NORMAL           1
616#define BRW_PREDICATE_ALIGN1_ANYV             2
617#define BRW_PREDICATE_ALIGN1_ALLV             3
618#define BRW_PREDICATE_ALIGN1_ANY2H            4
619#define BRW_PREDICATE_ALIGN1_ALL2H            5
620#define BRW_PREDICATE_ALIGN1_ANY4H            6
621#define BRW_PREDICATE_ALIGN1_ALL4H            7
622#define BRW_PREDICATE_ALIGN1_ANY8H            8
623#define BRW_PREDICATE_ALIGN1_ALL8H            9
624#define BRW_PREDICATE_ALIGN1_ANY16H           10
625#define BRW_PREDICATE_ALIGN1_ALL16H           11
626#define BRW_PREDICATE_ALIGN16_REPLICATE_X     2
627#define BRW_PREDICATE_ALIGN16_REPLICATE_Y     3
628#define BRW_PREDICATE_ALIGN16_REPLICATE_Z     4
629#define BRW_PREDICATE_ALIGN16_REPLICATE_W     5
630#define BRW_PREDICATE_ALIGN16_ANY4H           6
631#define BRW_PREDICATE_ALIGN16_ALL4H           7
632
633#define BRW_ARCHITECTURE_REGISTER_FILE    0
634#define BRW_GENERAL_REGISTER_FILE         1
635#define BRW_MESSAGE_REGISTER_FILE         2
636#define BRW_IMMEDIATE_VALUE               3
637
638#define BRW_REGISTER_TYPE_UD  0
639#define BRW_REGISTER_TYPE_D   1
640#define BRW_REGISTER_TYPE_UW  2
641#define BRW_REGISTER_TYPE_W   3
642#define BRW_REGISTER_TYPE_UB  4
643#define BRW_REGISTER_TYPE_B   5
644#define BRW_REGISTER_TYPE_VF  5	/* packed float vector, immediates only? */
645#define BRW_REGISTER_TYPE_HF  6
646#define BRW_REGISTER_TYPE_V   6	/* packed int vector, immediates only, uword dest only */
647#define BRW_REGISTER_TYPE_F   7
648
649#define BRW_ARF_NULL                  0x00
650#define BRW_ARF_ADDRESS               0x10
651#define BRW_ARF_ACCUMULATOR           0x20
652#define BRW_ARF_FLAG                  0x30
653#define BRW_ARF_MASK                  0x40
654#define BRW_ARF_MASK_STACK            0x50
655#define BRW_ARF_MASK_STACK_DEPTH      0x60
656#define BRW_ARF_STATE                 0x70
657#define BRW_ARF_CONTROL               0x80
658#define BRW_ARF_NOTIFICATION_COUNT    0x90
659#define BRW_ARF_IP                    0xA0
660
661#define BRW_AMASK   0
662#define BRW_IMASK   1
663#define BRW_LMASK   2
664#define BRW_CMASK   3
665
666
667
668#define BRW_THREAD_NORMAL     0
669#define BRW_THREAD_ATOMIC     1
670#define BRW_THREAD_SWITCH     2
671
672#define BRW_VERTICAL_STRIDE_0                 0
673#define BRW_VERTICAL_STRIDE_1                 1
674#define BRW_VERTICAL_STRIDE_2                 2
675#define BRW_VERTICAL_STRIDE_4                 3
676#define BRW_VERTICAL_STRIDE_8                 4
677#define BRW_VERTICAL_STRIDE_16                5
678#define BRW_VERTICAL_STRIDE_32                6
679#define BRW_VERTICAL_STRIDE_64                7
680#define BRW_VERTICAL_STRIDE_128               8
681#define BRW_VERTICAL_STRIDE_256               9
682#define BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL   0xF
683
684#define BRW_WIDTH_1       0
685#define BRW_WIDTH_2       1
686#define BRW_WIDTH_4       2
687#define BRW_WIDTH_8       3
688#define BRW_WIDTH_16      4
689
690#define BRW_STATELESS_BUFFER_BOUNDARY_1K      0
691#define BRW_STATELESS_BUFFER_BOUNDARY_2K      1
692#define BRW_STATELESS_BUFFER_BOUNDARY_4K      2
693#define BRW_STATELESS_BUFFER_BOUNDARY_8K      3
694#define BRW_STATELESS_BUFFER_BOUNDARY_16K     4
695#define BRW_STATELESS_BUFFER_BOUNDARY_32K     5
696#define BRW_STATELESS_BUFFER_BOUNDARY_64K     6
697#define BRW_STATELESS_BUFFER_BOUNDARY_128K    7
698#define BRW_STATELESS_BUFFER_BOUNDARY_256K    8
699#define BRW_STATELESS_BUFFER_BOUNDARY_512K    9
700#define BRW_STATELESS_BUFFER_BOUNDARY_1M      10
701#define BRW_STATELESS_BUFFER_BOUNDARY_2M      11
702
703#define BRW_POLYGON_FACING_FRONT      0
704#define BRW_POLYGON_FACING_BACK       1
705
706#define BRW_MESSAGE_TARGET_NULL               0
707#define BRW_MESSAGE_TARGET_MATH               1
708#define BRW_MESSAGE_TARGET_SAMPLER            2
709#define BRW_MESSAGE_TARGET_GATEWAY            3
710#define BRW_MESSAGE_TARGET_DATAPORT_READ      4
711#define BRW_MESSAGE_TARGET_DATAPORT_WRITE     5
712#define BRW_MESSAGE_TARGET_URB                6
713#define BRW_MESSAGE_TARGET_THREAD_SPAWNER     7
714
715#define BRW_SAMPLER_RETURN_FORMAT_FLOAT32     0
716#define BRW_SAMPLER_RETURN_FORMAT_UINT32      2
717#define BRW_SAMPLER_RETURN_FORMAT_SINT32      3
718
719#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE              0
720#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE             0
721#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS        0
722#define BRW_SAMPLER_MESSAGE_SIMD8_KILLPIX             1
723#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_LOD        1
724#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD         1
725#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_GRADIENTS  2
726#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_GRADIENTS    2
727#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE    0
728#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE     2
729#define BRW_SAMPLER_MESSAGE_SIMD4X2_RESINFO           2
730#define BRW_SAMPLER_MESSAGE_SIMD8_RESINFO             2
731#define BRW_SAMPLER_MESSAGE_SIMD16_RESINFO            2
732#define BRW_SAMPLER_MESSAGE_SIMD4X2_LD                3
733#define BRW_SAMPLER_MESSAGE_SIMD8_LD                  3
734#define BRW_SAMPLER_MESSAGE_SIMD16_LD                 3
735
736#define BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW   0
737#define BRW_DATAPORT_OWORD_BLOCK_1_OWORDHIGH  1
738#define BRW_DATAPORT_OWORD_BLOCK_2_OWORDS     2
739#define BRW_DATAPORT_OWORD_BLOCK_4_OWORDS     3
740#define BRW_DATAPORT_OWORD_BLOCK_8_OWORDS     4
741
742#define BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD     0
743#define BRW_DATAPORT_OWORD_DUAL_BLOCK_4OWORDS    2
744
745#define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS   2
746#define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_16DWORDS  3
747
748#define BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ          0
749#define BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ     1
750#define BRW_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ          2
751#define BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ      3
752
753#define BRW_DATAPORT_READ_TARGET_DATA_CACHE      0
754#define BRW_DATAPORT_READ_TARGET_RENDER_CACHE    1
755#define BRW_DATAPORT_READ_TARGET_SAMPLER_CACHE   2
756
757#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE                0
758#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE_REPLICATED     1
759#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN01         2
760#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN23         3
761#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_SINGLE_SOURCE_SUBSPAN01       4
762
763#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE                0
764#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE           1
765#define BRW_DATAPORT_WRITE_MESSAGE_DWORD_BLOCK_WRITE                2
766#define BRW_DATAPORT_WRITE_MESSAGE_DWORD_SCATTERED_WRITE            3
767#define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE              4
768#define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VERTEX_BUFFER_WRITE     5
769#define BRW_DATAPORT_WRITE_MESSAGE_FLUSH_RENDER_CACHE               7
770
771#define BRW_MATH_FUNCTION_INV                              1
772#define BRW_MATH_FUNCTION_LOG                              2
773#define BRW_MATH_FUNCTION_EXP                              3
774#define BRW_MATH_FUNCTION_SQRT                             4
775#define BRW_MATH_FUNCTION_RSQ                              5
776#define BRW_MATH_FUNCTION_SIN                              6 /* was 7 */
777#define BRW_MATH_FUNCTION_COS                              7 /* was 8 */
778#define BRW_MATH_FUNCTION_SINCOS                           8 /* was 6 */
779#define BRW_MATH_FUNCTION_TAN                              9
780#define BRW_MATH_FUNCTION_POW                              10
781#define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER   11
782#define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT                 12
783#define BRW_MATH_FUNCTION_INT_DIV_REMAINDER                13
784
785#define BRW_MATH_INTEGER_UNSIGNED     0
786#define BRW_MATH_INTEGER_SIGNED       1
787
788#define BRW_MATH_PRECISION_FULL        0
789#define BRW_MATH_PRECISION_PARTIAL     1
790
791#define BRW_MATH_SATURATE_NONE         0
792#define BRW_MATH_SATURATE_SATURATE     1
793
794#define BRW_MATH_DATA_VECTOR  0
795#define BRW_MATH_DATA_SCALAR  1
796
797#define BRW_URB_OPCODE_WRITE  0
798
799#define BRW_URB_SWIZZLE_NONE          0
800#define BRW_URB_SWIZZLE_INTERLEAVE    1
801#define BRW_URB_SWIZZLE_TRANSPOSE     2
802
803#define BRW_SCRATCH_SPACE_SIZE_1K     0
804#define BRW_SCRATCH_SPACE_SIZE_2K     1
805#define BRW_SCRATCH_SPACE_SIZE_4K     2
806#define BRW_SCRATCH_SPACE_SIZE_8K     3
807#define BRW_SCRATCH_SPACE_SIZE_16K    4
808#define BRW_SCRATCH_SPACE_SIZE_32K    5
809#define BRW_SCRATCH_SPACE_SIZE_64K    6
810#define BRW_SCRATCH_SPACE_SIZE_128K   7
811#define BRW_SCRATCH_SPACE_SIZE_256K   8
812#define BRW_SCRATCH_SPACE_SIZE_512K   9
813#define BRW_SCRATCH_SPACE_SIZE_1M     10
814#define BRW_SCRATCH_SPACE_SIZE_2M     11
815
816
817
818
819#define CMD_URB_FENCE                 0x6000
820#define CMD_CONST_BUFFER_STATE        0x6001
821#define CMD_CONST_BUFFER              0x6002
822
823#define CMD_STATE_BASE_ADDRESS        0x6101
824#define CMD_STATE_INSN_POINTER        0x6102
825#define CMD_PIPELINE_SELECT           0x6104
826
827#define CMD_PIPELINED_STATE_POINTERS  0x7800
828#define CMD_BINDING_TABLE_PTRS        0x7801
829#define CMD_VERTEX_BUFFER             0x7808
830#define CMD_VERTEX_ELEMENT            0x7809
831#define CMD_INDEX_BUFFER              0x780a
832#define CMD_VF_STATISTICS             0x780b
833
834#define CMD_DRAW_RECT                 0x7900
835#define CMD_BLEND_CONSTANT_COLOR      0x7901
836#define CMD_CHROMA_KEY                0x7904
837#define CMD_DEPTH_BUFFER              0x7905
838#define CMD_POLY_STIPPLE_OFFSET       0x7906
839#define CMD_POLY_STIPPLE_PATTERN      0x7907
840#define CMD_LINE_STIPPLE_PATTERN      0x7908
841#define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7908
842
843#define CMD_PIPE_CONTROL              0x7a00
844
845#define CMD_3D_PRIM                   0x7b00
846
847#define CMD_MI_FLUSH                  0x0200
848
849
850/* Various values from the R0 vertex header:
851 */
852#define R02_PRIM_END    0x1
853#define R02_PRIM_START  0x2
854
855/* media pipeline */
856
857#define BRW_VFE_MODE_GENERIC		0x0
858#define BRW_VFE_MODE_VLD_MPEG2		0x1
859#define BRW_VFE_MODE_IS			0x2
860#define BRW_VFE_MODE_AVC_MC		0x4
861#define BRW_VFE_MODE_AVC_IT		0x7
862#define BRW_VFE_MODE_VC1_IT		0xB
863
864#define BRW_VFE_DEBUG_COUNTER_FREE	0
865#define BRW_VFE_DEBUG_COUNTER_FROZEN	1
866#define BRW_VFE_DEBUG_COUNTER_ONCE	2
867#define BRW_VFE_DEBUG_COUNTER_ALWAYS	3
868
869/* VLD_STATE */
870#define BRW_MPEG_TOP_FIELD		1
871#define BRW_MPEG_BOTTOM_FIELD		2
872#define BRW_MPEG_FRAME			3
873#define BRW_MPEG_QSCALE_LINEAR		0
874#define BRW_MPEG_QSCALE_NONLINEAR	1
875#define BRW_MPEG_ZIGZAG_SCAN		0
876#define BRW_MPEG_ALTER_VERTICAL_SCAN	1
877#define BRW_MPEG_I_PICTURE		1
878#define BRW_MPEG_P_PICTURE		2
879#define BRW_MPEG_B_PICTURE		3
880
881#endif
882