xref: /haiku/headers/private/graphics/nvidia/nv_acc.h (revision 07e14ea9ad8d5e329e028e50da30ab48fdd2bd72)
1bd877ea2SRudolf Cornelissen /*
2bd877ea2SRudolf Cornelissen 	definitions for used nVidia acceleration engine commands.
3bd877ea2SRudolf Cornelissen 
4bd877ea2SRudolf Cornelissen 	Written by Rudolf Cornelissen 12/2004
5bd877ea2SRudolf Cornelissen */
6bd877ea2SRudolf Cornelissen 
7bd877ea2SRudolf Cornelissen #ifndef NV_ACC_H
8bd877ea2SRudolf Cornelissen #define NV_ACC_H
9bd877ea2SRudolf Cornelissen 
10bd877ea2SRudolf Cornelissen typedef struct {
11f0cb8f72SRudolf Cornelissen 	uint32 reserved00[0x0004];
12e549fa89SRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
13e549fa89SRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
14f0cb8f72SRudolf Cornelissen 	uint32 reserved01[0x00bb];
159daf2efeSRudolf Cornelissen 	uint32 SetRop5;				/* b0-7 is ROP5 */
16bd877ea2SRudolf Cornelissen } cmd_nv_rop5_solid;
17bd877ea2SRudolf Cornelissen 
18bd877ea2SRudolf Cornelissen typedef struct {
199daf2efeSRudolf Cornelissen 	uint32 reserved00[0x0004];
209daf2efeSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
219daf2efeSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
229daf2efeSRudolf Cornelissen 	uint32 reserved01[0x00bb];
239daf2efeSRudolf Cornelissen 	uint32 TopLeft;				/* b0-15 is left, b16-31 is top */
249daf2efeSRudolf Cornelissen 	uint32 HeightWidth;			/* b0-15 is width, b16-31 is height */
25bd877ea2SRudolf Cornelissen } cmd_nv_image_black_rectangle;
26bd877ea2SRudolf Cornelissen 
27bd877ea2SRudolf Cornelissen typedef struct {
289daf2efeSRudolf Cornelissen 	uint32 reserved00[0x0004];
299daf2efeSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
309daf2efeSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
319daf2efeSRudolf Cornelissen 	uint32 reserved01[0x00bd];
329daf2efeSRudolf Cornelissen 	uint32 SetShape;			/* b0-1: %00 = 8X_8Y; %01 = 64X_1Y; %10 = 1X_64Y */
339daf2efeSRudolf Cornelissen 	uint32 reserved02[0x0001];
349daf2efeSRudolf Cornelissen 	uint32 SetColor0;			/* b0-31 is color */
359daf2efeSRudolf Cornelissen 	uint32 SetColor1;			/* b0-31 is color */
369daf2efeSRudolf Cornelissen 	uint32 SetPattern[0x0002];	/* b0-31 is bitmap */
37bd877ea2SRudolf Cornelissen } cmd_nv_image_pattern;
38bd877ea2SRudolf Cornelissen 
39bd877ea2SRudolf Cornelissen typedef struct {
409daf2efeSRudolf Cornelissen 	uint32 reserved00[0x0004];
419daf2efeSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
429daf2efeSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
439daf2efeSRudolf Cornelissen 	uint32 reserved01[0x00bb];
449daf2efeSRudolf Cornelissen 	uint32 SourceOrg;			/* b0-15 is X, b16-31 is Y */
459daf2efeSRudolf Cornelissen 	uint32 DestOrg;				/* b0-15 is X, b16-31 is Y */
469daf2efeSRudolf Cornelissen 	uint32 HeightWidth;			/* b0-15 is width, b16-31 is height */
47bd877ea2SRudolf Cornelissen } cmd_nv_image_blit;
48bd877ea2SRudolf Cornelissen 
49bd877ea2SRudolf Cornelissen typedef struct {
50*07e14ea9SRudolf Cornelissen 	uint32 reserved00[0x0004];
51*07e14ea9SRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
52*07e14ea9SRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
53*07e14ea9SRudolf Cornelissen 	uint32 reserved01[0x00fa];
54*07e14ea9SRudolf Cornelissen 	uint32 Color1A;				/* b0-31 is color */
55*07e14ea9SRudolf Cornelissen 	struct
56*07e14ea9SRudolf Cornelissen 	{
57*07e14ea9SRudolf Cornelissen 		uint32 LeftTop;			/* b0-15 is top, b16-31 is left */
58*07e14ea9SRudolf Cornelissen 		uint32 WidthHeight;		/* b0-15 is height, b16-31 is width */
59*07e14ea9SRudolf Cornelissen 	} UnclippedRectangle[0x40];	/* command can handle upto 64 unclipped rects */
60*07e14ea9SRudolf Cornelissen //XFree also defines: (not used AFAIK ATM)
61*07e14ea9SRudolf Cornelissen /*
62*07e14ea9SRudolf Cornelissen     U032 reserved04[(0x080)-3];
63*07e14ea9SRudolf Cornelissen     struct
64*07e14ea9SRudolf Cornelissen     {
65*07e14ea9SRudolf Cornelissen         U032 TopLeft;
66*07e14ea9SRudolf Cornelissen         U032 BottomRight;
67*07e14ea9SRudolf Cornelissen     } ClipB;
68*07e14ea9SRudolf Cornelissen     U032 Color1B;
69*07e14ea9SRudolf Cornelissen     struct
70*07e14ea9SRudolf Cornelissen     {
71*07e14ea9SRudolf Cornelissen         U032 TopLeft;
72*07e14ea9SRudolf Cornelissen         U032 BottomRight;
73*07e14ea9SRudolf Cornelissen     } ClippedRectangle[64];
74*07e14ea9SRudolf Cornelissen     U032 reserved05[(0x080)-5];
75*07e14ea9SRudolf Cornelissen     struct
76*07e14ea9SRudolf Cornelissen     {
77*07e14ea9SRudolf Cornelissen         U032 TopLeft;
78*07e14ea9SRudolf Cornelissen         U032 BottomRight;
79*07e14ea9SRudolf Cornelissen     } ClipC;
80*07e14ea9SRudolf Cornelissen     U032 Color1C;
81*07e14ea9SRudolf Cornelissen     U032 WidthHeightC;
82*07e14ea9SRudolf Cornelissen     U032 PointC;
83*07e14ea9SRudolf Cornelissen     U032 MonochromeData1C;
84*07e14ea9SRudolf Cornelissen     U032 reserved06[(0x080)+121];
85*07e14ea9SRudolf Cornelissen     struct
86*07e14ea9SRudolf Cornelissen     {
87*07e14ea9SRudolf Cornelissen         U032 TopLeft;
88*07e14ea9SRudolf Cornelissen         U032 BottomRight;
89*07e14ea9SRudolf Cornelissen     } ClipD;
90*07e14ea9SRudolf Cornelissen     U032 Color1D;
91*07e14ea9SRudolf Cornelissen     U032 WidthHeightInD;
92*07e14ea9SRudolf Cornelissen     U032 WidthHeightOutD;
93*07e14ea9SRudolf Cornelissen     U032 PointD;
94*07e14ea9SRudolf Cornelissen     U032 MonochromeData1D;
95*07e14ea9SRudolf Cornelissen     U032 reserved07[(0x080)+120];
96*07e14ea9SRudolf Cornelissen     struct
97*07e14ea9SRudolf Cornelissen     {
98*07e14ea9SRudolf Cornelissen         U032 TopLeft;
99*07e14ea9SRudolf Cornelissen         U032 BottomRight;
100*07e14ea9SRudolf Cornelissen     } ClipE;
101*07e14ea9SRudolf Cornelissen     U032 Color0E;
102*07e14ea9SRudolf Cornelissen     U032 Color1E;
103*07e14ea9SRudolf Cornelissen     U032 WidthHeightInE;
104*07e14ea9SRudolf Cornelissen     U032 WidthHeightOutE;
105*07e14ea9SRudolf Cornelissen     U032 PointE;
106*07e14ea9SRudolf Cornelissen     U032 MonochromeData01E;
107*07e14ea9SRudolf Cornelissen */
108bd877ea2SRudolf Cornelissen } cmd_nv3_gdi_rectangle_text;
109bd877ea2SRudolf Cornelissen 
110bd877ea2SRudolf Cornelissen typedef struct {
111bd877ea2SRudolf Cornelissen } cmd_nv_dx5_texture_triangle;
112bd877ea2SRudolf Cornelissen 
113bd877ea2SRudolf Cornelissen #endif
114