103b705cfSriastradh /**************************************************************************
203b705cfSriastradh *
303b705cfSriastradh * Copyright 2005 Tungsten Graphics, Inc., Cedar Park, Texas.
403b705cfSriastradh * All Rights Reserved.
503b705cfSriastradh *
603b705cfSriastradh * Permission is hereby granted, free of charge, to any person obtaining a
703b705cfSriastradh * copy of this software and associated documentation files (the
803b705cfSriastradh * "Software"), to deal in the Software without restriction, including
903b705cfSriastradh * without limitation the rights to use, copy, modify, merge, publish,
1003b705cfSriastradh * distribute, sub license, and/or sell copies of the Software, and to
1103b705cfSriastradh * permit persons to whom the Software is furnished to do so, subject to
1203b705cfSriastradh * the following conditions:
1303b705cfSriastradh *
1403b705cfSriastradh * The above copyright notice and this permission notice (including the
1503b705cfSriastradh * next paragraph) shall be included in all copies or substantial portions
1603b705cfSriastradh * of the Software.
1703b705cfSriastradh *
1803b705cfSriastradh * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
1903b705cfSriastradh * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
2003b705cfSriastradh * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
2103b705cfSriastradh * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR
2203b705cfSriastradh * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
2303b705cfSriastradh * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
2403b705cfSriastradh * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2503b705cfSriastradh *
2603b705cfSriastradh **************************************************************************/
2703b705cfSriastradh
2803b705cfSriastradh#ifndef BRW_DEFINES_H
2903b705cfSriastradh#define BRW_DEFINES_H
3003b705cfSriastradh
3103b705cfSriastradh/*
3203b705cfSriastradh */
3303b705cfSriastradh#if 0
3403b705cfSriastradh#define MI_NOOP                              0x00
3503b705cfSriastradh#define MI_USER_INTERRUPT                    0x02
3603b705cfSriastradh#define MI_WAIT_FOR_EVENT                    0x03
3703b705cfSriastradh#define MI_FLUSH                             0x04
3803b705cfSriastradh#define MI_REPORT_HEAD                       0x07
3903b705cfSriastradh#define MI_ARB_ON_OFF                        0x08
4003b705cfSriastradh#define MI_BATCH_BUFFER_END                  0x0A
4103b705cfSriastradh#define MI_OVERLAY_FLIP                      0x11
4203b705cfSriastradh#define MI_LOAD_SCAN_LINES_INCL              0x12
4303b705cfSriastradh#define MI_LOAD_SCAN_LINES_EXCL              0x13
4403b705cfSriastradh#define MI_DISPLAY_BUFFER_INFO               0x14
4503b705cfSriastradh#define MI_SET_CONTEXT                       0x18
4603b705cfSriastradh#define MI_STORE_DATA_IMM                    0x20
4703b705cfSriastradh#define MI_STORE_DATA_INDEX                  0x21
4803b705cfSriastradh#define MI_LOAD_REGISTER_IMM                 0x22
4903b705cfSriastradh#define MI_STORE_REGISTER_MEM                0x24
5003b705cfSriastradh#define MI_BATCH_BUFFER_START                0x31
5103b705cfSriastradh
5203b705cfSriastradh#define MI_SYNCHRONOUS_FLIP                  0x0
5303b705cfSriastradh#define MI_ASYNCHRONOUS_FLIP                 0x1
5403b705cfSriastradh
5503b705cfSriastradh#define MI_BUFFER_SECURE                     0x0
5603b705cfSriastradh#define MI_BUFFER_NONSECURE                  0x1
5703b705cfSriastradh
5803b705cfSriastradh#define MI_ARBITRATE_AT_CHAIN_POINTS         0x0
5903b705cfSriastradh#define MI_ARBITRATE_BETWEEN_INSTS           0x1
6003b705cfSriastradh#define MI_NO_ARBITRATION                    0x3
6103b705cfSriastradh
6203b705cfSriastradh#define MI_CONDITION_CODE_WAIT_DISABLED      0x0
6303b705cfSriastradh#define MI_CONDITION_CODE_WAIT_0             0x1
6403b705cfSriastradh#define MI_CONDITION_CODE_WAIT_1             0x2
6503b705cfSriastradh#define MI_CONDITION_CODE_WAIT_2             0x3
6603b705cfSriastradh#define MI_CONDITION_CODE_WAIT_3             0x4
6703b705cfSriastradh#define MI_CONDITION_CODE_WAIT_4             0x5
6803b705cfSriastradh
6903b705cfSriastradh#define MI_DISPLAY_PIPE_A                    0x0
7003b705cfSriastradh#define MI_DISPLAY_PIPE_B                    0x1
7103b705cfSriastradh
7203b705cfSriastradh#define MI_DISPLAY_PLANE_A                   0x0
7303b705cfSriastradh#define MI_DISPLAY_PLANE_B                   0x1
7403b705cfSriastradh#define MI_DISPLAY_PLANE_C                   0x2
7503b705cfSriastradh
7603b705cfSriastradh#define MI_STANDARD_FLIP                                 0x0
7703b705cfSriastradh#define MI_ENQUEUE_FLIP_PERFORM_BASE_FRAME_NUMBER_LOAD   0x1
7803b705cfSriastradh#define MI_ENQUEUE_FLIP_TARGET_FRAME_NUMBER_RELATIVE     0x2
7903b705cfSriastradh#define MI_ENQUEUE_FLIP_ABSOLUTE_TARGET_FRAME_NUMBER     0x3
8003b705cfSriastradh
8103b705cfSriastradh#define MI_PHYSICAL_ADDRESS                  0x0
8203b705cfSriastradh#define MI_VIRTUAL_ADDRESS                   0x1
8303b705cfSriastradh
8403b705cfSriastradh#define MI_BUFFER_MEMORY_MAIN                0x0
8503b705cfSriastradh#define MI_BUFFER_MEMORY_GTT                 0x2
8603b705cfSriastradh#define MI_BUFFER_MEMORY_PER_PROCESS_GTT     0x3
8703b705cfSriastradh
8803b705cfSriastradh#define MI_FLIP_CONTINUE                     0x0
8903b705cfSriastradh#define MI_FLIP_ON                           0x1
9003b705cfSriastradh#define MI_FLIP_OFF                          0x2
9103b705cfSriastradh
9203b705cfSriastradh#define MI_UNTRUSTED_REGISTER_SPACE          0x0
9303b705cfSriastradh#define MI_TRUSTED_REGISTER_SPACE            0x1
9403b705cfSriastradh#endif
9503b705cfSriastradh
9603b705cfSriastradh/* 3D state:
9703b705cfSriastradh */
9803b705cfSriastradh#define _3DOP_3DSTATE_PIPELINED       0x0
9903b705cfSriastradh#define _3DOP_3DSTATE_NONPIPELINED    0x1
10003b705cfSriastradh#define _3DOP_3DCONTROL               0x2
10103b705cfSriastradh#define _3DOP_3DPRIMITIVE             0x3
10203b705cfSriastradh
10303b705cfSriastradh#define _3DSTATE_PIPELINED_POINTERS       0x00
10403b705cfSriastradh#define _3DSTATE_BINDING_TABLE_POINTERS   0x01
10503b705cfSriastradh#define _3DSTATE_VERTEX_BUFFERS           0x08
10603b705cfSriastradh#define _3DSTATE_VERTEX_ELEMENTS          0x09
10703b705cfSriastradh#define _3DSTATE_INDEX_BUFFER             0x0A
10803b705cfSriastradh#define _3DSTATE_VF_STATISTICS            0x0B
10903b705cfSriastradh#define _3DSTATE_DRAWING_RECTANGLE            0x00
11003b705cfSriastradh#define _3DSTATE_CONSTANT_COLOR               0x01
11103b705cfSriastradh#define _3DSTATE_SAMPLER_PALETTE_LOAD         0x02
11203b705cfSriastradh#define _3DSTATE_CHROMA_KEY                   0x04
11303b705cfSriastradh#define _3DSTATE_DEPTH_BUFFER                 0x05
11403b705cfSriastradh#define _3DSTATE_POLY_STIPPLE_OFFSET          0x06
11503b705cfSriastradh#define _3DSTATE_POLY_STIPPLE_PATTERN         0x07
11603b705cfSriastradh#define _3DSTATE_LINE_STIPPLE                 0x08
11703b705cfSriastradh#define _3DSTATE_GLOBAL_DEPTH_OFFSET_CLAMP    0x09
11803b705cfSriastradh#define _3DCONTROL    0x00
11903b705cfSriastradh#define _3DPRIMITIVE  0x00
12003b705cfSriastradh
12103b705cfSriastradh#define PIPE_CONTROL_NOWRITE          0x00
12203b705cfSriastradh#define PIPE_CONTROL_WRITEIMMEDIATE   0x01
12303b705cfSriastradh#define PIPE_CONTROL_WRITEDEPTH       0x02
12403b705cfSriastradh#define PIPE_CONTROL_WRITETIMESTAMP   0x03
12503b705cfSriastradh
12603b705cfSriastradh#define PIPE_CONTROL_GTTWRITE_PROCESS_LOCAL 0x00
12703b705cfSriastradh#define PIPE_CONTROL_GTTWRITE_GLOBAL        0x01
12803b705cfSriastradh
12903b705cfSriastradh#define _3DPRIM_POINTLIST         0x01
13003b705cfSriastradh#define _3DPRIM_LINELIST          0x02
13103b705cfSriastradh#define _3DPRIM_LINESTRIP         0x03
13203b705cfSriastradh#define _3DPRIM_TRILIST           0x04
13303b705cfSriastradh#define _3DPRIM_TRISTRIP          0x05
13403b705cfSriastradh#define _3DPRIM_TRIFAN            0x06
13503b705cfSriastradh#define _3DPRIM_QUADLIST          0x07
13603b705cfSriastradh#define _3DPRIM_QUADSTRIP         0x08
13703b705cfSriastradh#define _3DPRIM_LINELIST_ADJ      0x09
13803b705cfSriastradh#define _3DPRIM_LINESTRIP_ADJ     0x0A
13903b705cfSriastradh#define _3DPRIM_TRILIST_ADJ       0x0B
14003b705cfSriastradh#define _3DPRIM_TRISTRIP_ADJ      0x0C
14103b705cfSriastradh#define _3DPRIM_TRISTRIP_REVERSE  0x0D
14203b705cfSriastradh#define _3DPRIM_POLYGON           0x0E
14303b705cfSriastradh#define _3DPRIM_RECTLIST          0x0F
14403b705cfSriastradh#define _3DPRIM_LINELOOP          0x10
14503b705cfSriastradh#define _3DPRIM_POINTLIST_BF      0x11
14603b705cfSriastradh#define _3DPRIM_LINESTRIP_CONT    0x12
14703b705cfSriastradh#define _3DPRIM_LINESTRIP_BF      0x13
14803b705cfSriastradh#define _3DPRIM_LINESTRIP_CONT_BF 0x14
14903b705cfSriastradh#define _3DPRIM_TRIFAN_NOSTIPPLE  0x15
15003b705cfSriastradh
15103b705cfSriastradh#define _3DPRIM_VERTEXBUFFER_ACCESS_SEQUENTIAL 0
15203b705cfSriastradh#define _3DPRIM_VERTEXBUFFER_ACCESS_RANDOM     1
15303b705cfSriastradh
15403b705cfSriastradh#define BRW_ANISORATIO_2     0
15503b705cfSriastradh#define BRW_ANISORATIO_4     1
15603b705cfSriastradh#define BRW_ANISORATIO_6     2
15703b705cfSriastradh#define BRW_ANISORATIO_8     3
15803b705cfSriastradh#define BRW_ANISORATIO_10    4
15903b705cfSriastradh#define BRW_ANISORATIO_12    5
16003b705cfSriastradh#define BRW_ANISORATIO_14    6
16103b705cfSriastradh#define BRW_ANISORATIO_16    7
16203b705cfSriastradh
16303b705cfSriastradh#define BRW_BLENDFACTOR_ONE                 0x1
16403b705cfSriastradh#define BRW_BLENDFACTOR_SRC_COLOR           0x2
16503b705cfSriastradh#define BRW_BLENDFACTOR_SRC_ALPHA           0x3
16603b705cfSriastradh#define BRW_BLENDFACTOR_DST_ALPHA           0x4
16703b705cfSriastradh#define BRW_BLENDFACTOR_DST_COLOR           0x5
16803b705cfSriastradh#define BRW_BLENDFACTOR_SRC_ALPHA_SATURATE  0x6
16903b705cfSriastradh#define BRW_BLENDFACTOR_CONST_COLOR         0x7
17003b705cfSriastradh#define BRW_BLENDFACTOR_CONST_ALPHA         0x8
17103b705cfSriastradh#define BRW_BLENDFACTOR_SRC1_COLOR          0x9
17203b705cfSriastradh#define BRW_BLENDFACTOR_SRC1_ALPHA          0x0A
17303b705cfSriastradh#define BRW_BLENDFACTOR_ZERO                0x11
17403b705cfSriastradh#define BRW_BLENDFACTOR_INV_SRC_COLOR       0x12
17503b705cfSriastradh#define BRW_BLENDFACTOR_INV_SRC_ALPHA       0x13
17603b705cfSriastradh#define BRW_BLENDFACTOR_INV_DST_ALPHA       0x14
17703b705cfSriastradh#define BRW_BLENDFACTOR_INV_DST_COLOR       0x15
17803b705cfSriastradh#define BRW_BLENDFACTOR_INV_CONST_COLOR     0x17
17903b705cfSriastradh#define BRW_BLENDFACTOR_INV_CONST_ALPHA     0x18
18003b705cfSriastradh#define BRW_BLENDFACTOR_INV_SRC1_COLOR      0x19
18103b705cfSriastradh#define BRW_BLENDFACTOR_INV_SRC1_ALPHA      0x1A
18203b705cfSriastradh
18303b705cfSriastradh#define BRW_BLENDFUNCTION_ADD               0
18403b705cfSriastradh#define BRW_BLENDFUNCTION_SUBTRACT          1
18503b705cfSriastradh#define BRW_BLENDFUNCTION_REVERSE_SUBTRACT  2
18603b705cfSriastradh#define BRW_BLENDFUNCTION_MIN               3
18703b705cfSriastradh#define BRW_BLENDFUNCTION_MAX               4
18803b705cfSriastradh
18903b705cfSriastradh#define BRW_ALPHATEST_FORMAT_UNORM8         0
19003b705cfSriastradh#define BRW_ALPHATEST_FORMAT_FLOAT32        1
19103b705cfSriastradh
19203b705cfSriastradh#define BRW_CHROMAKEY_KILL_ON_ANY_MATCH  0
19303b705cfSriastradh#define BRW_CHROMAKEY_REPLACE_BLACK      1
19403b705cfSriastradh
19503b705cfSriastradh#define BRW_CLIP_API_OGL     0
19603b705cfSriastradh#define BRW_CLIP_API_DX      1
19703b705cfSriastradh
19803b705cfSriastradh#define BRW_CLIPMODE_NORMAL              0
19903b705cfSriastradh#define BRW_CLIPMODE_CLIP_ALL            1
20003b705cfSriastradh#define BRW_CLIPMODE_CLIP_NON_REJECTED   2
20103b705cfSriastradh#define BRW_CLIPMODE_REJECT_ALL          3
20203b705cfSriastradh#define BRW_CLIPMODE_ACCEPT_ALL          4
20303b705cfSriastradh
20403b705cfSriastradh#define BRW_CLIP_NDCSPACE     0
20503b705cfSriastradh#define BRW_CLIP_SCREENSPACE  1
20603b705cfSriastradh
20703b705cfSriastradh#define BRW_COMPAREFUNCTION_ALWAYS       0
20803b705cfSriastradh#define BRW_COMPAREFUNCTION_NEVER        1
20903b705cfSriastradh#define BRW_COMPAREFUNCTION_LESS         2
21003b705cfSriastradh#define BRW_COMPAREFUNCTION_EQUAL        3
21103b705cfSriastradh#define BRW_COMPAREFUNCTION_LEQUAL       4
21203b705cfSriastradh#define BRW_COMPAREFUNCTION_GREATER      5
21303b705cfSriastradh#define BRW_COMPAREFUNCTION_NOTEQUAL     6
21403b705cfSriastradh#define BRW_COMPAREFUNCTION_GEQUAL       7
21503b705cfSriastradh
21603b705cfSriastradh#define BRW_COVERAGE_PIXELS_HALF     0
21703b705cfSriastradh#define BRW_COVERAGE_PIXELS_1        1
21803b705cfSriastradh#define BRW_COVERAGE_PIXELS_2        2
21903b705cfSriastradh#define BRW_COVERAGE_PIXELS_4        3
22003b705cfSriastradh
22103b705cfSriastradh#define BRW_CULLMODE_BOTH        0
22203b705cfSriastradh#define BRW_CULLMODE_NONE        1
22303b705cfSriastradh#define BRW_CULLMODE_FRONT       2
22403b705cfSriastradh#define BRW_CULLMODE_BACK        3
22503b705cfSriastradh
22603b705cfSriastradh#define BRW_DEFAULTCOLOR_R8G8B8A8_UNORM      0
22703b705cfSriastradh#define BRW_DEFAULTCOLOR_R32G32B32A32_FLOAT  1
22803b705cfSriastradh
22903b705cfSriastradh#define BRW_DEPTHFORMAT_D32_FLOAT_S8X24_UINT     0
23003b705cfSriastradh#define BRW_DEPTHFORMAT_D32_FLOAT                1
23103b705cfSriastradh#define BRW_DEPTHFORMAT_D24_UNORM_S8_UINT        2
23203b705cfSriastradh#define BRW_DEPTHFORMAT_D16_UNORM                5
23303b705cfSriastradh
23403b705cfSriastradh#define BRW_FLOATING_POINT_IEEE_754        0
23503b705cfSriastradh#define BRW_FLOATING_POINT_NON_IEEE_754    1
23603b705cfSriastradh
23703b705cfSriastradh#define BRW_FRONTWINDING_CW      0
23803b705cfSriastradh#define BRW_FRONTWINDING_CCW     1
23903b705cfSriastradh
24003b705cfSriastradh#define BRW_INDEX_BYTE     0
24103b705cfSriastradh#define BRW_INDEX_WORD     1
24203b705cfSriastradh#define BRW_INDEX_DWORD    2
24303b705cfSriastradh
24403b705cfSriastradh#define BRW_LOGICOPFUNCTION_CLEAR            0
24503b705cfSriastradh#define BRW_LOGICOPFUNCTION_NOR              1
24603b705cfSriastradh#define BRW_LOGICOPFUNCTION_AND_INVERTED     2
24703b705cfSriastradh#define BRW_LOGICOPFUNCTION_COPY_INVERTED    3
24803b705cfSriastradh#define BRW_LOGICOPFUNCTION_AND_REVERSE      4
24903b705cfSriastradh#define BRW_LOGICOPFUNCTION_INVERT           5
25003b705cfSriastradh#define BRW_LOGICOPFUNCTION_XOR              6
25103b705cfSriastradh#define BRW_LOGICOPFUNCTION_NAND             7
25203b705cfSriastradh#define BRW_LOGICOPFUNCTION_AND              8
25303b705cfSriastradh#define BRW_LOGICOPFUNCTION_EQUIV            9
25403b705cfSriastradh#define BRW_LOGICOPFUNCTION_NOOP             10
25503b705cfSriastradh#define BRW_LOGICOPFUNCTION_OR_INVERTED      11
25603b705cfSriastradh#define BRW_LOGICOPFUNCTION_COPY             12
25703b705cfSriastradh#define BRW_LOGICOPFUNCTION_OR_REVERSE       13
25803b705cfSriastradh#define BRW_LOGICOPFUNCTION_OR               14
25903b705cfSriastradh#define BRW_LOGICOPFUNCTION_SET              15
26003b705cfSriastradh
26103b705cfSriastradh#define BRW_MAPFILTER_NEAREST        0x0
26203b705cfSriastradh#define BRW_MAPFILTER_LINEAR         0x1
26303b705cfSriastradh#define BRW_MAPFILTER_ANISOTROPIC    0x2
26403b705cfSriastradh
26503b705cfSriastradh#define BRW_MIPFILTER_NONE        0
26603b705cfSriastradh#define BRW_MIPFILTER_NEAREST     1
26703b705cfSriastradh#define BRW_MIPFILTER_LINEAR      3
26803b705cfSriastradh
26903b705cfSriastradh#define BRW_POLYGON_FRONT_FACING     0
27003b705cfSriastradh#define BRW_POLYGON_BACK_FACING      1
27103b705cfSriastradh
27203b705cfSriastradh#define BRW_PREFILTER_ALWAYS     0x0
27303b705cfSriastradh#define BRW_PREFILTER_NEVER      0x1
27403b705cfSriastradh#define BRW_PREFILTER_LESS       0x2
27503b705cfSriastradh#define BRW_PREFILTER_EQUAL      0x3
27603b705cfSriastradh#define BRW_PREFILTER_LEQUAL     0x4
27703b705cfSriastradh#define BRW_PREFILTER_GREATER    0x5
27803b705cfSriastradh#define BRW_PREFILTER_NOTEQUAL   0x6
27903b705cfSriastradh#define BRW_PREFILTER_GEQUAL     0x7
28003b705cfSriastradh
28103b705cfSriastradh#define BRW_PROVOKING_VERTEX_0    0
28203b705cfSriastradh#define BRW_PROVOKING_VERTEX_1    1
28303b705cfSriastradh#define BRW_PROVOKING_VERTEX_2    2
28403b705cfSriastradh
28503b705cfSriastradh#define BRW_RASTRULE_UPPER_LEFT  0
28603b705cfSriastradh#define BRW_RASTRULE_UPPER_RIGHT 1
28703b705cfSriastradh
28803b705cfSriastradh#define BRW_RENDERTARGET_CLAMPRANGE_UNORM    0
28903b705cfSriastradh#define BRW_RENDERTARGET_CLAMPRANGE_SNORM    1
29003b705cfSriastradh#define BRW_RENDERTARGET_CLAMPRANGE_FORMAT   2
29103b705cfSriastradh
29203b705cfSriastradh#define BRW_STENCILOP_KEEP               0
29303b705cfSriastradh#define BRW_STENCILOP_ZERO               1
29403b705cfSriastradh#define BRW_STENCILOP_REPLACE            2
29503b705cfSriastradh#define BRW_STENCILOP_INCRSAT            3
29603b705cfSriastradh#define BRW_STENCILOP_DECRSAT            4
29703b705cfSriastradh#define BRW_STENCILOP_INCR               5
29803b705cfSriastradh#define BRW_STENCILOP_DECR               6
29903b705cfSriastradh#define BRW_STENCILOP_INVERT             7
30003b705cfSriastradh
30103b705cfSriastradh#define BRW_SURFACE_MIPMAPLAYOUT_BELOW   0
30203b705cfSriastradh#define BRW_SURFACE_MIPMAPLAYOUT_RIGHT   1
30303b705cfSriastradh
30403b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_FLOAT             0x000
30503b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_SINT              0x001
30603b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_UINT              0x002
30703b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_UNORM             0x003
30803b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_SNORM             0x004
30903b705cfSriastradh#define BRW_SURFACEFORMAT_R64G64_FLOAT                   0x005
31003b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32X32_FLOAT             0x006
31103b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_SSCALED           0x007
31203b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32A32_USCALED           0x008
31303b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_FLOAT                0x040
31403b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_SINT                 0x041
31503b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_UINT                 0x042
31603b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_UNORM                0x043
31703b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_SNORM                0x044
31803b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_SSCALED              0x045
31903b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32B32_USCALED              0x046
32003b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_UNORM             0x080
32103b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_SNORM             0x081
32203b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_SINT              0x082
32303b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_UINT              0x083
32403b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_FLOAT             0x084
32503b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_FLOAT                   0x085
32603b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_SINT                    0x086
32703b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_UINT                    0x087
32803b705cfSriastradh#define BRW_SURFACEFORMAT_R32_FLOAT_X8X24_TYPELESS       0x088
32903b705cfSriastradh#define BRW_SURFACEFORMAT_X32_TYPELESS_G8X24_UINT        0x089
33003b705cfSriastradh#define BRW_SURFACEFORMAT_L32A32_FLOAT                   0x08A
33103b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_UNORM                   0x08B
33203b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_SNORM                   0x08C
33303b705cfSriastradh#define BRW_SURFACEFORMAT_R64_FLOAT                      0x08D
33403b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16X16_UNORM             0x08E
33503b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16X16_FLOAT             0x08F
33603b705cfSriastradh#define BRW_SURFACEFORMAT_A32X32_FLOAT                   0x090
33703b705cfSriastradh#define BRW_SURFACEFORMAT_L32X32_FLOAT                   0x091
33803b705cfSriastradh#define BRW_SURFACEFORMAT_I32X32_FLOAT                   0x092
33903b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_SSCALED           0x093
34003b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16A16_USCALED           0x094
34103b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_SSCALED                 0x095
34203b705cfSriastradh#define BRW_SURFACEFORMAT_R32G32_USCALED                 0x096
34303b705cfSriastradh#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM                 0x0C0
34403b705cfSriastradh#define BRW_SURFACEFORMAT_B8G8R8A8_UNORM_SRGB            0x0C1
34503b705cfSriastradh#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM              0x0C2
34603b705cfSriastradh#define BRW_SURFACEFORMAT_R10G10B10A2_UNORM_SRGB         0x0C3
34703b705cfSriastradh#define BRW_SURFACEFORMAT_R10G10B10A2_UINT               0x0C4
34803b705cfSriastradh#define BRW_SURFACEFORMAT_R10G10B10_SNORM_A2_UNORM       0x0C5
34903b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM                 0x0C7
35003b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_UNORM_SRGB            0x0C8
35103b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_SNORM                 0x0C9
35203b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_SINT                  0x0CA
35303b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_UINT                  0x0CB
35403b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_UNORM                   0x0CC
35503b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_SNORM                   0x0CD
35603b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_SINT                    0x0CE
35703b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_UINT                    0x0CF
35803b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_FLOAT                   0x0D0
35903b705cfSriastradh#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM              0x0D1
36003b705cfSriastradh#define BRW_SURFACEFORMAT_B10G10R10A2_UNORM_SRGB         0x0D2
36103b705cfSriastradh#define BRW_SURFACEFORMAT_R11G11B10_FLOAT                0x0D3
36203b705cfSriastradh#define BRW_SURFACEFORMAT_R32_SINT                       0x0D6
36303b705cfSriastradh#define BRW_SURFACEFORMAT_R32_UINT                       0x0D7
36403b705cfSriastradh#define BRW_SURFACEFORMAT_R32_FLOAT                      0x0D8
36503b705cfSriastradh#define BRW_SURFACEFORMAT_R24_UNORM_X8_TYPELESS          0x0D9
36603b705cfSriastradh#define BRW_SURFACEFORMAT_X24_TYPELESS_G8_UINT           0x0DA
36703b705cfSriastradh#define BRW_SURFACEFORMAT_L16A16_UNORM                   0x0DF
36803b705cfSriastradh#define BRW_SURFACEFORMAT_I24X8_UNORM                    0x0E0
36903b705cfSriastradh#define BRW_SURFACEFORMAT_L24X8_UNORM                    0x0E1
37003b705cfSriastradh#define BRW_SURFACEFORMAT_A24X8_UNORM                    0x0E2
37103b705cfSriastradh#define BRW_SURFACEFORMAT_I32_FLOAT                      0x0E3
37203b705cfSriastradh#define BRW_SURFACEFORMAT_L32_FLOAT                      0x0E4
37303b705cfSriastradh#define BRW_SURFACEFORMAT_A32_FLOAT                      0x0E5
37403b705cfSriastradh#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM                 0x0E9
37503b705cfSriastradh#define BRW_SURFACEFORMAT_B8G8R8X8_UNORM_SRGB            0x0EA
37603b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM                 0x0EB
37703b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8X8_UNORM_SRGB            0x0EC
37803b705cfSriastradh#define BRW_SURFACEFORMAT_R9G9B9E5_SHAREDEXP             0x0ED
37903b705cfSriastradh#define BRW_SURFACEFORMAT_B10G10R10X2_UNORM              0x0EE
38003b705cfSriastradh#define BRW_SURFACEFORMAT_L16A16_FLOAT                   0x0F0
38103b705cfSriastradh#define BRW_SURFACEFORMAT_R32_UNORM                      0x0F1
38203b705cfSriastradh#define BRW_SURFACEFORMAT_R32_SNORM                      0x0F2
38303b705cfSriastradh#define BRW_SURFACEFORMAT_R10G10B10X2_USCALED            0x0F3
38403b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_SSCALED               0x0F4
38503b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8A8_USCALED               0x0F5
38603b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_SSCALED                 0x0F6
38703b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16_USCALED                 0x0F7
38803b705cfSriastradh#define BRW_SURFACEFORMAT_R32_SSCALED                    0x0F8
38903b705cfSriastradh#define BRW_SURFACEFORMAT_R32_USCALED                    0x0F9
39003b705cfSriastradh#define BRW_SURFACEFORMAT_B5G6R5_UNORM                   0x100
39103b705cfSriastradh#define BRW_SURFACEFORMAT_B5G6R5_UNORM_SRGB              0x101
39203b705cfSriastradh#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM                 0x102
39303b705cfSriastradh#define BRW_SURFACEFORMAT_B5G5R5A1_UNORM_SRGB            0x103
39403b705cfSriastradh#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM                 0x104
39503b705cfSriastradh#define BRW_SURFACEFORMAT_B4G4R4A4_UNORM_SRGB            0x105
39603b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8_UNORM                     0x106
39703b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8_SNORM                     0x107
39803b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8_SINT                      0x108
39903b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8_UINT                      0x109
40003b705cfSriastradh#define BRW_SURFACEFORMAT_R16_UNORM                      0x10A
40103b705cfSriastradh#define BRW_SURFACEFORMAT_R16_SNORM                      0x10B
40203b705cfSriastradh#define BRW_SURFACEFORMAT_R16_SINT                       0x10C
40303b705cfSriastradh#define BRW_SURFACEFORMAT_R16_UINT                       0x10D
40403b705cfSriastradh#define BRW_SURFACEFORMAT_R16_FLOAT                      0x10E
40503b705cfSriastradh#define BRW_SURFACEFORMAT_I16_UNORM                      0x111
40603b705cfSriastradh#define BRW_SURFACEFORMAT_L16_UNORM                      0x112
40703b705cfSriastradh#define BRW_SURFACEFORMAT_A16_UNORM                      0x113
40803b705cfSriastradh#define BRW_SURFACEFORMAT_L8A8_UNORM                     0x114
40903b705cfSriastradh#define BRW_SURFACEFORMAT_I16_FLOAT                      0x115
41003b705cfSriastradh#define BRW_SURFACEFORMAT_L16_FLOAT                      0x116
41103b705cfSriastradh#define BRW_SURFACEFORMAT_A16_FLOAT                      0x117
41203b705cfSriastradh#define BRW_SURFACEFORMAT_R5G5_SNORM_B6_UNORM            0x119
41303b705cfSriastradh#define BRW_SURFACEFORMAT_B5G5R5X1_UNORM                 0x11A
41403b705cfSriastradh#define BRW_SURFACEFORMAT_B5G5R5X1_UNORM_SRGB            0x11B
41503b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8_SSCALED                   0x11C
41603b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8_USCALED                   0x11D
41703b705cfSriastradh#define BRW_SURFACEFORMAT_R16_SSCALED                    0x11E
41803b705cfSriastradh#define BRW_SURFACEFORMAT_R16_USCALED                    0x11F
41903b705cfSriastradh#define BRW_SURFACEFORMAT_R8_UNORM                       0x140
42003b705cfSriastradh#define BRW_SURFACEFORMAT_R8_SNORM                       0x141
42103b705cfSriastradh#define BRW_SURFACEFORMAT_R8_SINT                        0x142
42203b705cfSriastradh#define BRW_SURFACEFORMAT_R8_UINT                        0x143
42303b705cfSriastradh#define BRW_SURFACEFORMAT_A8_UNORM                       0x144
42403b705cfSriastradh#define BRW_SURFACEFORMAT_I8_UNORM                       0x145
42503b705cfSriastradh#define BRW_SURFACEFORMAT_L8_UNORM                       0x146
42603b705cfSriastradh#define BRW_SURFACEFORMAT_P4A4_UNORM                     0x147
42703b705cfSriastradh#define BRW_SURFACEFORMAT_A4P4_UNORM                     0x148
42803b705cfSriastradh#define BRW_SURFACEFORMAT_R8_SSCALED                     0x149
42903b705cfSriastradh#define BRW_SURFACEFORMAT_R8_USCALED                     0x14A
43003b705cfSriastradh#define BRW_SURFACEFORMAT_R1_UINT                        0x181
43103b705cfSriastradh#define BRW_SURFACEFORMAT_YCRCB_NORMAL                   0x182
43203b705cfSriastradh#define BRW_SURFACEFORMAT_YCRCB_SWAPUVY                  0x183
43303b705cfSriastradh#define BRW_SURFACEFORMAT_BC1_UNORM                      0x186
43403b705cfSriastradh#define BRW_SURFACEFORMAT_BC2_UNORM                      0x187
43503b705cfSriastradh#define BRW_SURFACEFORMAT_BC3_UNORM                      0x188
43603b705cfSriastradh#define BRW_SURFACEFORMAT_BC4_UNORM                      0x189
43703b705cfSriastradh#define BRW_SURFACEFORMAT_BC5_UNORM                      0x18A
43803b705cfSriastradh#define BRW_SURFACEFORMAT_BC1_UNORM_SRGB                 0x18B
43903b705cfSriastradh#define BRW_SURFACEFORMAT_BC2_UNORM_SRGB                 0x18C
44003b705cfSriastradh#define BRW_SURFACEFORMAT_BC3_UNORM_SRGB                 0x18D
44103b705cfSriastradh#define BRW_SURFACEFORMAT_MONO8                          0x18E
44203b705cfSriastradh#define BRW_SURFACEFORMAT_YCRCB_SWAPUV                   0x18F
44303b705cfSriastradh#define BRW_SURFACEFORMAT_YCRCB_SWAPY                    0x190
44403b705cfSriastradh#define BRW_SURFACEFORMAT_DXT1_RGB                       0x191
44503b705cfSriastradh#define BRW_SURFACEFORMAT_FXT1                           0x192
44603b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8_UNORM                   0x193
44703b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8_SNORM                   0x194
44803b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8_SSCALED                 0x195
44903b705cfSriastradh#define BRW_SURFACEFORMAT_R8G8B8_USCALED                 0x196
45003b705cfSriastradh#define BRW_SURFACEFORMAT_R64G64B64A64_FLOAT             0x197
45103b705cfSriastradh#define BRW_SURFACEFORMAT_R64G64B64_FLOAT                0x198
45203b705cfSriastradh#define BRW_SURFACEFORMAT_BC4_SNORM                      0x199
45303b705cfSriastradh#define BRW_SURFACEFORMAT_BC5_SNORM                      0x19A
45403b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16_UNORM                0x19C
45503b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16_SNORM                0x19D
45603b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16_SSCALED              0x19E
45703b705cfSriastradh#define BRW_SURFACEFORMAT_R16G16B16_USCALED              0x19F
45803b705cfSriastradh
45903b705cfSriastradh#define BRW_SURFACERETURNFORMAT_FLOAT32  0
46003b705cfSriastradh#define BRW_SURFACERETURNFORMAT_S1       1
46103b705cfSriastradh
46203b705cfSriastradh#define BRW_SURFACE_1D      0
46303b705cfSriastradh#define BRW_SURFACE_2D      1
46403b705cfSriastradh#define BRW_SURFACE_3D      2
46503b705cfSriastradh#define BRW_SURFACE_CUBE    3
46603b705cfSriastradh#define BRW_SURFACE_BUFFER  4
46703b705cfSriastradh#define BRW_SURFACE_NULL    7
46803b705cfSriastradh
46903b705cfSriastradh#define BRW_BORDER_COLOR_MODE_DEFAULT	0
47003b705cfSriastradh#define BRW_BORDER_COLOR_MODE_LEGACY	1
47103b705cfSriastradh
47203b705cfSriastradh#define HSW_SCS_ZERO					0
47303b705cfSriastradh#define HSW_SCS_ONE						1
47403b705cfSriastradh#define HSW_SCS_RED						4
47503b705cfSriastradh#define HSW_SCS_GREEN					5
47603b705cfSriastradh#define HSW_SCS_BLUE					6
47703b705cfSriastradh#define HSW_SCS_ALPHA					7
47803b705cfSriastradh
47903b705cfSriastradh#define BRW_TEXCOORDMODE_WRAP            0
48003b705cfSriastradh#define BRW_TEXCOORDMODE_MIRROR          1
48103b705cfSriastradh#define BRW_TEXCOORDMODE_CLAMP           2
48203b705cfSriastradh#define BRW_TEXCOORDMODE_CUBE            3
48303b705cfSriastradh#define BRW_TEXCOORDMODE_CLAMP_BORDER    4
48403b705cfSriastradh#define BRW_TEXCOORDMODE_MIRROR_ONCE     5
48503b705cfSriastradh
48603b705cfSriastradh#define BRW_THREAD_PRIORITY_NORMAL   0
48703b705cfSriastradh#define BRW_THREAD_PRIORITY_HIGH     1
48803b705cfSriastradh
48903b705cfSriastradh#define BRW_TILEWALK_XMAJOR                 0
49003b705cfSriastradh#define BRW_TILEWALK_YMAJOR                 1
49103b705cfSriastradh
49203b705cfSriastradh#define BRW_VERTEX_SUBPIXEL_PRECISION_8BITS  0
49303b705cfSriastradh#define BRW_VERTEX_SUBPIXEL_PRECISION_4BITS  1
49403b705cfSriastradh
49503b705cfSriastradh#define BRW_VERTEXBUFFER_ACCESS_VERTEXDATA     0
49603b705cfSriastradh#define BRW_VERTEXBUFFER_ACCESS_INSTANCEDATA   1
49703b705cfSriastradh
49803b705cfSriastradh#define BRW_VFCOMPONENT_NOSTORE      0
49903b705cfSriastradh#define BRW_VFCOMPONENT_STORE_SRC    1
50003b705cfSriastradh#define BRW_VFCOMPONENT_STORE_0      2
50103b705cfSriastradh#define BRW_VFCOMPONENT_STORE_1_FLT  3
50203b705cfSriastradh#define BRW_VFCOMPONENT_STORE_1_INT  4
50303b705cfSriastradh#define BRW_VFCOMPONENT_STORE_VID    5
50403b705cfSriastradh#define BRW_VFCOMPONENT_STORE_IID    6
50503b705cfSriastradh#define BRW_VFCOMPONENT_STORE_PID    7
50603b705cfSriastradh
50703b705cfSriastradh
50803b705cfSriastradh
50903b705cfSriastradh/* Execution Unit (EU) defines
51003b705cfSriastradh */
51103b705cfSriastradh
51203b705cfSriastradh#define BRW_ALIGN_1   0
51303b705cfSriastradh#define BRW_ALIGN_16  1
51403b705cfSriastradh
51503b705cfSriastradh#define BRW_ADDRESS_DIRECT                        0
51603b705cfSriastradh#define BRW_ADDRESS_REGISTER_INDIRECT_REGISTER    1
51703b705cfSriastradh
51803b705cfSriastradh#define BRW_CHANNEL_X     0
51903b705cfSriastradh#define BRW_CHANNEL_Y     1
52003b705cfSriastradh#define BRW_CHANNEL_Z     2
52103b705cfSriastradh#define BRW_CHANNEL_W     3
52203b705cfSriastradh
52303b705cfSriastradh#define BRW_COMPRESSION_NONE          0
52403b705cfSriastradh#define BRW_COMPRESSION_2NDHALF       1
52503b705cfSriastradh#define BRW_COMPRESSION_COMPRESSED    2
52603b705cfSriastradh
52703b705cfSriastradh#define BRW_CONDITIONAL_NONE  0
52803b705cfSriastradh#define BRW_CONDITIONAL_Z     1
52903b705cfSriastradh#define BRW_CONDITIONAL_NZ    2
53003b705cfSriastradh#define BRW_CONDITIONAL_EQ    1	/* Z */
53103b705cfSriastradh#define BRW_CONDITIONAL_NEQ   2	/* NZ */
53203b705cfSriastradh#define BRW_CONDITIONAL_G     3
53303b705cfSriastradh#define BRW_CONDITIONAL_GE    4
53403b705cfSriastradh#define BRW_CONDITIONAL_L     5
53503b705cfSriastradh#define BRW_CONDITIONAL_LE    6
53603b705cfSriastradh#define BRW_CONDITIONAL_C     7
53703b705cfSriastradh#define BRW_CONDITIONAL_O     8
53803b705cfSriastradh
53903b705cfSriastradh#define BRW_DEBUG_NONE        0
54003b705cfSriastradh#define BRW_DEBUG_BREAKPOINT  1
54103b705cfSriastradh
54203b705cfSriastradh#define BRW_DEPENDENCY_NORMAL         0
54303b705cfSriastradh#define BRW_DEPENDENCY_NOTCLEARED     1
54403b705cfSriastradh#define BRW_DEPENDENCY_NOTCHECKED     2
54503b705cfSriastradh#define BRW_DEPENDENCY_DISABLE        3
54603b705cfSriastradh
54703b705cfSriastradh#define BRW_EXECUTE_1     0
54803b705cfSriastradh#define BRW_EXECUTE_2     1
54903b705cfSriastradh#define BRW_EXECUTE_4     2
55003b705cfSriastradh#define BRW_EXECUTE_8     3
55103b705cfSriastradh#define BRW_EXECUTE_16    4
55203b705cfSriastradh#define BRW_EXECUTE_32    5
55303b705cfSriastradh
55403b705cfSriastradh#define BRW_HORIZONTAL_STRIDE_0   0
55503b705cfSriastradh#define BRW_HORIZONTAL_STRIDE_1   1
55603b705cfSriastradh#define BRW_HORIZONTAL_STRIDE_2   2
55703b705cfSriastradh#define BRW_HORIZONTAL_STRIDE_4   3
55803b705cfSriastradh
55903b705cfSriastradh#define BRW_INSTRUCTION_NORMAL    0
56003b705cfSriastradh#define BRW_INSTRUCTION_SATURATE  1
56103b705cfSriastradh
56203b705cfSriastradh#define BRW_MASK_ENABLE   0
56303b705cfSriastradh#define BRW_MASK_DISABLE  1
56403b705cfSriastradh
56503b705cfSriastradh#define BRW_OPCODE_MOV        1
56603b705cfSriastradh#define BRW_OPCODE_SEL        2
56703b705cfSriastradh#define BRW_OPCODE_NOT        4
56803b705cfSriastradh#define BRW_OPCODE_AND        5
56903b705cfSriastradh#define BRW_OPCODE_OR         6
57003b705cfSriastradh#define BRW_OPCODE_XOR        7
57103b705cfSriastradh#define BRW_OPCODE_SHR        8
57203b705cfSriastradh#define BRW_OPCODE_SHL        9
57303b705cfSriastradh#define BRW_OPCODE_RSR        10
57403b705cfSriastradh#define BRW_OPCODE_RSL        11
57503b705cfSriastradh#define BRW_OPCODE_ASR        12
57603b705cfSriastradh#define BRW_OPCODE_CMP        16
57703b705cfSriastradh#define BRW_OPCODE_JMPI       32
57803b705cfSriastradh#define BRW_OPCODE_IF         34
57903b705cfSriastradh#define BRW_OPCODE_IFF        35
58003b705cfSriastradh#define BRW_OPCODE_ELSE       36
58103b705cfSriastradh#define BRW_OPCODE_ENDIF      37
58203b705cfSriastradh#define BRW_OPCODE_DO         38
58303b705cfSriastradh#define BRW_OPCODE_WHILE      39
58403b705cfSriastradh#define BRW_OPCODE_BREAK      40
58503b705cfSriastradh#define BRW_OPCODE_CONTINUE   41
58603b705cfSriastradh#define BRW_OPCODE_HALT       42
58703b705cfSriastradh#define BRW_OPCODE_MSAVE      44
58803b705cfSriastradh#define BRW_OPCODE_MRESTORE   45
58903b705cfSriastradh#define BRW_OPCODE_PUSH       46
59003b705cfSriastradh#define BRW_OPCODE_POP        47
59103b705cfSriastradh#define BRW_OPCODE_WAIT       48
59203b705cfSriastradh#define BRW_OPCODE_SEND       49
59303b705cfSriastradh#define BRW_OPCODE_ADD        64
59403b705cfSriastradh#define BRW_OPCODE_MUL        65
59503b705cfSriastradh#define BRW_OPCODE_AVG        66
59603b705cfSriastradh#define BRW_OPCODE_FRC        67
59703b705cfSriastradh#define BRW_OPCODE_RNDU       68
59803b705cfSriastradh#define BRW_OPCODE_RNDD       69
59903b705cfSriastradh#define BRW_OPCODE_RNDE       70
60003b705cfSriastradh#define BRW_OPCODE_RNDZ       71
60103b705cfSriastradh#define BRW_OPCODE_MAC        72
60203b705cfSriastradh#define BRW_OPCODE_MACH       73
60303b705cfSriastradh#define BRW_OPCODE_LZD        74
60403b705cfSriastradh#define BRW_OPCODE_SAD2       80
60503b705cfSriastradh#define BRW_OPCODE_SADA2      81
60603b705cfSriastradh#define BRW_OPCODE_DP4        84
60703b705cfSriastradh#define BRW_OPCODE_DPH        85
60803b705cfSriastradh#define BRW_OPCODE_DP3        86
60903b705cfSriastradh#define BRW_OPCODE_DP2        87
61003b705cfSriastradh#define BRW_OPCODE_DPA2       88
61103b705cfSriastradh#define BRW_OPCODE_LINE       89
61203b705cfSriastradh#define BRW_OPCODE_NOP        126
61303b705cfSriastradh
61403b705cfSriastradh#define BRW_PREDICATE_NONE             0
61503b705cfSriastradh#define BRW_PREDICATE_NORMAL           1
61603b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ANYV             2
61703b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ALLV             3
61803b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ANY2H            4
61903b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ALL2H            5
62003b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ANY4H            6
62103b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ALL4H            7
62203b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ANY8H            8
62303b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ALL8H            9
62403b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ANY16H           10
62503b705cfSriastradh#define BRW_PREDICATE_ALIGN1_ALL16H           11
62603b705cfSriastradh#define BRW_PREDICATE_ALIGN16_REPLICATE_X     2
62703b705cfSriastradh#define BRW_PREDICATE_ALIGN16_REPLICATE_Y     3
62803b705cfSriastradh#define BRW_PREDICATE_ALIGN16_REPLICATE_Z     4
62903b705cfSriastradh#define BRW_PREDICATE_ALIGN16_REPLICATE_W     5
63003b705cfSriastradh#define BRW_PREDICATE_ALIGN16_ANY4H           6
63103b705cfSriastradh#define BRW_PREDICATE_ALIGN16_ALL4H           7
63203b705cfSriastradh
63303b705cfSriastradh#define BRW_ARCHITECTURE_REGISTER_FILE    0
63403b705cfSriastradh#define BRW_GENERAL_REGISTER_FILE         1
63503b705cfSriastradh#define BRW_MESSAGE_REGISTER_FILE         2
63603b705cfSriastradh#define BRW_IMMEDIATE_VALUE               3
63703b705cfSriastradh
63803b705cfSriastradh#define BRW_REGISTER_TYPE_UD  0
63903b705cfSriastradh#define BRW_REGISTER_TYPE_D   1
64003b705cfSriastradh#define BRW_REGISTER_TYPE_UW  2
64103b705cfSriastradh#define BRW_REGISTER_TYPE_W   3
64203b705cfSriastradh#define BRW_REGISTER_TYPE_UB  4
64303b705cfSriastradh#define BRW_REGISTER_TYPE_B   5
64403b705cfSriastradh#define BRW_REGISTER_TYPE_VF  5	/* packed float vector, immediates only? */
64503b705cfSriastradh#define BRW_REGISTER_TYPE_HF  6
64603b705cfSriastradh#define BRW_REGISTER_TYPE_V   6	/* packed int vector, immediates only, uword dest only */
64703b705cfSriastradh#define BRW_REGISTER_TYPE_F   7
64803b705cfSriastradh
64903b705cfSriastradh#define BRW_ARF_NULL                  0x00
65003b705cfSriastradh#define BRW_ARF_ADDRESS               0x10
65103b705cfSriastradh#define BRW_ARF_ACCUMULATOR           0x20
65203b705cfSriastradh#define BRW_ARF_FLAG                  0x30
65303b705cfSriastradh#define BRW_ARF_MASK                  0x40
65403b705cfSriastradh#define BRW_ARF_MASK_STACK            0x50
65503b705cfSriastradh#define BRW_ARF_MASK_STACK_DEPTH      0x60
65603b705cfSriastradh#define BRW_ARF_STATE                 0x70
65703b705cfSriastradh#define BRW_ARF_CONTROL               0x80
65803b705cfSriastradh#define BRW_ARF_NOTIFICATION_COUNT    0x90
65903b705cfSriastradh#define BRW_ARF_IP                    0xA0
66003b705cfSriastradh
66103b705cfSriastradh#define BRW_AMASK   0
66203b705cfSriastradh#define BRW_IMASK   1
66303b705cfSriastradh#define BRW_LMASK   2
66403b705cfSriastradh#define BRW_CMASK   3
66503b705cfSriastradh
66603b705cfSriastradh
66703b705cfSriastradh
66803b705cfSriastradh#define BRW_THREAD_NORMAL     0
66903b705cfSriastradh#define BRW_THREAD_ATOMIC     1
67003b705cfSriastradh#define BRW_THREAD_SWITCH     2
67103b705cfSriastradh
67203b705cfSriastradh#define BRW_VERTICAL_STRIDE_0                 0
67303b705cfSriastradh#define BRW_VERTICAL_STRIDE_1                 1
67403b705cfSriastradh#define BRW_VERTICAL_STRIDE_2                 2
67503b705cfSriastradh#define BRW_VERTICAL_STRIDE_4                 3
67603b705cfSriastradh#define BRW_VERTICAL_STRIDE_8                 4
67703b705cfSriastradh#define BRW_VERTICAL_STRIDE_16                5
67803b705cfSriastradh#define BRW_VERTICAL_STRIDE_32                6
67903b705cfSriastradh#define BRW_VERTICAL_STRIDE_64                7
68003b705cfSriastradh#define BRW_VERTICAL_STRIDE_128               8
68103b705cfSriastradh#define BRW_VERTICAL_STRIDE_256               9
68203b705cfSriastradh#define BRW_VERTICAL_STRIDE_ONE_DIMENSIONAL   0xF
68303b705cfSriastradh
68403b705cfSriastradh#define BRW_WIDTH_1       0
68503b705cfSriastradh#define BRW_WIDTH_2       1
68603b705cfSriastradh#define BRW_WIDTH_4       2
68703b705cfSriastradh#define BRW_WIDTH_8       3
68803b705cfSriastradh#define BRW_WIDTH_16      4
68903b705cfSriastradh
69003b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_1K      0
69103b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_2K      1
69203b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_4K      2
69303b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_8K      3
69403b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_16K     4
69503b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_32K     5
69603b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_64K     6
69703b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_128K    7
69803b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_256K    8
69903b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_512K    9
70003b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_1M      10
70103b705cfSriastradh#define BRW_STATELESS_BUFFER_BOUNDARY_2M      11
70203b705cfSriastradh
70303b705cfSriastradh#define BRW_POLYGON_FACING_FRONT      0
70403b705cfSriastradh#define BRW_POLYGON_FACING_BACK       1
70503b705cfSriastradh
70603b705cfSriastradh#define BRW_MESSAGE_TARGET_NULL               0
70703b705cfSriastradh#define BRW_MESSAGE_TARGET_MATH               1
70803b705cfSriastradh#define BRW_MESSAGE_TARGET_SAMPLER            2
70903b705cfSriastradh#define BRW_MESSAGE_TARGET_GATEWAY            3
71003b705cfSriastradh#define BRW_MESSAGE_TARGET_DATAPORT_READ      4
71103b705cfSriastradh#define BRW_MESSAGE_TARGET_DATAPORT_WRITE     5
71203b705cfSriastradh#define BRW_MESSAGE_TARGET_URB                6
71303b705cfSriastradh#define BRW_MESSAGE_TARGET_THREAD_SPAWNER     7
71403b705cfSriastradh
71503b705cfSriastradh#define BRW_SAMPLER_RETURN_FORMAT_FLOAT32     0
71603b705cfSriastradh#define BRW_SAMPLER_RETURN_FORMAT_UINT32      2
71703b705cfSriastradh#define BRW_SAMPLER_RETURN_FORMAT_SINT32      3
71803b705cfSriastradh
71903b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE              0
72003b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE             0
72103b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_BIAS        0
72203b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD8_KILLPIX             1
72303b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_LOD        1
72403b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_LOD         1
72503b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_GRADIENTS  2
72603b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD8_SAMPLE_GRADIENTS    2
72703b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD4X2_SAMPLE_COMPARE    0
72803b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD16_SAMPLE_COMPARE     2
72903b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD4X2_RESINFO           2
73003b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD8_RESINFO             2
73103b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD16_RESINFO            2
73203b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD4X2_LD                3
73303b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD8_LD                  3
73403b705cfSriastradh#define BRW_SAMPLER_MESSAGE_SIMD16_LD                 3
73503b705cfSriastradh
73603b705cfSriastradh#define BRW_DATAPORT_OWORD_BLOCK_1_OWORDLOW   0
73703b705cfSriastradh#define BRW_DATAPORT_OWORD_BLOCK_1_OWORDHIGH  1
73803b705cfSriastradh#define BRW_DATAPORT_OWORD_BLOCK_2_OWORDS     2
73903b705cfSriastradh#define BRW_DATAPORT_OWORD_BLOCK_4_OWORDS     3
74003b705cfSriastradh#define BRW_DATAPORT_OWORD_BLOCK_8_OWORDS     4
74103b705cfSriastradh
74203b705cfSriastradh#define BRW_DATAPORT_OWORD_DUAL_BLOCK_1OWORD     0
74303b705cfSriastradh#define BRW_DATAPORT_OWORD_DUAL_BLOCK_4OWORDS    2
74403b705cfSriastradh
74503b705cfSriastradh#define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_8DWORDS   2
74603b705cfSriastradh#define BRW_DATAPORT_DWORD_SCATTERED_BLOCK_16DWORDS  3
74703b705cfSriastradh
74803b705cfSriastradh#define BRW_DATAPORT_READ_MESSAGE_OWORD_BLOCK_READ          0
74903b705cfSriastradh#define BRW_DATAPORT_READ_MESSAGE_OWORD_DUAL_BLOCK_READ     1
75003b705cfSriastradh#define BRW_DATAPORT_READ_MESSAGE_DWORD_BLOCK_READ          2
75103b705cfSriastradh#define BRW_DATAPORT_READ_MESSAGE_DWORD_SCATTERED_READ      3
75203b705cfSriastradh
75303b705cfSriastradh#define BRW_DATAPORT_READ_TARGET_DATA_CACHE      0
75403b705cfSriastradh#define BRW_DATAPORT_READ_TARGET_RENDER_CACHE    1
75503b705cfSriastradh#define BRW_DATAPORT_READ_TARGET_SAMPLER_CACHE   2
75603b705cfSriastradh
75703b705cfSriastradh#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE                0
75803b705cfSriastradh#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD16_SINGLE_SOURCE_REPLICATED     1
75903b705cfSriastradh#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN01         2
76003b705cfSriastradh#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_DUAL_SOURCE_SUBSPAN23         3
76103b705cfSriastradh#define BRW_DATAPORT_RENDER_TARGET_WRITE_SIMD8_SINGLE_SOURCE_SUBSPAN01       4
76203b705cfSriastradh
76303b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_BLOCK_WRITE                0
76403b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_OWORD_DUAL_BLOCK_WRITE           1
76503b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_DWORD_BLOCK_WRITE                2
76603b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_DWORD_SCATTERED_WRITE            3
76703b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_RENDER_TARGET_WRITE              4
76803b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_STREAMED_VERTEX_BUFFER_WRITE     5
76903b705cfSriastradh#define BRW_DATAPORT_WRITE_MESSAGE_FLUSH_RENDER_CACHE               7
77003b705cfSriastradh
77103b705cfSriastradh#define BRW_MATH_FUNCTION_INV                              1
77203b705cfSriastradh#define BRW_MATH_FUNCTION_LOG                              2
77303b705cfSriastradh#define BRW_MATH_FUNCTION_EXP                              3
77403b705cfSriastradh#define BRW_MATH_FUNCTION_SQRT                             4
77503b705cfSriastradh#define BRW_MATH_FUNCTION_RSQ                              5
77603b705cfSriastradh#define BRW_MATH_FUNCTION_SIN                              6 /* was 7 */
77703b705cfSriastradh#define BRW_MATH_FUNCTION_COS                              7 /* was 8 */
77803b705cfSriastradh#define BRW_MATH_FUNCTION_SINCOS                           8 /* was 6 */
77903b705cfSriastradh#define BRW_MATH_FUNCTION_TAN                              9
78003b705cfSriastradh#define BRW_MATH_FUNCTION_POW                              10
78103b705cfSriastradh#define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT_AND_REMAINDER   11
78203b705cfSriastradh#define BRW_MATH_FUNCTION_INT_DIV_QUOTIENT                 12
78303b705cfSriastradh#define BRW_MATH_FUNCTION_INT_DIV_REMAINDER                13
78403b705cfSriastradh
78503b705cfSriastradh#define BRW_MATH_INTEGER_UNSIGNED     0
78603b705cfSriastradh#define BRW_MATH_INTEGER_SIGNED       1
78703b705cfSriastradh
78803b705cfSriastradh#define BRW_MATH_PRECISION_FULL        0
78903b705cfSriastradh#define BRW_MATH_PRECISION_PARTIAL     1
79003b705cfSriastradh
79103b705cfSriastradh#define BRW_MATH_SATURATE_NONE         0
79203b705cfSriastradh#define BRW_MATH_SATURATE_SATURATE     1
79303b705cfSriastradh
79403b705cfSriastradh#define BRW_MATH_DATA_VECTOR  0
79503b705cfSriastradh#define BRW_MATH_DATA_SCALAR  1
79603b705cfSriastradh
79703b705cfSriastradh#define BRW_URB_OPCODE_WRITE  0
79803b705cfSriastradh
79903b705cfSriastradh#define BRW_URB_SWIZZLE_NONE          0
80003b705cfSriastradh#define BRW_URB_SWIZZLE_INTERLEAVE    1
80103b705cfSriastradh#define BRW_URB_SWIZZLE_TRANSPOSE     2
80203b705cfSriastradh
80303b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_1K     0
80403b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_2K     1
80503b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_4K     2
80603b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_8K     3
80703b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_16K    4
80803b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_32K    5
80903b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_64K    6
81003b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_128K   7
81103b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_256K   8
81203b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_512K   9
81303b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_1M     10
81403b705cfSriastradh#define BRW_SCRATCH_SPACE_SIZE_2M     11
81503b705cfSriastradh
81603b705cfSriastradh
81703b705cfSriastradh
81803b705cfSriastradh
81903b705cfSriastradh#define CMD_URB_FENCE                 0x6000
82003b705cfSriastradh#define CMD_CONST_BUFFER_STATE        0x6001
82103b705cfSriastradh#define CMD_CONST_BUFFER              0x6002
82203b705cfSriastradh
82303b705cfSriastradh#define CMD_STATE_BASE_ADDRESS        0x6101
82403b705cfSriastradh#define CMD_STATE_INSN_POINTER        0x6102
82503b705cfSriastradh#define CMD_PIPELINE_SELECT           0x6104
82603b705cfSriastradh
82703b705cfSriastradh#define CMD_PIPELINED_STATE_POINTERS  0x7800
82803b705cfSriastradh#define CMD_BINDING_TABLE_PTRS        0x7801
82903b705cfSriastradh#define CMD_VERTEX_BUFFER             0x7808
83003b705cfSriastradh#define CMD_VERTEX_ELEMENT            0x7809
83103b705cfSriastradh#define CMD_INDEX_BUFFER              0x780a
83203b705cfSriastradh#define CMD_VF_STATISTICS             0x780b
83303b705cfSriastradh
83403b705cfSriastradh#define CMD_DRAW_RECT                 0x7900
83503b705cfSriastradh#define CMD_BLEND_CONSTANT_COLOR      0x7901
83603b705cfSriastradh#define CMD_CHROMA_KEY                0x7904
83703b705cfSriastradh#define CMD_DEPTH_BUFFER              0x7905
83803b705cfSriastradh#define CMD_POLY_STIPPLE_OFFSET       0x7906
83903b705cfSriastradh#define CMD_POLY_STIPPLE_PATTERN      0x7907
84003b705cfSriastradh#define CMD_LINE_STIPPLE_PATTERN      0x7908
84103b705cfSriastradh#define CMD_GLOBAL_DEPTH_OFFSET_CLAMP 0x7908
84203b705cfSriastradh
84303b705cfSriastradh#define CMD_PIPE_CONTROL              0x7a00
84403b705cfSriastradh
84503b705cfSriastradh#define CMD_3D_PRIM                   0x7b00
84603b705cfSriastradh
84703b705cfSriastradh#define CMD_MI_FLUSH                  0x0200
84803b705cfSriastradh
84903b705cfSriastradh
85003b705cfSriastradh/* Various values from the R0 vertex header:
85103b705cfSriastradh */
85203b705cfSriastradh#define R02_PRIM_END    0x1
85303b705cfSriastradh#define R02_PRIM_START  0x2
85403b705cfSriastradh
85503b705cfSriastradh/* media pipeline */
85603b705cfSriastradh
85703b705cfSriastradh#define BRW_VFE_MODE_GENERIC		0x0
85803b705cfSriastradh#define BRW_VFE_MODE_VLD_MPEG2		0x1
85903b705cfSriastradh#define BRW_VFE_MODE_IS			0x2
86003b705cfSriastradh#define BRW_VFE_MODE_AVC_MC		0x4
86103b705cfSriastradh#define BRW_VFE_MODE_AVC_IT		0x7
86203b705cfSriastradh#define BRW_VFE_MODE_VC1_IT		0xB
86303b705cfSriastradh
86403b705cfSriastradh#define BRW_VFE_DEBUG_COUNTER_FREE	0
86503b705cfSriastradh#define BRW_VFE_DEBUG_COUNTER_FROZEN	1
86603b705cfSriastradh#define BRW_VFE_DEBUG_COUNTER_ONCE	2
86703b705cfSriastradh#define BRW_VFE_DEBUG_COUNTER_ALWAYS	3
86803b705cfSriastradh
86903b705cfSriastradh/* VLD_STATE */
87003b705cfSriastradh#define BRW_MPEG_TOP_FIELD		1
87103b705cfSriastradh#define BRW_MPEG_BOTTOM_FIELD		2
87203b705cfSriastradh#define BRW_MPEG_FRAME			3
87303b705cfSriastradh#define BRW_MPEG_QSCALE_LINEAR		0
87403b705cfSriastradh#define BRW_MPEG_QSCALE_NONLINEAR	1
87503b705cfSriastradh#define BRW_MPEG_ZIGZAG_SCAN		0
87603b705cfSriastradh#define BRW_MPEG_ALTER_VERTICAL_SCAN	1
87703b705cfSriastradh#define BRW_MPEG_I_PICTURE		1
87803b705cfSriastradh#define BRW_MPEG_P_PICTURE		2
87903b705cfSriastradh#define BRW_MPEG_B_PICTURE		3
88003b705cfSriastradh
88103b705cfSriastradh#endif
882