xref: /haiku/headers/private/graphics/nvidia/nv_acc.h (revision a9d9522bc6e28f19a554e823a06bae8cec4eea4e)
1bd877ea2SRudolf Cornelissen /*
2bd877ea2SRudolf Cornelissen 	definitions for used nVidia acceleration engine commands.
3bd877ea2SRudolf Cornelissen 
4b1e0087bSRudolf Cornelissen 	Written by Rudolf Cornelissen 12/2004-1/2005
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) */
14b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
15b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
16b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
17b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00ae];
189daf2efeSRudolf Cornelissen 	uint32 SetRop5;				/* b0-7 is ROP5 */
19bd877ea2SRudolf Cornelissen } cmd_nv_rop5_solid;
20bd877ea2SRudolf Cornelissen 
21bd877ea2SRudolf Cornelissen typedef struct {
229daf2efeSRudolf Cornelissen 	uint32 reserved00[0x0004];
239daf2efeSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
249daf2efeSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
25b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
26b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
27b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
28b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00ae];
299daf2efeSRudolf Cornelissen 	uint32 TopLeft;				/* b0-15 is left, b16-31 is top */
309daf2efeSRudolf Cornelissen 	uint32 HeightWidth;			/* b0-15 is width, b16-31 is height */
31bd877ea2SRudolf Cornelissen } cmd_nv_image_black_rectangle;
32bd877ea2SRudolf Cornelissen 
33bd877ea2SRudolf Cornelissen typedef struct {
349daf2efeSRudolf Cornelissen 	uint32 reserved00[0x0004];
359daf2efeSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
369daf2efeSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
37b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
38b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
39b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
408118b759SRudolf Cornelissen 	uint32 reserved02[0x00ae];
418118b759SRudolf Cornelissen 	uint32 SetColorFormat;		/* colorspace */
42b1e0087bSRudolf Cornelissen 	uint32 reserved03[0x0001];
438118b759SRudolf Cornelissen 	uint32 SetShape;			/* b0-1: %00 = 8X_8Y; %01 = 64X_1Y; %10 = 1X_64Y */
448118b759SRudolf Cornelissen 	uint32 reserved04[0x0001];
459daf2efeSRudolf Cornelissen 	uint32 SetColor0;			/* b0-31 is color */
469daf2efeSRudolf Cornelissen 	uint32 SetColor1;			/* b0-31 is color */
479daf2efeSRudolf Cornelissen 	uint32 SetPattern[0x0002];	/* b0-31 is bitmap */
48bd877ea2SRudolf Cornelissen } cmd_nv_image_pattern;
49bd877ea2SRudolf Cornelissen 
50bd877ea2SRudolf Cornelissen typedef struct {
519daf2efeSRudolf Cornelissen 	uint32 reserved00[0x0004];
529daf2efeSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
539daf2efeSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
54b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
55b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
56b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
57b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00ae];
589daf2efeSRudolf Cornelissen 	uint32 SourceOrg;			/* b0-15 is X, b16-31 is Y */
599daf2efeSRudolf Cornelissen 	uint32 DestOrg;				/* b0-15 is X, b16-31 is Y */
609daf2efeSRudolf Cornelissen 	uint32 HeightWidth;			/* b0-15 is width, b16-31 is height */
61bd877ea2SRudolf Cornelissen } cmd_nv_image_blit;
62bd877ea2SRudolf Cornelissen 
63bd877ea2SRudolf Cornelissen typedef struct {
6407e14ea9SRudolf Cornelissen 	uint32 reserved00[0x0004];
6507e14ea9SRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
6607e14ea9SRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
67b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
68b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
69b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
70b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00ed];
7107e14ea9SRudolf Cornelissen 	uint32 Color1A;				/* b0-31 is color */
725c2199fcSRudolf Cornelissen 	struct {
7307e14ea9SRudolf Cornelissen 		uint32 LeftTop;			/* b0-15 is top, b16-31 is left */
7407e14ea9SRudolf Cornelissen 		uint32 WidthHeight;		/* b0-15 is height, b16-31 is width */
7507e14ea9SRudolf Cornelissen 	} UnclippedRectangle[0x40];	/* command can handle upto 64 unclipped rects */
760e0eb256SRudolf Cornelissen /* fixme: XFree also defines the registers below:
770e0eb256SRudolf Cornelissen  * (used for the 2D 'ScanlineCPUToScreenColorExpandFill' and 'ColorExpandScanline'
780e0eb256SRudolf Cornelissen  * functions.)
790e0eb256SRudolf Cornelissen  * We don't use this currently. */
8007e14ea9SRudolf Cornelissen /*
8107e14ea9SRudolf Cornelissen     U032 reserved04[(0x080)-3];
8207e14ea9SRudolf Cornelissen     struct
8307e14ea9SRudolf Cornelissen     {
8407e14ea9SRudolf Cornelissen         U032 TopLeft;
8507e14ea9SRudolf Cornelissen         U032 BottomRight;
8607e14ea9SRudolf Cornelissen     } ClipB;
8707e14ea9SRudolf Cornelissen     U032 Color1B;
8807e14ea9SRudolf Cornelissen     struct
8907e14ea9SRudolf Cornelissen     {
9007e14ea9SRudolf Cornelissen         U032 TopLeft;
9107e14ea9SRudolf Cornelissen         U032 BottomRight;
9207e14ea9SRudolf Cornelissen     } ClippedRectangle[64];
9307e14ea9SRudolf Cornelissen     U032 reserved05[(0x080)-5];
9407e14ea9SRudolf Cornelissen     struct
9507e14ea9SRudolf Cornelissen     {
9607e14ea9SRudolf Cornelissen         U032 TopLeft;
9707e14ea9SRudolf Cornelissen         U032 BottomRight;
9807e14ea9SRudolf Cornelissen     } ClipC;
9907e14ea9SRudolf Cornelissen     U032 Color1C;
10007e14ea9SRudolf Cornelissen     U032 WidthHeightC;
10107e14ea9SRudolf Cornelissen     U032 PointC;
10207e14ea9SRudolf Cornelissen     U032 MonochromeData1C;
10307e14ea9SRudolf Cornelissen     U032 reserved06[(0x080)+121];
10407e14ea9SRudolf Cornelissen     struct
10507e14ea9SRudolf Cornelissen     {
10607e14ea9SRudolf Cornelissen         U032 TopLeft;
10707e14ea9SRudolf Cornelissen         U032 BottomRight;
10807e14ea9SRudolf Cornelissen     } ClipD;
10907e14ea9SRudolf Cornelissen     U032 Color1D;
11007e14ea9SRudolf Cornelissen     U032 WidthHeightInD;
11107e14ea9SRudolf Cornelissen     U032 WidthHeightOutD;
11207e14ea9SRudolf Cornelissen     U032 PointD;
11307e14ea9SRudolf Cornelissen     U032 MonochromeData1D;
11407e14ea9SRudolf Cornelissen     U032 reserved07[(0x080)+120];
11507e14ea9SRudolf Cornelissen     struct
11607e14ea9SRudolf Cornelissen     {
11707e14ea9SRudolf Cornelissen         U032 TopLeft;
11807e14ea9SRudolf Cornelissen         U032 BottomRight;
11907e14ea9SRudolf Cornelissen     } ClipE;
12007e14ea9SRudolf Cornelissen     U032 Color0E;
12107e14ea9SRudolf Cornelissen     U032 Color1E;
12207e14ea9SRudolf Cornelissen     U032 WidthHeightInE;
12307e14ea9SRudolf Cornelissen     U032 WidthHeightOutE;
12407e14ea9SRudolf Cornelissen     U032 PointE;
12507e14ea9SRudolf Cornelissen     U032 MonochromeData01E;
12607e14ea9SRudolf Cornelissen */
127bd877ea2SRudolf Cornelissen } cmd_nv3_gdi_rectangle_text;
128bd877ea2SRudolf Cornelissen 
1290e0eb256SRudolf Cornelissen /* This command could (at least) potentially speed-up our fill_span command... :-) */
1300e0eb256SRudolf Cornelissen //fixme: test this 2D command!
1310e0eb256SRudolf Cornelissen typedef struct {
1320e0eb256SRudolf Cornelissen 	uint32 reserved00[0x0004];
1330e0eb256SRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
1340e0eb256SRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
135b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
136b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
137b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
138b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00af];
1390e0eb256SRudolf Cornelissen 	uint32 Color;				/* b0-31 is color */
140b1e0087bSRudolf Cornelissen 	uint32 reserved03[0x003e];
1410e0eb256SRudolf Cornelissen 	struct {
1420e0eb256SRudolf Cornelissen 		uint32 Point0;			/* b0-15 is X, b16-31 is Y: starting coordinate */
1430e0eb256SRudolf Cornelissen 		uint32 Point1;			/* b0-15 is X, b16-31 is Y: ending coordinate */
1440e0eb256SRudolf Cornelissen 	} Line[0x10];				/* command can handle upto 16 lines */
1450e0eb256SRudolf Cornelissen 	struct {
1460e0eb256SRudolf Cornelissen 		uint32 Point0X;			/* b0-31 is X: starting coordinate */
1470e0eb256SRudolf Cornelissen 		uint32 Point0Y;			/* b0-31 is Y: starting coordinate */
1480e0eb256SRudolf Cornelissen 		uint32 Point1X;			/* b0-31 is X: ending coordinate */
1490e0eb256SRudolf Cornelissen 		uint32 Point1Y;			/* b0-31 is Y: ending coordinate */
1500e0eb256SRudolf Cornelissen 	} Line32[0x08];				/* cmd can handle upto 8 lines with 32-bit coordinates */
1510e0eb256SRudolf Cornelissen 	struct {
1520e0eb256SRudolf Cornelissen 		uint32 Point;			/* b0-15 is X, b16-31 is Y */
1535f8c3a7fSRudolf Cornelissen 	} Polyline[0x20];			/* cmd can handle upto 32 points polylines */
1540e0eb256SRudolf Cornelissen 	struct {
1550e0eb256SRudolf Cornelissen 		uint32 PointX;			/* b0-31 is X */
1560e0eb256SRudolf Cornelissen 		uint32 PointY;			/* b0-31 is Y */
1575f8c3a7fSRudolf Cornelissen 	} Polyline32[0x10];			/* cmd can handle upto 16 point polylines with 32-bit coord's */
1580e0eb256SRudolf Cornelissen 	struct {
1590e0eb256SRudolf Cornelissen 		uint32 Color;			/* b0-31 is color */
1600e0eb256SRudolf Cornelissen 		uint32 Point;			/* b0-15 is X, b16-31 is Y */
1615f8c3a7fSRudolf Cornelissen 	} ColorPolyline[0x10];		/* cmd can handle upto 16 point polylines with individually
1625f8c3a7fSRudolf Cornelissen 								 * colored sections */
1630e0eb256SRudolf Cornelissen } cmd_nv1_render_solid_lin;
1640e0eb256SRudolf Cornelissen 
1650e0eb256SRudolf Cornelissen /* Someone defined this in XFree once (as 'RivaRectangle') but never used it:
1660e0eb256SRudolf Cornelissen  * a handle should also be defined in the engine's init code, which was never done AFAIK.
1670e0eb256SRudolf Cornelissen  * The command could be very interesting for us, as it could potentially speed-up our
1680e0eb256SRudolf Cornelissen  * rectangle_fills :-) */
1690e0eb256SRudolf Cornelissen //fixme: test this 2D command!
1700e0eb256SRudolf Cornelissen typedef struct {
1710e0eb256SRudolf Cornelissen 	uint32 reserved00[0x0004];
1720e0eb256SRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
1730e0eb256SRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
174b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
175b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
176b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
177b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00af];
1780e0eb256SRudolf Cornelissen 	uint32 Color;				/* b0-31 is color */
179b1e0087bSRudolf Cornelissen 	uint32 reserved03[0x003e];
1800e0eb256SRudolf Cornelissen 	struct {
1810e0eb256SRudolf Cornelissen 		uint32 TopLeft;			/* b0-15 is left, b16-31 is top */
1820e0eb256SRudolf Cornelissen 		uint32 HeightWidth;		/* b0-15 is width, b16-31 is height */
1830e0eb256SRudolf Cornelissen 	} Rectangle[0x10];			/* command can handle upto 16 rectangles */
1840e0eb256SRudolf Cornelissen } cmd_nv_render_solid_rectangle;/* nv1_render_solid_rectangle is identical */
1850e0eb256SRudolf Cornelissen 
1860e0eb256SRudolf Cornelissen //fixme: complete or remove (this 2D cmd is not used currently)
1870e0eb256SRudolf Cornelissen typedef struct {
1880e0eb256SRudolf Cornelissen } cmd_nv1_image_from_cpu;		/* 'pixmap': used in XFree 4.2.0, but not beyond.
1890e0eb256SRudolf Cornelissen 								 * (Used for the 2D 'ImageWriteScanline' and
1900e0eb256SRudolf Cornelissen 								 *  'ScanlineImageWriteRect' functions.)
1910e0eb256SRudolf Cornelissen 								 * Is this command actually usefull? */
1920e0eb256SRudolf Cornelissen 
1934bf2b3ccSRudolf Cornelissen typedef struct {
1944bf2b3ccSRudolf Cornelissen 	uint32 reserved00[0x0004];
1954bf2b3ccSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
1964bf2b3ccSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
1974bf2b3ccSRudolf Cornelissen 	uint32 reserved01[0x000b];
1984bf2b3ccSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
1994bf2b3ccSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
2004bf2b3ccSRudolf Cornelissen 	uint32 reserved02[0x00ae];
2014bf2b3ccSRudolf Cornelissen 	uint32 Format;				/* buffer colorspace */
2024bf2b3ccSRudolf Cornelissen 	uint32 Pitch;				/* b0-15 is source pitch, b16-31 is dest pitch */
2034bf2b3ccSRudolf Cornelissen 	uint32 OffsetSource;		/* b0-31 is source bufferadress offset */
2044bf2b3ccSRudolf Cornelissen 	uint32 OffsetDest;			/* b0-31 is dest bufferadress offset */
2054bf2b3ccSRudolf Cornelissen } cmd_nv4_surface;				/* nv10_context_surfaces_2d is identical as far as used */
2060e0eb256SRudolf Cornelissen 
2070e0eb256SRudolf Cornelissen /************************
2080e0eb256SRudolf Cornelissen  * 3D specific commands *
2090e0eb256SRudolf Cornelissen  ************************/
2100e0eb256SRudolf Cornelissen 
211bd877ea2SRudolf Cornelissen typedef struct {
2125c2199fcSRudolf Cornelissen 	uint32 reserved00[0x0004];
2135c2199fcSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
2145c2199fcSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
215b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
216b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
217b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
218b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00ae];
2195c2199fcSRudolf Cornelissen 	uint32 Colorkey;			/* texture colorkey */
2205c2199fcSRudolf Cornelissen 	uint32 Offset;				/* texture offset */
2215c2199fcSRudolf Cornelissen 	uint32 Format;				/* texture colorspace, size, and a lot more */
2225c2199fcSRudolf Cornelissen 	uint32 Filter;				/* texture filtering modes (used for scaling) */
2235c2199fcSRudolf Cornelissen 	uint32 Blend;				/* triangle blend: shade, perspective, specular.. */
2245c2199fcSRudolf Cornelissen 	uint32 Control;				/* triangle control: Z-enable, culling, dither.. */
2255c2199fcSRudolf Cornelissen 	uint32 FogColor;			/* fog colorvalue */
226b1e0087bSRudolf Cornelissen 	uint32 reserved03[0x0039];
2275c2199fcSRudolf Cornelissen 	struct {
2280e0eb256SRudolf Cornelissen 		float ScreenX;			/* X */
2290e0eb256SRudolf Cornelissen 		float ScreenY;			/* Y */
2300e0eb256SRudolf Cornelissen 		float ScreenZ;			/* depth */
2310e0eb256SRudolf Cornelissen 		float RWH;				/* eyeM */
2325c2199fcSRudolf Cornelissen 		uint32 Color;			/* b24-31 Alpha, b16-23 Red, b8-15 Green, b0-7 Blue */
2335c2199fcSRudolf Cornelissen 		uint32 Specular;		/* b24-31 Fog, b16-23 Red, b8-15 Green, b0-7 Blue */
2340e0eb256SRudolf Cornelissen 		float TU;				/* texture S */
2350e0eb256SRudolf Cornelissen 		float TV;				/* texture T */
2365c2199fcSRudolf Cornelissen 	} TLVertex[0x10];			/* command can handle upto 16 textured, lit(?) vertexes */
2375c2199fcSRudolf Cornelissen 	uint32 TLVDrawPrim[0x40];	/* b20-31 is I5, b16-19 is I4, b12-15 is I3,
2385c2199fcSRudolf Cornelissen 								 * b8-11 is I2, 4-7 is I1, b0-3 is I0:
2395c2199fcSRudolf Cornelissen 								 * Ix is a TLVertex[Ix].
240b88dbb0cSRudolf Cornelissen 								 * So: define your (single) texture, define your
241b88dbb0cSRudolf Cornelissen 								 * vertexes, and then program TLVDrawPrim with the
242b88dbb0cSRudolf Cornelissen 								 * order to draw them.
243b88dbb0cSRudolf Cornelissen 								 * You can draw primitives consisting of sets of upto
244b88dbb0cSRudolf Cornelissen 								 * 6 out of 16 defined vertexes this way; and you can
245b88dbb0cSRudolf Cornelissen 								 * draw 64 sets maximum. */
246b88dbb0cSRudolf Cornelissen } cmd_nv4_dx5_texture_triangle;	/* nv10_dx5_texture_triangle is identical */
247b88dbb0cSRudolf Cornelissen 
248b88dbb0cSRudolf Cornelissen typedef struct {
249b88dbb0cSRudolf Cornelissen 	uint32 reserved00[0x0004];
250b88dbb0cSRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
251b88dbb0cSRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
252b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
253b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
254b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
255b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00b0];	/* fixme? there's more here that's not used apparantly */
256b88dbb0cSRudolf Cornelissen 	uint32 Pitch;				/* b16-31 is Z-buffer, b0-15 is colorbuffer pitch */
257b88dbb0cSRudolf Cornelissen 	uint32 SetOffsetColor;		/* b0-31 is colorbuffer (renderbuffer) offset */
258b88dbb0cSRudolf Cornelissen 	uint32 SetOffsetZeta;		/* b0-31 is Z-buffer (zeta buffer) offset */
259b88dbb0cSRudolf Cornelissen } cmd_nv4_context_surfaces_argb_zs; /* nv10_context_surfaces_argb_zs is identical */
260bd877ea2SRudolf Cornelissen 
2610e0eb256SRudolf Cornelissen //fixme: let's loose this one if possible as we don't support NV3 anyway ...
2620e0eb256SRudolf Cornelissen //		 (checkout if we can re-setup 2D surfaces (after using 3D) without this command)
2630e0eb256SRudolf Cornelissen typedef struct {
2640e0eb256SRudolf Cornelissen 	uint32 reserved00[0x0004];
2650e0eb256SRudolf Cornelissen 	uint16 FifoFree;			/* little endian (FIFO internal register) */
2660e0eb256SRudolf Cornelissen 	uint16 Nop;					/* little endian (FIFO internal register) */
267b1e0087bSRudolf Cornelissen 	uint32 reserved01[0x000b];
268b1e0087bSRudolf Cornelissen 	uint32 DMAPut;				/* b2-28 is DMA Put offset (FIFO internal register) */
269b1e0087bSRudolf Cornelissen 	uint32 DMAGet;				/* b2-28 is DMA Get offset (FIFO internal register) */
270b1e0087bSRudolf Cornelissen 	uint32 reserved02[0x00b0];	/* fixme? there's more here that's not used apparantly */
2710e0eb256SRudolf Cornelissen 	uint32 Pitch;				/* b0-15 is buffer pitch */
2720e0eb256SRudolf Cornelissen 	uint32 SetOffset;			/* b0-22 is buffer offset (so just 1st 8Mb adressable!) */
2730e0eb256SRudolf Cornelissen } cmd_nv3_surface_x;			/* x = 0, 1, 2 or 3: selects buffer to be setup;
2740e0eb256SRudolf Cornelissen 								 * 0,1 is 2D surfaces, 2,3 is 3D surfaces */
2750e0eb256SRudolf Cornelissen 
2760e0eb256SRudolf Cornelissen //fixme: fill these out...
2770e0eb256SRudolf Cornelissen typedef struct {
2780e0eb256SRudolf Cornelissen } cmd_nv_render_d3d0_triangle_zeta;
2790e0eb256SRudolf Cornelissen 
2800e0eb256SRudolf Cornelissen typedef struct {
2810e0eb256SRudolf Cornelissen } cmd_nv4_dx6_multi_texture_triangle;/* nv10_dx6_multi_texture_triangle is identical? */
2820e0eb256SRudolf Cornelissen 
28349057561SRudolf Cornelissen 
28449057561SRudolf Cornelissen /************ DMA command defines ***********/
28549057561SRudolf Cornelissen 
286*a9d9522bSRudolf Cornelissen /* FIFO channels */
2876c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH0					0x0000
2886c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH1					0x2000
2896c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH2					0x4000
2906c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH3					0x6000
2916c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH4					0x8000
2926c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH5					0xa000
2936c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH6					0xc000
2946c001eb7SRudolf Cornelissen #define NV_GENERAL_FIFO_CH7					0xe000
295*a9d9522bSRudolf Cornelissen 
296*a9d9522bSRudolf Cornelissen /* sub-command offsets within FIFO channels */
29749057561SRudolf Cornelissen #define NV_GENERAL_DMAPUT					0x0040
29849057561SRudolf Cornelissen #define NV_GENERAL_DMAGET					0x0044
29949057561SRudolf Cornelissen #define NV_ROP5_SOLID_SETROP5				0x0300
30098a4e5c7SRudolf Cornelissen #define NV_IMAGE_BLACK_RECTANGLE_TOPLEFT	0x0300
3018118b759SRudolf Cornelissen #define NV_IMAGE_PATTERN_SETCOLORFORMAT		0x0300
30249057561SRudolf Cornelissen #define NV_IMAGE_PATTERN_SETSHAPE			0x0308
30398a4e5c7SRudolf Cornelissen #define NV_IMAGE_PATTERN_SETCOLOR0			0x0310
30498a4e5c7SRudolf Cornelissen #define NV_IMAGE_BLIT_SOURCEORG				0x0300
3054bf2b3ccSRudolf Cornelissen #define NV4_SURFACE_FORMAT					0x0300
30649057561SRudolf Cornelissen 
307bd877ea2SRudolf Cornelissen #endif
308