cmd2d.h revision bdcaa8d0
1#ifndef __CMD2D_H__
2#define __CMD2D_H__
3
4/*
5 * commands the 2d microcode offers
6 */
7/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/rendition/cmd2d.h,v 1.2 1999/10/14 04:43:14 dawes Exp $ */
8
9#define CMD_SETUP					32
10#define CMD_SET_PIX_REG				2
11#define CMD_RECT_SOLID				1
12#define CMD_RECT_SOLID_ROP			41
13#define CMD_SET_FGCOLOR				50
14#define CMD_DD_RECT_SOLID			38
15#define CMD_SCREEN_BLT				12
16#define CMD_DD_SCREEN_BLT			37
17#define CMD_BITBLT_MS_COLOR			7
18#define CMD_BITBLT_MS_MONO			22
19#define CMD_LOAD_COLOR_BRUSH		5
20#define CMD_RECT_COLOR_BRUSH		6
21#define CMD_RECT_COLOR_BRUSH_ROP	24
22#define CMD_LOAD_MONO_BRUSH			4
23#define CMD_RECT_MONO_BRUSH			3
24#define CMD_RECT_MONO_BRUSH_ROP		42
25#define CMD_SET_PIXEL				34
26#define CMD_GET_PIXEL				9
27#define CMD_LINE_SOLID				20
28#define CMD_LINE_STYLE				21
29#define CMD_SCAN_LINE_SOLID			15
30#define CMD_BSCAN_SOLID				19
31#define CMD_BSCAN_COLOR				14
32#define CMD_BSCAN_MONO				13
33#define CMD_ENDSCAN					18
34#define CMD_SCANLINE_COLOR_BRUSH	17
35#define CMD_SCANLINE_MONO_BRUSH		16
36#define CMD_STRETCH_BLT				23
37#define CMD_DD_STRETCH_BLT			39
38#define CMD_LOAD_COLOR_TABLE		25
39#define CMD_BLTDIB1					26
40#define CMD_BLTDIB4					27
41#define CMD_BLTDIB8					28
42#define CMD_BLTRLE4					30
43#define CMD_BLTRLE8					31
44#define CMD_SET_PALETTE				33
45#define CMD_SETCLIPPING				36
46#define CMD_DRAWGLYPHS				35
47#define CMD_DD_YUV2RGB				43
48#define CMD_DD_YUV2RGBCk			44
49
50
51
52/*
53 * pixel formats (R: red, G: green, B: blue, I: intensity/index, A: alpha)
54 *
55 * <ml>: this is redundant; one should use the enums in vtypes.h.
56 */
57
58#define FMT_SOURCE					0
59#define FMT_8_332_RGB				1
60#define FMT_8_I						2
61#define FMT_8_A						3
62#define FMT_16_565_RGB				4
63#define FMT_16_4444_ARGB			5
64#define FMT_16_1555_ARGB			6
65#define FMT_4I_565_RGB				8
66#define FMT_4I_444_ARGB				9
67#define FMT_4I_1555_ARGB			0xa
68#define FMT_32_8888_ARGB			0xc
69#define FMT_32_888_Y0CrY1Cb			0xd
70
71
72
73/*
74 * stride values for address calculation
75 */
76
77#define STRIDE0_0					0
78#define STRIDE0_8					1
79#define STRIDE0_9					2
80#define STRIDE0_10					3
81#define STRIDE0_2					4
82#define STRIDE1_0					0
83#define STRIDE1_4					1
84#define STRIDE1_5					2
85#define STRIDE1_6					3
86#define STRIDE1_7					4
87#define STRIDE1_10					5
88#define STRIDE1_11					6
89#define STRIDE1_12					7
90
91
92
93/*
94 * raster operations (S: source, D: destination, N: not)
95 */
96
97#define ROP_ALLBITS0				0
98#define ROP_NOR_SD					1
99#define ROP_AND_NSD					2
100#define ROP_NOT_S					3
101#define ROP_AND_SND					4
102#define ROP_NOT_D					5
103#define ROP_XOR_SD					6
104#define ROP_NAND_SD					7
105#define ROP_AND_SD					8
106#define ROP_XNOR_SD					9
107#define ROP_D						0xa
108#define ROP_OR_NSD					0xb
109#define ROP_S						0xc
110#define ROP_OR_SND					0xd
111#define ROP_OR_SD					0xe
112#define ROP_ALLBITS1				0xf
113
114
115
116/*
117 * ... modes
118 */
119
120#define MODE_TRANSPARENT			0
121#define MODE_OPAQUE					1
122
123
124
125/*
126 * 8x8 predefined monochrome brushes
127 */
128
129#define HS_HORIZONTAL				0
130#define HS_VERTICAL					1
131#define HS_FDIAGONAL				2
132#define HS_BDIAGONAL				3
133#define HS_CROSS					4
134#define HS_DIAGCROSS				5
135
136
137
138/*
139 * pen styles for styled lined
140 */
141
142#define PS_DASH						1
143#define PS_DOT						2
144#define PS_DASHDOT					3
145#define PS_DASHDOTDOT				4
146
147/* end of __CMD2D_H__ */
148#endif
149