summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/r600/r600_reg.h
blob: 2600875d5c16428991a3da8fdbd738bc87298827 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#ifndef R600_REG_H
#define R600_REG_H

/* for regs which haven't been generated yet */

#define R600_BLEND_ZERO 0
#define R600_BLEND_ONE 1
#define R600_BLEND_SRC_COLOR 2
#define R600_BLEND_ONE_MINUS_SRC_COLOR 3
#define R600_BLEND_SRC_ALPHA 4
#define R600_BLEND_ONE_MINUS_SRC_ALPHA 5
#define R600_BLEND_DST_ALPHA 6
#define R600_BLEND_ONE_MINUS_DST_ALPHA 7
#define R600_BLEND_DST_COLOR 8
#define R600_BLEND_ONE_MINUS_DST_COLOR 9
#define R600_BLEND_SRC_ALPHA_SATURATE 10
#define R600_BLEND_BOTH_SRC_ALPHA 11
#define R600_BLEND_BOTH_INV_SRC_ALPHA 12
#define R600_BLEND_CONST_COLOR 13
#define R600_BLEND_ONE_MINUS_CONST_COLOR 14
#define R600_BLEND_SRC1_COLOR 15
#define R600_BLEND_INV_SRC1_COLOR 16
#define R600_BLEND_SRC1_ALPHA 17
#define R600_BLEND_INV_SRC1_ALPHA 18
#define R600_BLEND_CONST_ALPHA 19
#define R600_BLEND_ONE_MINUS_CONST_ALPHA 20

#define R600_BLEND_FCN_ADD 0
#define R600_BLEND_FCN_SUBTRACT 1
#define R600_BLEND_FCN_MIN 2
#define R600_BLEND_FCN_MAX 3
#define R600_BLEND_FCN_RSUB 4

#define CB_BLEND_COLOR_SRCBLEND_SHIFT 0
#define CB_BLEND_COLOR_COMB_FCN_SHIFT 5
#define CB_BLEND_COLOR_DESTBLEND_SHIFT 8
#define CB_BLEND_ALPHA_SRCBLEND_SHIFT 16
#define CB_BLEND_ALPHA_COMB_FCN_SHIFT 21
#define CB_BLEND_ALPHA_DESTBLEND_SHIFT 24
#define CB_BLEND_SEPARATE_ALPHA_BLEND (1 << 29)

#define SX_ALPHA_TEST_FUNC_SHIFT (0)
#define SX_ALPHA_TEST_ENABLE (1 << 3)

#define R600_ZS_KEEP			0
#define R600_ZS_ZERO			1
#define R600_ZS_REPLACE			2
#define R600_ZS_INCR			3
#define R600_ZS_DECR			4
#define R600_ZS_INVERT			5
#define R600_ZS_INCR_WRAP		6
#define R600_ZS_DECR_WRAP		7

#define R600_STENCILREF_SHIFT 0
#define R600_STENCILMASK_SHIFT 8
#define R600_STENCILWRITEMASK_SHIFT 16

#define PA_SU_PS_WIDTH_SHIFT 16

#define PA_SU_CULL_FRONT (1 << 0)
#define PA_SU_CULL_BACK (1 << 1)
#define PA_SU_FACE_CCW (0 << 2)
#define PA_SU_FACE_CW (1 << 2)

#define PA_SU_POLYMODE_FRONT_SHIFT 5
#define PA_SU_POLYMODE_BACK_SHIFT 5
#define POLYGON_MODE_POINT 0
#define POLYGON_MODE_LINE 1
#define POLYGON_MODE_TRI 2


#endif