19682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/***************************************************************************\ 29682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 39682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *| 49682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 59682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* NOTICE TO USER: The source code is copyrighted under U.S. and *| 69682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* international laws. Users and possessors of this source code are *| 79682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* hereby granted a nonexclusive, royalty-free copyright license to *| 89682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* use this code in individual and commercial software. *| 99682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* Any use of this source code must include, in the user documenta- *| 119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* tion and internal comments to the code, notices to the end user *| 129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* as follows: *| 139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* Copyright 1993-1999 NVIDIA, Corporation. All rights reserved. *| 159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* NVIDIA, CORPORATION MAKES NO REPRESENTATION ABOUT THE SUITABILITY *| 179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* OF THIS SOURCE CODE FOR ANY PURPOSE. IT IS PROVIDED "AS IS" *| 189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* WITHOUT EXPRESS OR IMPLIED WARRANTY OF ANY KIND. NVIDIA, CORPOR- *| 199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* ATION DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOURCE CODE, *| 209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGE- *| 219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* MENT, AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL *| 229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* NVIDIA, CORPORATION BE LIABLE FOR ANY SPECIAL, INDIRECT, INCI- *| 239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* DENTAL, OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RE- *| 249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* SULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION *| 259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *| 269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOURCE CODE. *| 279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* U.S. Government End Users. This source code is a "commercial *| 299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* item," as that term is defined at 48 C.F.R. 2.101 (OCT 1995), *| 309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* consisting of "commercial computer software" and "commercial *| 319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* computer software documentation," as such terms are used in *| 329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* 48 C.F.R. 12.212 (SEPT 1995) and is provided to the U.S. Govern- *| 339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* ment only as a commercial end item. Consistent with 48 C.F.R. *| 349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (JUNE 1995), *| 359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* all U.S. Government End Users acquire the source code with only *| 369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* those rights set forth herein. *| 379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall|* *| 389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall\***************************************************************************/ 399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifndef __RIVA_HW_H__ 419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define __RIVA_HW_H__ 429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define RIVA_SW_VERSION 0x00010003 439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Typedefs to force certain sized values. 469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef Uint8 U008; 489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef Uint16 U016; 499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef Uint32 U032; 509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * HW access macros. 539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_WR08(p,i,d) (((U008 *)(p))[i]=(d)) 559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_RD08(p,i) (((U008 *)(p))[i]) 569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_WR16(p,i,d) (((U016 *)(p))[(i)/2]=(d)) 579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_RD16(p,i) (((U016 *)(p))[(i)/2]) 589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_WR32(p,i,d) (((U032 *)(p))[(i)/4]=(d)) 599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_RD32(p,i) (((U032 *)(p))[(i)/4]) 609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define VGA_WR08(p,i,d) NV_WR08(p,i,d) 619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define VGA_RD08(p,i) NV_RD08(p,i) 629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Define supported architectures. 659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_ARCH_03 0x03 679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_ARCH_04 0x04 689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define NV_ARCH_10 0x10 699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/***************************************************************************\ 709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall* * 719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall* FIFO registers. * 729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall* * 739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall\***************************************************************************/ 749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Raster OPeration. Windows style ROP3. 779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BB]; 849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Rop3; 859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaRop; 869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 8X8 Monochrome pattern. 889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BD]; 959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Shape; 969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved03[0x001]; 979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color0; 989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color1; 999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Monochrome[2]; 1009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaPattern; 1019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 1029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Scissor clip rectangle. 1039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 1059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 1069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 1079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 1089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 1099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BB]; 1109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeight; 1129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaClip; 1139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 1149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 2D filled rectangle. 1159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 1179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 1189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 1199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 1209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop[1]; 1219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BC]; 1229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color; 1239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved03[0x03E]; 1249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeight; 1269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaRectangle; 1279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 1289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 2D screen-screen BLT. 1299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 1319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 1329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 1339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 1349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 1359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BB]; 1369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeftSrc; 1379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeftDst; 1389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeight; 1399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaScreenBlt; 1409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 1419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 2D pixel BLT. 1429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 1449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 1459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 1469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 1479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop[1]; 1489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BC]; 1499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeight; 1519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeightIn; 1529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved02[0x03C]; 1539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Pixels; 1549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaPixmap; 1559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 1569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Filled rectangle combined with monochrome expand. Useful for glyphs. 1579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 1589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 1599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 1609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 1619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 1629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 1639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BB]; 1649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved03[(0x040)-1]; 1659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color1A; 1669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 1679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 1689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeight; 1709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } UnclippedRectangle[64]; 1719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved04[(0x080)-3]; 1729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 1739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 1749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 BottomRight; 1769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } ClipB; 1779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color1B; 1789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 1799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 1809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 BottomRight; 1829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } ClippedRectangle[64]; 1839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved05[(0x080)-5]; 1849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 1859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 1869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 BottomRight; 1889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } ClipC; 1899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color1C; 1909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeightC; 1919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 PointC; 1929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 MonochromeData1C; 1939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved06[(0x080)+121]; 1949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 1959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 1969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 1979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 BottomRight; 1989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } ClipD; 1999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color1D; 2009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeightInD; 2019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeightOutD; 2029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 PointD; 2039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 MonochromeData1D; 2049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved07[(0x080)+120]; 2059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 2069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 2079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TopLeft; 2089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 BottomRight; 2099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } ClipE; 2109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color0E; 2119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color1E; 2129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeightInE; 2139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 WidthHeightOutE; 2149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 PointE; 2159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 MonochromeData01E; 2169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaBitmap; 2179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 2189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 3D textured, Z buffered triangle. 2199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 2209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 2219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 2229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 2239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 2249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 2259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BC]; 2269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TextureOffset; 2279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TextureFormat; 2289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TextureFilter; 2299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 FogColor; 2309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* This is a problem on LynxOS */ 2319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef Control 2329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#undef Control 2339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 2349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Control; 2359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 AlphaTest; 2369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved02[0x339]; 2379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 FogAndIndex; 2389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color; 2399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float ScreenX; 2409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float ScreenY; 2419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float ScreenZ; 2429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float EyeM; 2439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float TextureS; 2449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float TextureT; 2459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaTexturedTriangle03; 2469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 2479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 2489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 2499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 2509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 2519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BB]; 2529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 ColorKey; 2539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TextureOffset; 2549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TextureFormat; 2559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 TextureFilter; 2569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Blend; 2579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* This is a problem on LynxOS */ 2589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#ifdef Control 2599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#undef Control 2609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif 2619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Control; 2629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 FogColor; 2639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved02[0x39]; 2649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct 2659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall { 2669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float ScreenX; 2679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float ScreenY; 2689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float ScreenZ; 2699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float EyeM; 2709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color; 2719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Specular; 2729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float TextureS; 2739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall float TextureT; 2749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } Vertex[16]; 2759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 DrawTriangle3D; 2769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaTexturedTriangle05; 2779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 2789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 2D line. 2799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 2809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 2819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 2829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 2839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 2849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop[1]; 2859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BC]; 2869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Color; /* source color 0304-0307*/ 2879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Reserved02[0x03e]; 2889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct { /* start aliased methods in array 0400- */ 2899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point0; /* y_x S16_S16 in pixels 0- 3*/ 2909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point1; /* y_x S16_S16 in pixels 4- 7*/ 2919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } Lin[16]; /* end of aliased methods in array -047f*/ 2929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct { /* start aliased methods in array 0480- */ 2939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point0X; /* in pixels, 0 at left 0- 3*/ 2949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point0Y; /* in pixels, 0 at top 4- 7*/ 2959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point1X; /* in pixels, 0 at left 8- b*/ 2969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point1Y; /* in pixels, 0 at top c- f*/ 2979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } Lin32[8]; /* end of aliased methods in array -04ff*/ 2989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 PolyLin[32]; /* y_x S16_S16 in pixels 0500-057f*/ 2999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct { /* start aliased methods in array 0580- */ 3009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 x; /* in pixels, 0 at left 0- 3*/ 3019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 y; /* in pixels, 0 at top 4- 7*/ 3029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } PolyLin32[16]; /* end of aliased methods in array -05ff*/ 3039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct { /* start aliased methods in array 0600- */ 3049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 color; /* source color 0- 3*/ 3059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 point; /* y_x S16_S16 in pixels 4- 7*/ 3069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall } ColorPolyLin[16]; /* end of aliased methods in array -067f*/ 3079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaLine; 3089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 3099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * 2D/3D surfaces 3109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 3129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 3139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 3149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 3159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 3169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BE]; 3179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Offset; 3189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaSurface; 3199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef volatile struct 3209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 3219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved00[4]; 3229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 FifoFree; 3239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U016 Nop; 3249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 reserved01[0x0BD]; 3259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Pitch; 3269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 RenderBufferOffset; 3279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 ZBufferOffset; 3289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RivaSurface3D; 3299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/***************************************************************************\ 3319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall* * 3329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall* Virtualized RIVA H/W interface. * 3339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall* * 3349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall\***************************************************************************/ 3359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 3369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct _riva_hw_inst; 3379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hallstruct _riva_hw_state; 3389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 3399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Virtialized chip interface. Makes RIVA 128 and TNT look alike. 3409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct _riva_hw_inst 3429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 3439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* 3449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Chip specific settings. 3459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Architecture; 3479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 Version; 3489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 CrystalFreqKHz; 3499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 RamAmountKBytes; 3509682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 MaxVClockFreqKHz; 3519682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 RamBandwidthKBytesPerSec; 3529682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 EnableIRQ; 3539682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 IO; 3549682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 VBlankBit; 3559682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 FifoFreeCount; 3569682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 FifoEmptyCount; 3579682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* 3589682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Non-FIFO registers. 3599682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3609682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PCRTC; 3619682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PRAMDAC; 3629682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PFB; 3639682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PFIFO; 3649682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PGRAPH; 3659682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PEXTDEV; 3669682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PTIMER; 3679682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PMC; 3689682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *PRAMIN; 3699682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *FIFO; 3709682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *CURSOR; 3719682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *CURSORPOS; 3729682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *VBLANKENABLE; 3739682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U032 *VBLANK; 3749682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U008 *PCIO; 3759682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U008 *PVIO; 3769682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall volatile U008 *PDIO; 3779682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* 3789682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Common chip functions. 3799682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3809682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*Busy)(struct _riva_hw_inst *); 3819682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*CalcStateExt)(struct _riva_hw_inst *,struct _riva_hw_state *,int,int,int,int,int,int,int,int,int,int,int,int,int); 3829682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*LoadStateExt)(struct _riva_hw_inst *,struct _riva_hw_state *); 3839682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*UnloadStateExt)(struct _riva_hw_inst *,struct _riva_hw_state *); 3849682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*SetStartAddress)(struct _riva_hw_inst *,U032); 3859682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*SetSurfaces2D)(struct _riva_hw_inst *,U032,U032); 3869682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*SetSurfaces3D)(struct _riva_hw_inst *,U032,U032); 3879682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall int (*ShowHideCursor)(struct _riva_hw_inst *,int); 3889682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall void (*LockUnlock)(struct _riva_hw_inst *, int); 3899682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* 3909682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Current extended mode settings. 3919682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3929682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall struct _riva_hw_state *CurrentState; 3939682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall /* 3949682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * FIFO registers. 3959682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 3969682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaRop *Rop; 3979682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaPattern *Patt; 3989682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaClip *Clip; 3999682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaPixmap *Pixmap; 4009682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaScreenBlt *Blt; 4019682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaBitmap *Bitmap; 4029682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaLine *Line; 4039682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaTexturedTriangle03 *Tri03; 4049682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall RivaTexturedTriangle05 *Tri05; 4059682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RIVA_HW_INST; 4069682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 4079682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * Extended mode state information. 4089682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 4099682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Halltypedef struct _riva_hw_state 4109682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ 4119682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 bpp; 4129682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 width; 4139682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 height; 4149682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 repaint0; 4159682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 repaint1; 4169682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 screen; 4179682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 pixel; 4189682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 horiz; 4199682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 arbitration0; 4209682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 arbitration1; 4219682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 vpll; 4229682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 pllsel; 4239682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 general; 4249682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 config; 4259682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 cursor0; 4269682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 cursor1; 4279682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 cursor2; 4289682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 offset0; 4299682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 offset1; 4309682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 offset2; 4319682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 offset3; 4329682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 pitch0; 4339682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 pitch1; 4349682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 pitch2; 4359682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall U032 pitch3; 4369682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} RIVA_HW_STATE; 4379682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4389682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall/* 4399682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall * FIFO Free Count. Should attempt to yield processor if RIVA is busy. 4409682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall */ 4419682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 4429682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#define RIVA_FIFO_FREE(hwptr,cnt) \ 4439682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall{ \ 4449682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall while (FifoFreeCount < (cnt)) \ 4459682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall FifoFreeCount = hwptr->FifoFree >> 2; \ 4469682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall FifoFreeCount -= (cnt); \ 4479682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall} 4489682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall#endif /* __RIVA_HW_H__ */ 4499682c8870b8ff5e4ac2e4c70b759f791c6f38c1fJesse Hall 450