diff --git a/glide3x/h5/glide3/src/cpudtect.lst b/glide3x/h5/glide3/src/cpudtect.lst index 9761fd6..30382d6 100644 --- a/glide3x/h5/glide3/src/cpudtect.lst +++ b/glide3x/h5/glide3/src/cpudtect.lst @@ -1,4 +1,4 @@ -Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:56 +Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 cpudtect.asm Page 1 - 1 @@ -23,6 +23,10 @@ cpudtect.asm Page 1 - 1 ;; ;; $Header$ ;; $Log$ + ;; Revision 1.3 2000/11/15 23:32:52 joseph + ;; Syncing up with 3dfx internal source repository. These changes contain a + ;; number of bug fixes. + ;; ;; Revision 1.1 2000/06/15 00:27:42 joseph ;; Initial checkin into SourceForge. ;; @@ -321,7 +325,7 @@ cpudtect.asm Page 1 - 1 000001D0 _TEXT ENDS END - Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:56 + Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 cpudtect.asm Symbols 2 - 1 @@ -379,7 +383,9 @@ CPUTypeP5 . . . . . . . . . . . Number 00000005h CPUTypeP6 . . . . . . . . . . . Number 00000006h CPUTypePrePent . . . . . . . . . Number 00000004h CPUTypeUnknown . . . . . . . . . Number FFFFFFFFh +GDBG_INFO_ON . . . . . . . . . . Text GLIDE_ALT_TAB . . . . . . . . . Text +GLIDE_DEBUG . . . . . . . . . . Text GLIDE_INIT_HWC . . . . . . . . . Text GLIDE_PACKED_RGB . . . . . . . . Text 0 GLIDE_TRI_CULLING . . . . . . . Text 1 diff --git a/glide3x/h5/glide3/src/cpudtect.s b/glide3x/h5/glide3/src/cpudtect.s index e1cfc7e..d27a06e 100644 --- a/glide3x/h5/glide3/src/cpudtect.s +++ b/glide3x/h5/glide3/src/cpudtect.s @@ -20,6 +20,13 @@ /* $Header$ * /* $Log$ +/* Revision 1.3 2000/11/15 23:32:52 joseph +/* Syncing up with 3dfx internal source repository. These changes contain a +/* number of bug fixes. +/* +/* Revision 1.2.2.1 2000/08/30 08:37:51 alanh +/* Voodoo5 changes for 64bit architectures +/* /* Revision 1.2 2000/06/27 19:59:34 joseph /* Previous checkin of asm files were already preprocessed. /* Fixed build rules for 3DNow optimized assembly. diff --git a/glide3x/h5/glide3/src/diget.c b/glide3x/h5/glide3/src/diget.c index fa3eba9..609ba2b 100644 --- a/glide3x/h5/glide3/src/diget.c +++ b/glide3x/h5/glide3/src/diget.c @@ -1,28 +1,73 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX -** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE -** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). -** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A -** FULL TEXT OF THE NON-WARRANTY PROVISIONS. -** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF -** THE UNITED STATES. -** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** Copyright (c) 1997, 3Dfx Interactive, Inc. +** All Rights Reserved. +** +** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc.; +** the contents of this file may not be disclosed to third parties, copied or +** duplicated in any form, in whole or in part, without the prior written +** permission of 3Dfx Interactive, Inc. +** +** RESTRICTED RIGHTS LEGEND: +** Use, duplication or disclosure by the Government is subject to restrictions +** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data +** and Computer Software clause at DFARS 252.227-7013, and/or in similar or +** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished - +** rights reserved under the Copyright Laws of the United States. ** ** $Header$ -** $Log$ -** Revision 1.2 2000/06/26 21:26:24 joseph -** Merged with 3dfx internal source repository so that the source base stays -** up to date. -** +** $Log: +** 22 3dfx 1.17.1.0.1.210/11/00 Brent Forced check in to enforce +** branching. +** 21 3dfx 1.17.1.0.1.109/15/00 troy thornton grqueryresolutions now +** checks the refreshrate of the monitor before returning a valid screen mode +** +** 20 3dfx 1.17.1.0.1.008/29/00 Jonny Cochrane Some 8x FSAA code +** 19 3dfx 1.17.1.0 06/07/00 Daoxiang Gong Fixes PRS 14363. Make sure +** grGet returns proper color bit depth info. +** 18 3dfx 1.17 04/17/00 Adam Briggs added +** grGetRegistryOrEnvironmentStringExt call so that OpenGL has an easy way to +** read environment settings from the registry. To save you the trouble of +** asking, the answer is no, I could not think of a longer name for the +** function. I did try, though. +** 17 3dfx 1.16 04/10/00 Larry warner Report max texture size +** 2048 for Napalm and 256 otherwise. +** 16 3dfx 1.15 04/06/00 Larry warner So much for the palindrome. +** 15 3dfx 1.14 03/31/00 Kenneth Dyke Get number of chips from +** bInfo so we report back the right kind of card. (Cosmetic). +** 14 3dfx 1.13 02/22/00 Kenneth Dyke Base min/max z and w buffer +** values on actual pixel depth, and not on the hardware we're on. +** 13 3dfx 1.12 02/10/00 Adam Briggs grGet(GR_NUM_FB) now +** returns the number of chips on a board. +** 12 3dfx 1.11 01/31/00 Adam Briggs changed the IS_NAPALM macro +** to cooperate with the display driver version of the same +** 11 3dfx 1.10 01/31/00 Adam Briggs Changed all device ID magic +** numbers to use those defined in fxhal.h & added IS_NAPALM macro to test +** against device ID range +** 10 3dfx 1.9 01/30/00 Adam Briggs get napalm status correctly +** 9 3dfx 1.8 01/18/00 Kenneth Dyke Fix query value for maximum +** texture size. +** 8 3dfx 1.7 01/04/00 Adam Briggs changed grGetGammaTable to +** be an extension called grGetGammaTableExt +** 7 3dfx 1.6 12/13/99 Adam Briggs Made +** grGetString(GR_HARDWARE) return Voodoo4 or VoodooV instead of Napalm +** 6 3dfx 1.5 12/10/99 Leo Galway Removed previous hi-res +** mode information for Glide3. These modes were only necessary for +** Cornerstone (or future hi-res) support in RT4.2 source branch and +** proceeded to break the V3 and V2 builds (from 3dfx view), hence they have +** been removed. +** 5 3dfx 1.4 12/08/99 Leo Galway Added mode information for +** 1600x1280, 1792x1440, 1920x1080, 1920x1200, 2046x1536 (as a result of +** glide being tested with Cornerstone modes). Although not all of these +** modes are currently capable under Glide, their inclusion prevents Glide +** apps from displaying in incorrect modes when these hi-res modes are +** selected. Search for SUSTAINED_ENGINEERING_CHANGE_BEGIN. +** 4 3dfx 1.3 10/26/99 Anthony tai workaround for calling +** grGetString before the gc exist +** 3 3dfx 1.2 09/28/99 Anthony tai workaround for dct bug +** 2 3dfx 1.1 09/22/99 Adam Briggs Added +** grConstantColorValueExt +** 1 3dfx 1.0 09/11/99 StarTeam VTS Administrator +** $ ** ** 93 9/09/99 4:19p Adamb ** Added TEXTUREBUFFER to GR_EXTENSION string @@ -389,17 +434,47 @@ GR_DIENTRY(grGet, FxU32, (FxU32 pname, FxU32 plength, FxI32 *params)) switch(pname) { case GR_BITS_DEPTH: if (plength == 4) { + GR_DCL_GC; retVal = plength; - *params = SST1_BITS_DEPTH; + *params = gc->bInfo->h3pixelSize << 3 ; } break; case GR_BITS_RGBA: if (plength == 16) { - retVal = plength; - *params = 5; - *(params+1) = 6; - *(params+2) = 5; - *(params+3) = 0; + GR_DCL_GC; + retVal = plength; + switch(gc->grPixelFormat) + { + case GR_PIXFMT_RGB_565: + case GR_PIXFMT_AA_2_RGB_565: + case GR_PIXFMT_AA_4_RGB_565: + case GR_PIXFMT_AA_8_RGB_565: /* 8xaa */ + *params = 5; + *(params+1) = 6; + *(params+2) = 5; + *(params+3) = 0; + break; + case GR_PIXFMT_ARGB_1555: + case GR_PIXFMT_AA_2_ARGB_1555: + case GR_PIXFMT_AA_4_ARGB_1555: + case GR_PIXFMT_AA_8_ARGB_1555: /* 8xaa */ + *params = 5; + *(params+1) = 5; + *(params+2) = 5; + *(params+3) = 1; + break; + case GR_PIXFMT_ARGB_8888: + case GR_PIXFMT_AA_2_ARGB_8888: + case GR_PIXFMT_AA_4_ARGB_8888: + case GR_PIXFMT_AA_8_ARGB_8888: /* 8xaa */ + *params = 8; + *(params+1) = 8; + *(params+2) = 8; + *(params+3) = 8; + break; + default: + break; + } } break; case GR_FIFO_FULLNESS: @@ -1142,7 +1217,7 @@ GR_DIENTRY(grQueryResolutions, FxI32, (const GlideResolution *resTemplate, Glide for (j = min_ref; j <= max_ref; j++) { FxBool resSuported; GDBG_INFO(80, FN_NAME ": _grResolutionRefresh passed\n"); - resSuported = hwcResolutionSupported(gc->bInfo, i); + resSuported = hwcResolutionSupported(gc->bInfo, i, j); GDBG_INFO(80, FN_NAME ": hwcResolutionSupported returned %s\n", resSuported ? "FXTRUE" : "FXFALSE"); if (resSuported) { diff --git a/glide3x/h5/glide3/src/diglide.c b/glide3x/h5/glide3/src/diglide.c index 4994089..351fe42 100644 --- a/glide3x/h5/glide3/src/diglide.c +++ b/glide3x/h5/glide3/src/diglide.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/disst.c b/glide3x/h5/glide3/src/disst.c index b3e1076..15fdf8d 100644 --- a/glide3x/h5/glide3/src/disst.c +++ b/glide3x/h5/glide3/src/disst.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/distate.c b/glide3x/h5/glide3/src/distate.c index fc7f9b6..699d3d9 100644 --- a/glide3x/h5/glide3/src/distate.c +++ b/glide3x/h5/glide3/src/distate.c @@ -20,6 +20,14 @@ ** ** $Header$ ** $Log: + ** 33 3dfx 1.25.1.2.1.311/14/00 Jonny Cochrane Implement multisample LOD + ** Dithering for 2x and 4x FSAA modes + ** 32 3dfx 1.25.1.2.1.210/11/00 Brent Forced check in to enforce + ** branching. + ** 31 3dfx 1.25.1.2.1.109/26/00 Andy Hanson Add environment variable of + ** glide group so they can do wacky things safely. + ** 30 3dfx 1.25.1.2.1.009/19/00 Matt McClure Added a call to win_mode.c + ** to enable OpenGL. ** 29 3dfx 1.25.1.2 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 28 3dfx 1.25.1.1 06/20/00 Joseph Kain Changes to support the @@ -1481,6 +1489,8 @@ _grValidateTMUState() palletizedTexture = gc->state.palletizedTexture[0] | gc->state.palletizedTexture[1]; + + for(tmu = 0; tmu < gc->num_tmu; tmu++) { tmuSource = tmu; @@ -1618,7 +1628,8 @@ _grValidateTMUState() /* Mark TMU state as valid. */ gc->state.tmuInvalid[tmu] = 0; - } else { + + } else { #if DEBUG_2PPC GDBG_PRINTF("TMU%d not required by downstream units or passthrough enabled\n",tmu); #endif @@ -1785,6 +1796,7 @@ _grValidateTMUState() } else { #endif + /* Set LOD on TMU to 1x1. */ SstRegs* tmuHw = SST_TMU(hw, tmu); @@ -1804,7 +1816,11 @@ _grValidateTMUState() } #endif } - } + + if(MultitextureAndTrilinear()) g3LodBiasPerChip(); + + +} #undef FN_NAME } @@ -2573,8 +2589,20 @@ GR_DIENTRY(grEnable, void , (GrEnableMode_t mode) ) } break; case GR_OPENGL_MODE_EXT: - /* Set up some stuff that's affected by OpenGL's behaviour. */ - _GlideRoot.environment.sliBandHeightForce = FXTRUE; + { +#ifdef WIN32 + /* EnableOpenGL - Win_Mode.c + ** Allow minihwc to know about OpenGL + */ + void EnableOpenGL ( void ); + + EnableOpenGL(); + /* setup env to determine whether we are an OGL app */ + _GlideRoot.environment.is_opengl=FXTRUE; +#endif + /* Set up some stuff that's affected by OpenGL's behaviour. */ + _GlideRoot.environment.sliBandHeightForce = FXTRUE; + } break; #endif } @@ -2641,6 +2669,9 @@ GR_DIENTRY(grDisable, void , (GrEnableMode_t mode) ) gc->state.grEnableArgs.stencil_mode = GR_MODE_DISABLE; INVALIDATE(stencilMode); break; + case GR_OPENGL_MODE_EXT: + _GlideRoot.environment.is_opengl=FXFALSE; + break; #ifdef FX_GLIDE_NAPALM case GR_AA_MULTI_SAMPLE: { diff --git a/glide3x/h5/glide3/src/distrip.c b/glide3x/h5/glide3/src/distrip.c index 53f9b0a..73d02ac 100644 --- a/glide3x/h5/glide3/src/distrip.c +++ b/glide3x/h5/glide3/src/distrip.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/ditex.c b/glide3x/h5/glide3/src/ditex.c index cde6b54..f377562 100644 --- a/glide3x/h5/glide3/src/ditex.c +++ b/glide3x/h5/glide3/src/ditex.c @@ -1,24 +1,26 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** $Header$ ** $Log: +** 10 3dfx 1.4.1.3.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 9 3dfx 1.4.1.3 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 8 3dfx 1.4.1.2 06/20/00 Joseph Kain Changes to support the diff --git a/glide3x/h5/glide3/src/fifo.c b/glide3x/h5/glide3/src/fifo.c index 0b53ded..b8885dd 100644 --- a/glide3x/h5/glide3/src/fifo.c +++ b/glide3x/h5/glide3/src/fifo.c @@ -1,24 +1,25 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX -** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE -** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). -** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A -** FULL TEXT OF THE NON-WARRANTY PROVISIONS. -** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF -** THE UNITED STATES. -** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED + ** Copyright (c) 1995, 3Dfx Interactive, Inc + ** All Rights Reserved + * + ** This is UNPUBLISHED PROPRIETARY SOURCE CODE of 3Dfx Interactive, Inc. + ** the contents of this file may not be disclosed to third parties, copied o + ** duplicated in any form, in whole or in part, without the prior writte + ** permission of 3Dfx Interactive, Inc + * + ** RESTRICTED RIGHTS LEGEND + ** Use, duplication or disclosure by the Government is subject to restriction + ** as set forth in subdivision (c)(1)(ii) of the Rights in Technical Dat + ** and Computer Software clause at DFARS 252.227-7013, and/or in similar o + ** successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished + ** rights reserved under the Copyright Laws of the United States * ** $Header$ ** $Log: + ** 14 3dfx 1.8.1.2.1.1 10/11/00 Brent Forced check in to enforce + ** branching. + ** 13 3dfx 1.8.1.2.1.0 07/21/00 Adam Briggs don't try to bump > 0xffff + ** at a time ** 12 3dfx 1.8.1.2 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 11 3dfx 1.8.1.1 06/20/00 Joseph Kain Changes to support the @@ -683,7 +684,17 @@ _grBumpNGrind() #else /* !HAL_CSIM */ FIFO_CACHE_FLUSH(gc->cmdTransportInfo.fifoPtr); P6FENCE; - GR_CAGP_SET(bump, gc->cmdTransportInfo.fifoPtr - gc->cmdTransportInfo.lastBump); + + /* AH FUK: the bump register can only handle a 16bit value */ + while ((gc->cmdTransportInfo.fifoPtr - gc->cmdTransportInfo.lastBump) > 0xFFFFL) + { + GR_CAGP_SET(bump, 0xFFFFL); + gc->cmdTransportInfo.lastBump += 0xFFFFL ; + } + + if (gc->cmdTransportInfo.fifoPtr - gc->cmdTransportInfo.lastBump) + GR_CAGP_SET(bump, gc->cmdTransportInfo.fifoPtr - gc->cmdTransportInfo.lastBump); + gc->cmdTransportInfo.lastBump = gc->cmdTransportInfo.fifoPtr; gc->cmdTransportInfo.bumpPos = gc->cmdTransportInfo.fifoPtr + (gc->cmdTransportInfo.bumpSize); if (gc->cmdTransportInfo.bumpPos > gc->cmdTransportInfo.fifoEnd) diff --git a/glide3x/h5/glide3/src/fxbldno.c b/glide3x/h5/glide3/src/fxbldno.c index d03ad55..43503d6 100644 --- a/glide3x/h5/glide3/src/fxbldno.c +++ b/glide3x/h5/glide3/src/fxbldno.c @@ -19,6 +19,8 @@ * * $Header$ * $Log: + * 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce + * branching. * 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the * Napalm Glide open source release. Changes include cleaned up offensive * comments and new legal headers. diff --git a/glide3x/h5/glide3/src/fxcmd.h b/glide3x/h5/glide3/src/fxcmd.h index dad59b3..8f2d326 100644 --- a/glide3x/h5/glide3/src/fxcmd.h +++ b/glide3x/h5/glide3/src/fxcmd.h @@ -21,6 +21,8 @@ ** $Revision$ ** $Date$ ** $Log: +** 7 3dfx 1.4.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 6 3dfx 1.4.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/fxgasm.c b/glide3x/h5/glide3/src/fxgasm.c index 8a70a03..bba0db5 100644 --- a/glide3x/h5/glide3/src/fxgasm.c +++ b/glide3x/h5/glide3/src/fxgasm.c @@ -1,21 +1,21 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** $Revision$ ** $Date$ diff --git a/glide3x/h5/glide3/src/fxglide.h b/glide3x/h5/glide3/src/fxglide.h index f8026be..8bcf2bc 100644 --- a/glide3x/h5/glide3/src/fxglide.h +++ b/glide3x/h5/glide3/src/fxglide.h @@ -1,21 +1,21 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** $Header: fxglide.h, 44, 6/15/2000 9:18:11 AM, Bill White ** $Log: @@ -2003,6 +2003,7 @@ struct _GlideRoot_s { FxBool texLodDither; /* Always do lod-dithering */ FxI32 tmuMemory; /* tmuMemory */ float gammaR, gammaG, gammaB; /* Gamma settings */ + FxBool useAppGamma; /* enable(1)(default)/disable(0) application gamma control */ FxBool guardbandclipping; /* enable gbc */ FxI32 do2ppc; /* enable 2ppc */ FxU32 band2ppc; /* 2ppc band */ @@ -2015,6 +2016,7 @@ struct _GlideRoot_s { FxI32 analogSli ; /* force digital or analog sli */ FxI32 lodBias; /* User-adjustable lod bias value (signed) */ FxU32 sliBandHeightForce; /* Force user-specified band height */ + FxU32 is_opengl; /* specify whether we are opengl app or not */ FxU32 noHW; /* Disable HW writes */ /* Force alternate buffer strategy */ @@ -2030,8 +2032,8 @@ struct _GlideRoot_s { FxU32 columnWidth; /* 'n' in columns of n */ /* Anti-aliasing default perturbation values */ - FxU32 aaXOffset[4][4]; - FxU32 aaYOffset[4][4]; + FxU32 aaXOffset[10][8]; /* increase arrays for 8xaa */ + FxU32 aaYOffset[10][8]; /* Limit number of writes between fences */ FxI32 fenceLimit; } environment; @@ -3147,5 +3149,9 @@ extern const FxU32 _gr_aspect_xlate_table[]; GrLOD_t _g3LodXlat(const GrLOD_t someLOD, const FxBool tBig); +extern void g3LodBiasPerChip(void); + +extern FxBool MultitextureAndTrilinear(void); + #endif /* __FXGLIDE_H__ */ diff --git a/glide3x/h5/glide3/src/fxsplash.h b/glide3x/h5/glide3/src/fxsplash.h index 781f3d5..806d5c7 100644 --- a/glide3x/h5/glide3/src/fxsplash.h +++ b/glide3x/h5/glide3/src/fxsplash.h @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/g3df.c b/glide3x/h5/glide3/src/g3df.c index cf56204..0c1b8dc 100644 --- a/glide3x/h5/glide3/src/g3df.c +++ b/glide3x/h5/glide3/src/g3df.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/g3ext.h b/glide3x/h5/glide3/src/g3ext.h index 8a0ad2b..3deea68 100644 --- a/glide3x/h5/glide3/src/g3ext.h +++ b/glide3x/h5/glide3/src/g3ext.h @@ -81,6 +81,10 @@ typedef FxU32 GrPixelFormat_t; #define GR_PIXFMT_AA_4_RGB_565 0x0009 #define GR_PIXFMT_AA_4_ARGB_1555 0x000a #define GR_PIXFMT_AA_4_ARGB_8888 0x000b +#define GR_PIXFMT_AA_8_RGB_565 0x000c /* 8xaa */ +#define GR_PIXFMT_AA_8_ARGB_1555 0x000d +#define GR_PIXFMT_AA_8_ARGB_8888 0x000e + #define GR_LFBWRITEMODE_Z32 0x0008 diff --git a/glide3x/h5/glide3/src/gaa.c b/glide3x/h5/glide3/src/gaa.c index c8c2c83..6a94918 100644 --- a/glide3x/h5/glide3/src/gaa.c +++ b/glide3x/h5/glide3/src/gaa.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 5 3dfx 1.2.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 4 3dfx 1.2.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gbanner.c b/glide3x/h5/glide3/src/gbanner.c index e8230f7..fcff664 100644 --- a/glide3x/h5/glide3/src/gbanner.c +++ b/glide3x/h5/glide3/src/gbanner.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gdraw.c b/glide3x/h5/glide3/src/gdraw.c index ecb7688..800475b 100644 --- a/glide3x/h5/glide3/src/gdraw.c +++ b/glide3x/h5/glide3/src/gdraw.c @@ -1,24 +1,28 @@ /* - ** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY - ** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT - ** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX + ** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL + ** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH + ** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER - ** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A + ** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** - ** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO - ** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN - ** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, - ** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR - ** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF + ** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T + ** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I + ** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 + ** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA + ** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** - ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED + ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** $Header$ ** $Log: + ** 11 3dfx 1.5.1.2.1.1 10/11/00 Brent Forced check in to enforce + ** branching. + ** 10 3dfx 1.5.1.2.1.0 07/10/00 troy thornton changed grDrawPoints to + ** draw points in FSAA ** 9 3dfx 1.5.1.2 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 8 3dfx 1.5.1.1 06/20/00 Joseph Kain Changes to support the @@ -431,6 +435,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) */ #define kNumMantissaBits 12UL const float bias = (const float)(3UL << kNumMantissaBits); + GR_BEGIN_NOFIFOCHECK(FN_NAME, 90); @@ -495,13 +500,13 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) * triangle from the first packet sent. */ - /* Mask off the real fractional bits from the mantissa */ + /* Mask off the real fractional bits from the mantissa */ x = ((*(FxU32*)&gc->pool.ftemp1 & (0xFFFFFFFFUL << (22UL - kNumMantissaBits))) + (0x01UL << (22UL - kNumMantissaBits))); y = ((*(FxU32*)&gc->pool.ftemp2 & (0xFFFFFFFFUL << (22UL - kNumMantissaBits))) + (0x01UL << (22UL - kNumMantissaBits))); - - /* Lower right corner */ + + /* Lower right corner */ DA_SET(x); DA_SET(y); @@ -516,8 +521,8 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) /* Packet w/ actual point coordinate and parameter data */ DA_CONT(kSetupStrip | kSetupCullDisable, gc->cmdTransportInfo.paramMask, - 1, gc->state.vData.vSize, SSTCP_PKT3_DDDDDD); - + 1, gc->state.vData.vSize, SSTCP_PKT3_DDDDDD); + i = gc->tsuDataList[dataElem]; DA_SET(x); DA_SET(y); @@ -540,7 +545,7 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) float *vPtr; FxI32 k, i; FxI32 vcount = count >= POINTS_BUFFER ? POINTS_BUFFER : count; - GR_SET_EXPECTED_SIZE((3*gc->state.vData.vSize) * vcount, vcount); + GR_SET_EXPECTED_SIZE((gc->state.vData.vSize << 2) * vcount, vcount); /* begin points routine */ DA_BEGIN; @@ -560,20 +565,23 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) FxU32 dataElem; DA_CONT(kSetupStrip | kSetupCullDisable, gc->cmdTransportInfo.paramMask, - 3, -1/*NOT USED*//*gc->state.vData.vSize * 3*/, SSTCP_PKT3_BDDDDD); + 4, -1/*NOT USED*//*gc->state.vData.vSize * 3*/, SSTCP_PKT3_BDDDDD); + + x = FARRAY(vPtr, gc->state.vData.vertexInfo.offset) + 0.5f; + y = FARRAY(vPtr, gc->state.vData.vertexInfo.offset + 4) + 0.5f; + + x += lbias; + y += lbias; /* Convert to 32-bit representation */ - x = FARRAY(vPtr, gc->state.vData.vertexInfo.offset); - y = FARRAY(vPtr, gc->state.vData.vertexInfo.offset + 4); - - x += .5f; - y += .5f; - x = x + lbias; - y = y + lbias; - x = x - lbias; - y = y - lbias; + gc->pool.ftemp1 = (const float)x; + gc->pool.ftemp2 = (const float)y; + + /* Correct the bias to get rid of the fractional bits */ + x = (volatile float)gc->pool.ftemp1 - lbias; + y = (volatile float)gc->pool.ftemp2 - lbias; - /* Lower right corner */ + /* Lower right corner */ DA_SETF(x); DA_SETF(y); dataElem = 0; @@ -589,8 +597,8 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) i = gc->tsuDataList[dataElem]; } - /* Upper right corner */ - y -= .5f; + /* Upper right corner */ + y -= 1.0f; DA_SETF(x); DA_SETF(y); dataElem = 0; @@ -601,12 +609,11 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) i = gc->tsuDataList[dataElem]; } - /* Upper Left corner */ - x -= .5f; - + /* Lower left corner */ + y += 1.0f; + x -= 1.0f; DA_SETF(x); DA_SETF(y); - dataElem = 0; i = gc->tsuDataList[dataElem]; while (i != GR_DLIST_END) { @@ -614,7 +621,19 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) dataElem++; i = gc->tsuDataList[dataElem]; } - } + + /* Upper leftcorner */ + y += 1.0f; + DA_SETF(x); + DA_SETF(y); + dataElem = 0; + i = gc->tsuDataList[dataElem]; + while (i != GR_DLIST_END) { + DA_SET(ARRAY(vPtr, i)); + dataElem++; + i = gc->tsuDataList[dataElem]; + } + } } DA_END; GR_CHECK_SIZE(); @@ -631,10 +650,11 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) float oow; while (count > 0) { + float lbias = (float)( 3 << 22); float *vPtr; FxI32 k; FxI32 vcount = count >= POINTS_BUFFER ? POINTS_BUFFER : count; - GR_SET_EXPECTED_SIZE(((sizeof(FxU32) << 2) + gc->state.vData.vSize) * vcount, vcount << 1); + GR_SET_EXPECTED_SIZE((gc->state.vData.vSize << 2) * vcount, vcount << 1); /* begin points routine */ DA_BEGIN; @@ -647,48 +667,59 @@ _grDrawPoints(FxI32 mode, FxI32 count, void *pointers) oow = 1.0f / FARRAY(vPtr, gc->state.vData.wInfo.offset); (float *)pointers += stride; - { - FxU32 x, y; + { + float fx, fy; DA_CONT(kSetupStrip | kSetupCullDisable, 0x00, - 0x02, sizeof(FxU32) << 1, SSTCP_PKT3_BDDDDD); + 0x03, sizeof(FxU32) << 1, SSTCP_PKT3_BDDDDD); /* Convert to 32-bit representation */ + gc->pool.ftemp1 = (FARRAY(vPtr, gc->state.vData.vertexInfo.offset) * oow * gc->state.Viewport.hwidth + - gc->state.Viewport.ox + - bias); + gc->state.Viewport.ox + + 0.5f); gc->pool.ftemp2 = (FARRAY(vPtr, gc->state.vData.vertexInfo.offset + 4) * oow * gc->state.Viewport.hheight + gc->state.Viewport.oy + - bias); + 0.5f); - /* Mask off the real fractional bits from the mantissa */ - x = ((*(FxU32*)&gc->pool.ftemp1 & (0xFFFFFFFFUL << (22UL - kNumMantissaBits))) + - (0x01UL << (22UL - kNumMantissaBits))); - y = ((*(FxU32*)&gc->pool.ftemp2 & (0xFFFFFFFFUL << (22UL - kNumMantissaBits))) + - (0x01UL << (22UL - kNumMantissaBits))); - - /* Lower right cornder */ - DA_SET(x); - DA_SET(y); + fx = gc->pool.ftemp1; + fy = gc->pool.ftemp2; - /* Upper right corner. */ - y -= (0x01UL << (21UL - kNumMantissaBits)); - DA_SET(x); - DA_SET(y); + gc->pool.ftemp1 += lbias; + gc->pool.ftemp2 += lbias; + + fx = gc->pool.ftemp1 - lbias; + fy = gc->pool.ftemp2 - lbias; + + /* Lower right corner */ + DA_SETF(fx); + DA_SETF(fy); + + /* Upper right corner. */ + fy -= 1.0f; + DA_SETF(fx); + DA_SETF(fy); + + /* Lower left corner */ + fy += 1.0f; + fx -= 1.0f; + DA_SETF(fx); + DA_SETF(fy); - /* Upper Left corner */ - x -= (0x01UL << (21UL - kNumMantissaBits)); - /* Packet w/ actual point coordinate and parameter data */ DA_CONT(kSetupStrip | kSetupCullDisable, gc->cmdTransportInfo.paramMask, 1, gc->state.vData.vSize, SSTCP_PKT3_DDDDDD); + - DA_SET(x); - DA_SET(y); + /*Upper left corner */ + fy -= 1.0f; + DA_SETF(fx); + DA_SETF(fy); + DA_VP_SETFS(vPtr, oow); } } diff --git a/glide3x/h5/glide3/src/gerror.c b/glide3x/h5/glide3/src/gerror.c index ea749a4..9548f27 100644 --- a/glide3x/h5/glide3/src/gerror.c +++ b/glide3x/h5/glide3/src/gerror.c @@ -1,25 +1,27 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** ** $Header$ ** $Log: +** 6 3dfx 1.1.1.2.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 5 3dfx 1.1.1.2 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 4 3dfx 1.1.1.1 06/20/00 Joseph Kain Changes to support the diff --git a/glide3x/h5/glide3/src/gglide.c b/glide3x/h5/glide3/src/gglide.c index 2a62ed5..cf6c43a 100644 --- a/glide3x/h5/glide3/src/gglide.c +++ b/glide3x/h5/glide3/src/gglide.c @@ -1,25 +1,28 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH ** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** ** $Header$ ** $Log: +** 51 3dfx 1.41.1.6.1.110/11/00 Brent Forced check in to enforce +** branching. +** 50 3dfx 1.41.1.6.1.008/29/00 Jonny Cochrane Some 8x FSAA code ** 49 3dfx 1.41.1.6 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 48 3dfx 1.41.1.5 06/20/00 Joseph Kain Changes to support the @@ -1816,12 +1819,7 @@ GR_ENTRY(grBufferClear, void, (GrColor_t color, GrAlpha_t alpha, FxU32 depth)) } else { REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3); REG_GROUP_SET(hw, colBufferAddr, gc->buffers0[gc->windowed ? 0 : gc->curBuffer]); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride,gc->state.shadow.colBufferStride); REG_GROUP_END(); #ifdef FX_GLIDE_NAPALM if (IS_NAPALM(gc->bInfo->pciInfo.deviceID)) { @@ -2300,12 +2298,7 @@ GR_EXT_ENTRY(grBufferClearExt, void, (GrColor_t color, GrAlpha_t alpha, FxU32 de /* tbext */ REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3) ; REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.auxBufferAddr) ; -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.auxBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.auxBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.auxBufferStride) ; REG_GROUP_END() ; #ifdef FX_GLIDE_NAPALM @@ -2350,12 +2343,7 @@ GR_EXT_ENTRY(grBufferClearExt, void, (GrColor_t color, GrAlpha_t alpha, FxU32 de } else { REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3) ; REG_GROUP_SET(hw, colBufferAddr, gc->buffers0[gc->windowed ? 0 : gc->curBuffer]) ; -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride,gc->state.shadow.colBufferStride) ; REG_GROUP_END() ; #ifdef FX_GLIDE_NAPALM @@ -5017,10 +5005,10 @@ GR_DDFUNC(_grACExtcombineMode, void, (GrACUColor_t a, GR_EXT_ENTRY(grTBufferWriteMaskExt, void , (FxU32 tmask) ) { #define FN_NAME "grTBufferWriteMaskExt" - FxU32 defaultXOffset0[4] = {0x7a, 0x2, 0x7c, 0x4}; - FxU32 defaultYOffset0[4] = {0x7b, 0x4, 0x3, 0x7d}; - FxU32 defaultXOffset1[4] = {0x2, 0x7a, 0x4, 0x7c}; - FxU32 defaultYOffset1[4] = {0x4, 0x7b, 0x7d, 0x3}; + /* increase arrays for 8xaa */ + FxU32 defaultXOffset0[8] = {0x7a, 0x2, 0x7c, 0x4, 0x7a, 0x2, 0x7c, 0x4}; + FxU32 defaultYOffset0[8] = {0x7b, 0x4, 0x3, 0x7d, 0x7a, 0x2, 0x7c, 0x4}; + FxU32 chipIndex, chipEnList, i; GR_BEGIN_NOFIFOCHECK("grTBufferWriteMaskExt",85); GDBG_INFO_MORE(gc->myLevel, "(0x%x)\n", tmask); @@ -5038,12 +5026,12 @@ GR_EXT_ENTRY(grTBufferWriteMaskExt, void , (FxU32 tmask) ) } /* This is sortof slow, but this function doesn't need to be that fast. */ - for(i = 0; i < 4; i++) { + /* 8xaa - loop to load 8 sample offsets */ + for(i = 0; i < 8; i++) { defaultXOffset0[i] = _GlideRoot.environment.aaXOffset[gc->grPixelSample - 1][i]; defaultYOffset0[i] = _GlideRoot.environment.aaYOffset[gc->grPixelSample - 1][i]; - defaultXOffset1[i] = _GlideRoot.environment.aaXOffset[gc->grPixelSample - 1][i^1]; - defaultYOffset1[i] = _GlideRoot.environment.aaYOffset[gc->grPixelSample - 1][i^1]; } + chipEnList = gc->chipmask; for (chipIndex = 0; chipIndex < gc->chipCount; chipIndex++) { @@ -5068,12 +5056,7 @@ GR_EXT_ENTRY(grTBufferWriteMaskExt, void , (FxU32 tmask) ) REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -5093,12 +5076,7 @@ GR_EXT_ENTRY(grTBufferWriteMaskExt, void , (FxU32 tmask) ) REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -5116,12 +5094,7 @@ GR_EXT_ENTRY(grTBufferWriteMaskExt, void , (FxU32 tmask) ) REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -5129,12 +5102,7 @@ GR_EXT_ENTRY(grTBufferWriteMaskExt, void , (FxU32 tmask) ) REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->buffers1[gc->curBuffer] | SST_BUFFER_BASE_SELECT); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->buffers1[gc->grColBuf] | SST_BUFFER_BASE_SELECT); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } diff --git a/glide3x/h5/glide3/src/glfb.c b/glide3x/h5/glide3/src/glfb.c index 95c7eb3..42aa2dd 100644 --- a/glide3x/h5/glide3/src/glfb.c +++ b/glide3x/h5/glide3/src/glfb.c @@ -1,24 +1,31 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** $Header$ ** $Log: +** 14 3dfx 1.7.1.2.1.2 10/11/00 Brent Forced check in to enforce +** branching. +** 13 3dfx 1.7.1.2.1.1 08/29/00 Jonny Cochrane Some 8x FSAA code +** 12 3dfx 1.7.1.2.1.0 08/08/00 Andy Hanson Fix in grLfbReadRegion for +** 32 bit surfaces. If 32 bit is forced, and game isn't aware, we could +** overflow the destination buffer now. but it wouldn't look right anyways. +** Will add FX_GLIDE_LFB_OVERFLOW evar if a problem arises. ** 11 3dfx 1.7.1.2 06/20/00 Joseph Kain Fixed errors introduced by ** my previous merge. ** 10 3dfx 1.7.1.1 06/20/00 Joseph Kain Changes to support the @@ -419,18 +426,21 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, case GR_PIXFMT_ARGB_1555: case GR_PIXFMT_AA_2_ARGB_1555: case GR_PIXFMT_AA_4_ARGB_1555: + case GR_PIXFMT_AA_8_ARGB_1555: /* 8xaa */ fbMode = GR_LFBWRITEMODE_1555; depthMode = GR_LFBWRITEMODE_ZA16; break; case GR_PIXFMT_ARGB_8888: case GR_PIXFMT_AA_2_ARGB_8888: case GR_PIXFMT_AA_4_ARGB_8888: + case GR_PIXFMT_AA_8_ARGB_8888: /* 8xaa */ fbMode = GR_LFBWRITEMODE_8888; depthMode = GR_LFBWRITEMODE_Z32; break; case GR_PIXFMT_RGB_565: case GR_PIXFMT_AA_2_RGB_565: case GR_PIXFMT_AA_4_RGB_565: + case GR_PIXFMT_AA_8_RGB_565: /* 8xaa */ default: fbMode = GR_LFBWRITEMODE_565; depthMode = GR_LFBWRITEMODE_ZA16; @@ -483,18 +493,21 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, case GR_PIXFMT_ARGB_1555: case GR_PIXFMT_AA_2_ARGB_1555: case GR_PIXFMT_AA_4_ARGB_1555: + case GR_PIXFMT_AA_8_ARGB_1555: /* 8xaa */ fbMode = GR_LFBWRITEMODE_1555; depthMode = GR_LFBWRITEMODE_ZA16; break; case GR_PIXFMT_ARGB_8888: case GR_PIXFMT_AA_2_ARGB_8888: case GR_PIXFMT_AA_4_ARGB_8888: + case GR_PIXFMT_AA_8_ARGB_8888: /* 8xaa */ fbMode = GR_LFBWRITEMODE_8888; depthMode = GR_LFBWRITEMODE_Z32; break; case GR_PIXFMT_RGB_565: case GR_PIXFMT_AA_2_RGB_565: case GR_PIXFMT_AA_4_RGB_565: + case GR_PIXFMT_AA_8_RGB_565: /* 8xaa */ default: fbMode = GR_LFBWRITEMODE_565; depthMode = GR_LFBWRITEMODE_ZA16; @@ -591,7 +604,7 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, /* Get the current lfb buffer */ { /* FixMe: Is this true if we're triple buffering? */ - FxU32 colBufferIndex = 0; + FxU32 colBufferIndex; switch(buffer) { case GR_BUFFER_FRONTBUFFER: @@ -631,17 +644,15 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, if (rv) { #ifdef __linux__ - if (!colBufferIndex) { - info->strideInBytes = driInfo.stride; - } else { - info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride; - } + if (!colBufferIndex) + info->strideInBytes = driInfo.stride; + else + info->strideInBytes = 0x1000; /* This is the default for 3D LFBs, + * which are always 2048 + pixels wide. */ #else /* defined(__linux__) */ - /* - * This is the default for 3D LFBs, - * which are always 2048 pixels wide. - */ - info->strideInBytes = 0x1000; + info->strideInBytes = 0x1000; /* This is the default for 3D LFBs, + * which are always 2048 pixels wide. */ #endif /* defined(__linux__) */ info->origin = origin; @@ -684,19 +695,12 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, info->strideInBytes = gc->textureBuffer.stride ; } -#endif +#endif else { -#ifdef __linux__ - /* - * For Linux, we just return the correct address and - * stride. - */ - info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride; - info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex]; -#else /* defined(__linux__) */ info->lfbPtr = (void *)gc->lfb_ptr; -#endif /* defined(__linux__) */ -#ifndef __linux__ +#ifdef __linux__ + info->strideInBytes = 0x1000; +#endif /* defined(__linux__) */ switch (writeMode) { case GR_LFBWRITEMODE_565_DEPTH: case GR_LFBWRITEMODE_555_DEPTH: @@ -707,7 +711,6 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, info->strideInBytes <<= 1; break; } -#endif /* defined(__linux__) */ } REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 2, 0x3); REG_GROUP_SET(hw, colBufferAddr, gc->textureBuffer.addr ); @@ -716,15 +719,7 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, } else /* else !gc->textureBuffer.on */ { if (type == GR_LFB_READ_ONLY) { info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex]; -#if defined(__linux__) - if (colBufferIndex == 0) { - info->strideInBytes = driInfo.stride; - } else { - info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride; - } -#else /* defined(__linux__) */ info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride; -#endif /* defined(__linux__) */ #if __POWERPC__ if(IS_NAPALM(gc->bInfo->pciInfo.deviceID)) { if(gc->grPixelSize == 2) { @@ -774,18 +769,8 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, /* Make sure dither rotation is disabled for 3D LFBs. */ _3dlfb = FXTRUE; -#if defined(__linux__) - /* - * For Linux, we just return the correct address and - * stride. - */ - info->strideInBytes = gc->bInfo->buffInfo.bufLfbStride; - info->lfbPtr = (void *)gc->lfbBuffers[colBufferIndex]; -#else /* defined(__linux__) */ info->lfbPtr = (void *)gc->lfb_ptr; -#endif /* defined(__linux__) */ -#ifndef __linux__ switch (writeMode) { case GR_LFBWRITEMODE_565_DEPTH: case GR_LFBWRITEMODE_555_DEPTH: @@ -796,7 +781,6 @@ GR_ENTRY(grLfbLock, FxBool,(GrLock_t type, GrBuffer_t buffer, info->strideInBytes <<= 1; break; } -#endif /* defined(__linux__) */ } } @@ -1266,6 +1250,91 @@ GR_ENTRY(grLfbWriteRegion, FxBool, (GrBuffer_t dst_buffer, FXTRUE - success FXFALSE - failure -------------------------------------------------------------------*/ +#if !__POWERPC__ +GR_ENTRY(grLfbReadRegion, FxBool, (GrBuffer_t src_buffer, + FxU32 src_x, FxU32 src_y, + FxU32 src_width, FxU32 src_height, + FxU32 dst_stride, void *dst_data)) +{ +#define FN_NAME "grLfbReadRegion" + FxU32 bpp; + FxBool rv; + GrLfbInfo_t info; + + GR_BEGIN_NOFIFOCHECK_RET("grLfbReadRegion",82); + GDBG_INFO_MORE(gc->myLevel, + "(0x%x,%d,%d,%d,%d,%d,0x%x)\n", + src_buffer, src_x, src_y, + src_width, src_height, dst_stride, dst_data); + + bpp=gc->bInfo->h3pixelSize; + info.size = sizeof(info); + if (!src_width) + { + rv=FXTRUE; + goto done; + } + rv=FXFALSE; + + if (grLfbLock(GR_LFB_READ_ONLY, + src_buffer, + GR_LFBWRITEMODE_ANY, + GR_ORIGIN_UPPER_LEFT, + FXFALSE, + &info)) + { + FxU32 *src,*dst; + FxI32 length,scanline; + FxU32 src_adjust,dst_adjust,tmp; + + src=(FxU32 *) (((char*)info.lfbPtr)+ + (src_y*info.strideInBytes) + (src_x * bpp)); + dst=dst_data; + scanline=src_height; + + /* set length - alignment fix*/ + tmp=(((FxU32)src)&2); + length=src_width * bpp - tmp; + src_adjust=info.strideInBytes - tmp; + dst_adjust=dst_stride - tmp; + + /* should be endian and pixel size safe */ + /* it would be nice to test if quad blocks were faster */ + /* like mmx loads and stores */ + while(src_height--) + { + /* adjust starting alignment */ + if (((FxU32)src)&3) + *((FxU16 *)dst)++=*((FxU16 *)src)++; + + /* read in dwords of pixels */ + if(length) + { + FxU32 byte_index=0; + FxU32 aligned=length&(~3); + + /* copies aligned dwords */ + do + { + *((FxU32 *)(((FxU32)dst) + byte_index))=*((FxU32 *)(((FxU32)src) + byte_index)); + }while((byte_index+=4)state.screen_width, (float)gc->state.screen_height, @@ -1146,8 +1172,8 @@ initGC ( GrGC *gc ) gc->bufferSwaps[t] = 0xffffffff; } - gc->bufferSwaps[0] = ((AnyPtr) gc->cmdTransportInfo.fifoPtr - - (AnyPtr) gc->cmdTransportInfo.fifoStart); + gc->bufferSwaps[0] = ((FxU32) gc->cmdTransportInfo.fifoPtr - + (FxU32) gc->cmdTransportInfo.fifoStart); gc->swapsPending = 1; @@ -1342,11 +1368,10 @@ GR_ENTRY(grSstWinOpen, GrContext_t, ( FxU32 hWnd, hwcBufferInfo *bufInfo = 0; hwcFifoInfo *fInfo = 0; #endif /* defined ( GLIDE_INIT_HAL ) */ - int buffer; + struct cmdTransportInfo *gcFifo = 0; - GrContext_t retVal = 0; - FxU32 - tramShift, tmu1Offset; + GrContext_t retVal = 0; + #ifndef __linux__ if (!hWnd) @@ -1358,7 +1383,7 @@ GR_ENTRY(grSstWinOpen, GrContext_t, ( FxU32 hWnd, * current gc. This gc is valid for all threads in the fullscreen * context. */ - setThreadValue( (AnyPtr)&_GlideRoot.GCs[_GlideRoot.current_sst] ); + setThreadValue( (FxU32)&_GlideRoot.GCs[_GlideRoot.current_sst] ); { /* Partial Argument Validation */ @@ -1382,28 +1407,33 @@ GR_ENTRY(grSstWinOpen, GrContext_t, ( FxU32 hWnd, if (_GlideRoot.environment.outputBpp == 32) { /* Force rendering to 32bpp */ - if ((_GlideRoot.environment.aaSample == 4) && - (gc->chipCount > 1)) - thePixelFormat = GR_PIXFMT_AA_4_ARGB_8888 ; + if ((_GlideRoot.environment.aaSample == 8) && /* 8xaa */ + (gc->chipCount > 2)) + thePixelFormat = GR_PIXFMT_AA_8_ARGB_8888 ; + else if ((_GlideRoot.environment.aaSample == 4) && + (gc->chipCount > 1)) + thePixelFormat = GR_PIXFMT_AA_4_ARGB_8888 ; + else if (_GlideRoot.environment.aaSample == 2) + thePixelFormat = GR_PIXFMT_AA_2_ARGB_8888 ; else - if (_GlideRoot.environment.aaSample == 2) - thePixelFormat = GR_PIXFMT_AA_2_ARGB_8888 ; - else - thePixelFormat = GR_PIXFMT_ARGB_8888 ; + thePixelFormat = GR_PIXFMT_ARGB_8888 ; } else { /* default rendering to 16bpp */ - if ((_GlideRoot.environment.aaSample == 4) && + if ((_GlideRoot.environment.aaSample == 8) && /* 8xaa */ + (gc->chipCount > 2)) + thePixelFormat = GR_PIXFMT_AA_8_RGB_565 ; + else if ((_GlideRoot.environment.aaSample == 4) && (gc->chipCount > 1)) - thePixelFormat = GR_PIXFMT_AA_4_RGB_565 ; - else - if (_GlideRoot.environment.aaSample == 2) + thePixelFormat = GR_PIXFMT_AA_4_RGB_565 ; + else if (_GlideRoot.environment.aaSample == 2) thePixelFormat = GR_PIXFMT_AA_2_RGB_565 ; - else + else thePixelFormat = GR_PIXFMT_RGB_565 ; } #endif + return ( grSstWinOpenExt(hWnd, resolution, refresh, @@ -1413,705 +1443,20 @@ GR_ENTRY(grSstWinOpen, GrContext_t, ( FxU32 hWnd, nColBuffers, nAuxBuffers) ); } -#endif - /* - ** check if the environment variable for triple buffering is on - */ - if (_GlideRoot.environment.nColorBuffer != -1) { - if ((_GlideRoot.environment.nColorBuffer > 0) && - (_GlideRoot.environment.nColorBuffer <= 3) - ){ - nColBuffers = _GlideRoot.environment.nColorBuffer; - } - } - - resolution = - (((FxU32)resolution) > (sizeof(_resTable) / sizeof(ResEntry))) - ? GR_RESOLUTION_640x480 - : resolution; -#ifdef __linux__ - gc->state.screen_width = driInfo.screenWidth; - gc->state.screen_height = driInfo.screenHeight; -#else /* defined(__linux__) */ - gc->state.screen_width = _resTable[resolution].xres; - gc->state.screen_height = _resTable[resolution].yres; - GR_CHECK_F( FN_NAME, - resolution != _resTable[resolution].resolution, - "resolution table compilation incorrect" ); - if ( gc->vidTimings ) { - gc->state.screen_width = gc->vidTimings->xDimension; - gc->state.screen_height = gc->vidTimings->yDimension; - } -#endif /* defined(__linux__) */ - - gc->state.origin = origin; - gc->grSstRez = resolution; - gc->grSstRefresh = refresh; - gc->grColBuf = gc->state.num_buffers = nColBuffers; - gc->grAuxBuf = nAuxBuffers; - gc->fbStride = gc->state.screen_width * BYTES_PER_PIXEL; - gc->grHwnd = (int) hWnd; - gc->grPixelSize = 2; - gc->grPixelFormat = GR_PIXFMT_RGB_565; - gc->grPixelSample = 1; - - /* compute tile dimensions */ - gc->strideInTiles = - ( gc->state.screen_width + ( TILE_WIDTH_PXLS - 1 ) ) / TILE_WIDTH_PXLS; - GDBG_INFO(80, "%s: strideInTiles = 0X%x\n", FN_NAME, gc->strideInTiles); - gc->heightInTiles = - ( gc->state.screen_height + (TILE_HEIGHT_PXLS - 1 ) ) / TILE_HEIGHT_PXLS; - GDBG_INFO(80, "%s: heightInTiles = 0x%x\n", FN_NAME, gc->heightInTiles); - gc->bufferStride = gc->strideInTiles * TILE_WIDTH_PXLS * BYTES_PER_PIXEL; - GDBG_INFO(80, "%s: bufferStride = 0x%x\n", FN_NAME, gc->bufferStride); - gc->bufSizeInTiles = gc->strideInTiles * gc->heightInTiles; - GDBG_INFO(80, "%s: bufSizeInTiles = 0x%x\n", FN_NAME, gc->bufSizeInTiles); - gc->bufSize = - gc->bufSizeInTiles * TILE_WIDTH_PXLS * TILE_HEIGHT_PXLS * BYTES_PER_PIXEL; - GDBG_INFO(80, "%s: bufSize = 0x%x\n", FN_NAME, gc->bufSize); - - /* Check for enough memory */ -#ifdef GLIDE_INIT_HWC - if ( ( gc->bufSize * ( gc->grColBuf + gc->grAuxBuf ) + MIN_TEXTURE_STORE + MIN_FIFO_SIZE) > - ( gc->bInfo->h3Mem << 20 ) ) { - GDBG_INFO( gc->myLevel, "Failed to open for insufficient memory\n" ); - GrErrorCallback( "grSstWinOpen: not enough memory for requested buffers", FXFALSE ); - return 0; - } -#endif - - /* Allocate Color/Aux Buffers, Set Memory Layout */ - gcFifo = &gc->cmdTransportInfo; - -#if defined( USE_PACKET_FIFO ) -#if defined( GLIDE_INIT_HWC ) - bInfo = gc->bInfo; - vInfo = &bInfo->vidInfo; - bufInfo = &bInfo->buffInfo; - - /* If we closed down then the hw may have been un-mapped (on - * systems that actually support this) so we need to re-map the - * board and re-cache our hw pointers. - */ - if (!gc->bInfo->isMapped) { - if (!hwcMapBoard(bInfo, HWC_BASE_ADDR_MASK)) { - GDBG_INFO( gc->myLevel, "Failed to re-map the hw.\n" ); - GrErrorCallback( FN_NAME": Failed to re-map the hw.", FXFALSE ); - GR_RETURN( FXFALSE ); - } - - if (!hwcInitRegisters(bInfo)) { - GDBG_INFO( gc->myLevel, "Failed to re-initialize the hw.\n" ); - GrErrorCallback( FN_NAME": Failed to re-initialize the hw.", FXFALSE ); - GR_RETURN( FXFALSE ); - } - - } - - /* Don't assume that because the board was still mapped that these - didn't move! */ - gc->sstRegs = (SstRegs*)bInfo->regInfo.sstBase; - gc->ioRegs = (SstIORegs*)bInfo->regInfo.ioMemBase; - gc->cRegs = (SstCRegs*)bInfo->regInfo.cmdAGPBase; - gc->lfb_ptr = (FxU32*)bInfo->regInfo.lfbBase; - gc->rawLfb = (FxU32*)bInfo->regInfo.rawLfbBase; - gc->tex_ptr = (FxU32*)SST_TEX_ADDRESS(bInfo->regInfo.sstBase); - -#ifdef __linux__ - vInfo->xRes = driInfo.w; - vInfo->yRes = driInfo.h; -#else /* defined(__linux__) */ - vInfo->xRes = gc->state.screen_width; - vInfo->yRes = gc->state.screen_height; -#endif /* defined(__linux__) */ - - vInfo->refresh = gc->grSstRefresh; - vInfo->tiled = FXTRUE; - vInfo->initialized = FXTRUE; - bufInfo->enable2ndbuffer = FXFALSE; - - gc->colTiled = gc->auxTiled = FXTRUE ; /* AJB - grBufferClear need to know this */ - - if ( hwcAllocBuffers( bInfo, nColBuffers, nAuxBuffers ) == FXFALSE ) { - GDBG_INFO( gc->myLevel, "hwcAllocBuffers failed\n" ); - GrErrorCallback(hwcGetErrorString(), FXFALSE); - return 0; - } - - for (buffer = 0; buffer < nColBuffers; buffer++) { - gc->buffers0[buffer] = bufInfo->colBuffStart0[buffer]; - GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers0[buffer]); - gc->lfbBuffers[buffer] = (AnyPtr)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer]; - } - if (nAuxBuffers != 0) { - gc->buffers0[buffer] = bufInfo->auxBuffStart0; - GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers0[buffer]); - gc->lfbBuffers[buffer] = (AnyPtr)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer]; - } - - vInfo->hWnd = gc->grHwnd; - vInfo->sRes = gc->grSstRez; - vInfo->vRefresh = gc->grSstRefresh; - - if ( hwcInitVideo( bInfo, FXTRUE, gc->vidTimings, SST_OVERLAY_PIXEL_RGB565D, FXTRUE ) == FXFALSE ) { - GrErrorCallback(hwcGetErrorString(), FXFALSE); - GDBG_INFO( gc->myLevel, "hwcInitVideo failed\n" ); - return 0; - } - - /* Restore the function specializations if the user is trying to - * recover. This only resets the non-null environment. The actual - * function specializations are recovered later in the mainline - * code path for the open. - */ - if (gc->open && !gc->contextP) { - GrTriSetupProcArchVector* - curTriProcs = _GlideRoot.deviceArchProcs.curTriProcs; - GrVertexListProc* - curVertexListProcs = _GlideRoot.deviceArchProcs.curVertexListProcs; - - _GlideRoot.deviceArchProcs.curTriProcs = _GlideRoot.deviceArchProcs.nullTriProcs; - _GlideRoot.deviceArchProcs.curVertexListProcs = _GlideRoot.deviceArchProcs.nullVertexListProcs; - - _GlideRoot.deviceArchProcs.nullTriProcs = curTriProcs; - _GlideRoot.deviceArchProcs.nullVertexListProcs = curVertexListProcs; - } - - /* This actually gets taken in hwcInitVideo */ - gc->contextP = FXTRUE; - -#ifndef __linux__ - /* CSR - Set up flag for display driver to tell us that context was lost */ - if ( !gc->open ) /* If we already have a context open, then lets not - re-initialize the pointers */ - { - hwcShareContextData(gc->bInfo, &(gc->lostContext)); - gc->cmdTransportInfo.ptrLostContext = &(gc->lostContext); - } - - *gc->lostContext = FXFALSE; -#endif /* defined(__linux__) */ - - if (_GlideRoot.environment.gammaR != -1.f && - _GlideRoot.environment.gammaG != -1.f && - _GlideRoot.environment.gammaB != -1.f) { - hwcGammaRGB(gc->bInfo, - _GlideRoot.environment.gammaR, - _GlideRoot.environment.gammaG, - _GlideRoot.environment.gammaB); - } else { - hwcGammaRGB(gc->bInfo, 1.3f, 1.3f, 1.3f); - } - - /* Setup memory configuration */ - gc->fbOffset = bInfo->fbOffset; - - /* - ** if the environment variable is on, use the its texture memory size * 2 - */ - if ((_GlideRoot.environment.tmuMemory != -1) && (gc->fbOffset >= 0x200000)) - bInfo->tramSize = _GlideRoot.environment.tmuMemory << 21; - - GDBG_INFO(80, FN_NAME ": TMUs: %d\n", gc->num_tmu); - GDBG_INFO(80, FN_NAME ": Total TMU Memory: 0x%x\n", bInfo->tramSize); - GDBG_INFO(80, FN_NAME ": Texture Memory Offset: 0x%x\n",bInfo->tramOffset); - /* - ** if we only have one TMU or we are using UMA, do similar things - */ - if ( - (gc->num_tmu < 1) || - (gc->state.grEnableArgs.texture_uma_mode == GR_MODE_ENABLE) - ) { - tramShift = 0; - tmu1Offset = 0; - GDBG_INFO(80, FN_NAME ": UMA ON\n"); - } else { - tramShift = 1; - tmu1Offset = bInfo->tramSize >> 1; - GDBG_INFO(80, FN_NAME ": UMA OFF\n"); - } - - switch (gc->num_tmu) { - case 2: - gc->tmuMemInfo[1].tramOffset = bInfo->tramOffset + tmu1Offset; - gc->tmuMemInfo[1].tramSize = (bInfo->tramSize >> tramShift); - gc->tmu_state[1].total_mem = gc->tmuMemInfo[1].tramSize; - GDBG_INFO(80, FN_NAME ": TMU1: Offset 0x%x, size 0x%x\n", - gc->tmuMemInfo[1].tramOffset, gc->tmuMemInfo[1].tramSize); - /* NOTE: NO BREAK. THIS IS ON PURPOSE */ - case 1: - default: - gc->tmuMemInfo[0].tramOffset = bInfo->tramOffset; - gc->tmuMemInfo[0].tramSize = (bInfo->tramSize >> tramShift); - gc->tmu_state[0].total_mem = gc->tmuMemInfo[0].tramSize; - GDBG_INFO(80, FN_NAME ": TMU0: Offset 0x%x, size 0x%x\n", - gc->tmuMemInfo[0].tramOffset, gc->tmuMemInfo[0].tramSize); - - break; - } /* gc->num_tmu */ - - gc->tBuffer.bufType = HWC_BUFFER_TEXTUREBUFFER; - gc->tBuffer.bufOffset = bInfo->tramOffset; - gc->tBuffer.bufSize = bInfo->tramSize; - gc->tBuffer.tiled = FXFALSE; - gc->tBuffer.bufBPP = 0xffffffff; /* Don't matter to me */ - - GDBG_INFO(1, "autoBump: 0x%x\n", _GlideRoot.environment.autoBump); - /* The logic for this is hosed for PowerPC, where we disable auto-bump even - on PCI. */ - if ((gc->cmdTransportInfo.autoBump = _GlideRoot.environment.autoBump)!=0) { - if (!hwcInitFifo( bInfo, gc->cmdTransportInfo.autoBump)) { - hwcRestoreVideo(bInfo); - GrErrorCallback(hwcGetErrorString(), FXFALSE); - GDBG_INFO(gc->myLevel, "hwcInitFifo failed\n"); - GR_RETURN(FXFALSE); - } - } else { - /* %%KCD - I pass in true because I know this will just fall through to hwcInitFifo() */ -#if __POWERPC__ - if (!hwcInitAGPFifo(bInfo, FXFALSE)) { -#else - if (!hwcInitAGPFifo(bInfo, FXTRUE)) { -#endif - hwcRestoreVideo(bInfo); - GrErrorCallback(hwcGetErrorString(), FXFALSE); - GDBG_INFO(gc->myLevel, "hwcInitFifo failed\n"); - GR_RETURN(FXFALSE); - } - /* Check to see where the command fifo was placed since the agp - * allocation might have failed for some reason, and fallen back - * to using the normal video command fifo. - */ - gc->cmdTransportInfo.autoBump = ((GR_CAGP_GET(baseSize) & SST_CMDFIFO_DISABLE_HOLES) == 0); - } - - /* COMMAND FIFO SETUP */ - fInfo = &gc->bInfo->fifoInfo; - - /* Establish physical bounds of cmd fifo from HWC calculation */ - gcFifo->fifoOffset = fInfo->fifoStart; - gcFifo->fifoSize = fInfo->fifoLength; -#elif defined( GLIDE_INIT_HAL ) -#if 0 - gc->fbOffset = 0x200000; - gc->tramOffset = 0x0; - gc->tramSize = gc->fbOffset; - gc->tmu_state[0].total_mem = gc->tramSize; -#else - /* gc->fbOffset = (FxU32)fxHalFbiGetMemory((SstRegs*)gc->reg_ptr); */ - gc->fbOffset = (AnyPtr)gc->rawLfb; - gc->fbOffset = 0x0; - gc->tmuMemInfo[0].tramOffset = 0x200000; - gc->tmuMemInfo[0].tramSize = 0x200000; - gc->tmuMemInfo[1].tramOffset = gc->tmuMemInfo[0].tramSize + gc->tmuMemInfo[0].tramOffset; - gc->tmuMemInfo[1].tramSize = 0x200000; - gc->tmu_state[0].total_mem = gc->tmuMemInfo[0].tramSize; - gc->tmu_state[1].total_mem = gc->tmuMemInfo[1].tramSize; -#endif - - for ( buffer = 0; buffer < nColBuffers; buffer++ ) { - gc->buffers0[buffer] = gc->fbOffset + buffer * gc->bufSize; - /* XXXjdt: this is never initialized in the old code */ - gc->lfbBuffers[buffer] = 0; - GDBG_INFO(80, "%s: Buffer %d: 0x%x\n", - FN_NAME, buffer, gc->buffers0[buffer]); - } - if (nAuxBuffers != 0) { - gc->buffers0[buffer] = gc->fbOffset + buffer * gc->bufSize; - gc->lfbBuffers[buffer] = 0; - GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers0[buffer]); - } - if( !fxHalGetDeviceInfo((SstRegs*)gc->reg_ptr, &devInfo) ) { - GrErrorCallback(" XXXGetDeviceInfo failed.\n", FXFALSE); - GDBG_INFO( gc->myLevel, - " XXXGetDeviceInfo failed. (0x%x)\n", - gc->reg_ptr ); - return 0; - } - - /* COMMAND FIFO SETUP */ -#if 0 - gcFifo->fifoOffset = gc->fbOffset + - ( gc->bufSize * ( gc->grColBuf + gc->grAuxBuf ) ); - gcFifo->fifoSize = 0x400000 - gcFifo->fifoOffset + gc->fbOffset; -#else - gcFifo->fifoOffset = ( gc->bufSize * ( gc->grColBuf + gc->grAuxBuf ) ); - gcFifo->fifoSize = 0x20000; -#endif - - if ( !fxHalInitCmdFifo((SstRegs *) gc->reg_ptr, - 0, /* which fifo - 0 for 3d cmd fifo */ - /* v fifoStart - offset from hw base v */ - gcFifo->fifoOffset, - gcFifo->fifoSize, /* size - in bytes */ - FXTRUE, /* directExec */ - FXFALSE, /* disableHoles */ - FXFALSE) /* agpEnable */ ) { -#ifdef GLIDE_INIT_HWC - GrErrorCallBack( "fxHalInitCmdFifo failed.\n", FxFALSE ); -#endif - GDBG_INFO( 0, "Error: fxHalInitCmdFifo failed\n" ); - return 0; - } - if ( !fxHalInitVideo( (SstRegs*) gc->reg_ptr, - (resolution == GR_RESOLUTION_NONE) ? GR_RESOLUTION_640x480 - : (resolution), - refresh, - NULL ) ) { -#ifdef GLIDE_INIT_HWC - GrErrorCallBack( "fxHalInitVideo failed.\n", FxFALSE ); -#endif - GDBG_INFO( 0, "Error: fxHalInitVideo failed\n" ); - GR_RETURN( FXFALSE ); - } - fxHalInitVideoOverlaySurface( (SstRegs*) gc->reg_ptr, /* SstRegs */ - FXTRUE, /* 1=enable Overlay surface*/ - FXFALSE, /* 1=enable OS stereo, 0=disable*/ - FXFALSE, /* 1=enable horizontal*/ - 0, /* horizontal scale factor (ignored if*/ - FXFALSE, /* 1=enable vertical scaling,*/ - 0, /* vertical scale factor (ignored if not*/ - 0, /* duh*/ - 1, /* 0=OS linear, 1=tiled*/ - SST_OVERLAY_PIXEL_RGB565U, /* pixel format of OS*/ - FXFALSE, /* bypass clut for OS?*/ - FXFALSE, /* 0=lower 256 CLUT entries,*/ - gc->buffers0[gc->curBuffer], /* board address of beginning of OS */ - gc->strideInTiles ); /* distance between scanlines of the OS, in*/ - -#ifndef __linux__ - /* - ** initialize context checking - */ - { - gc->lostContext = &lostcontext_csim; - *gc->lostContext = FXFALSE; - gc->contextP = 1; - } -#endif /* defined(__linux__) */ - -#endif /* defined( GLIDE_INIT_HAL ) */ -#else /* !defined( USE_PACKET_FIFO ) */ - gc->fbOffset = (AnyPtr)gc->rawLfb; - gc->fbOffset = 0x0; - gc->tmuMemInfo[0].tramOffset = 0x200000; - gc->tmuMemInfo[0].tramSize = 0x200000; - gc->tmuMemInfo[1].tramOffset = gc->tmuMemInfo[0].tramSize + gc->tmuMemInfo[0].tramOffset; - gc->tmuMemInfo[1].tramSize = 0x200000; - gc->tmu_state[0].total_mem = gc->tmuMemInfo[0].tramSize; - gc->tmu_state[1].total_mem = gc->tmuMemInfo[1].tramSize; - { - bInfo = gc->bInfo; - vInfo = &bInfo->vidInfo; - bufInfo = &bInfo->buffInfo; - - vInfo->xRes = gc->state.screen_width; - vInfo->yRes = gc->state.screen_height; - vInfo->refresh = gc->grSstRefresh; - vInfo->tiled = FXFALSE; - vInfo->initialized = FXTRUE; - - gc->colTiled = gc->auxTiled = FXFALSE ; /* AJB- grBufferClear needs to know this */ - - if (GETENV("SST_FBI_MEM")) { - bInfo->h3Mem = atoi(GETENV("SST_FBI_MEM")); - } - else { - bInfo->h3Mem = 32; - } - bInfo->h3pixelSize = 2; - - bInfo->buffInfo.enable2ndbuffer = FXFALSE; - - if ( hwcAllocBuffers( gc->bInfo, nColBuffers, nAuxBuffers ) == FXFALSE ) { - } - for ( buffer = 0; buffer < nColBuffers; buffer++ ) { - gc->buffers0[buffer] = bufInfo->colBuffStart0[buffer]; - GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers0[buffer]); - gc->lfbBuffers[buffer] = (AnyPtr)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer]; - if (bInfo->buffInfo.enable2ndbuffer) { - gc->buffers1[buffer] = bufInfo->colBuffStart1[buffer]; - GDBG_INFO(80, "Buffer %d: Start: 0x%x\n", buffer, gc->buffers1[buffer]); - } - } - if (nAuxBuffers != 0) { - gc->buffers0[buffer] = bufInfo->auxBuffStart0; - GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers0[buffer]); - gc->lfbBuffers[buffer] = (AnyPtr)gc->rawLfb + bufInfo->lfbBuffAddr0[buffer]; - if (bInfo->buffInfo.enable2ndbuffer) { - gc->buffers1[buffer] = bufInfo->auxBuffStart1; - GDBG_INFO(80, "Aux Buffer: Start: 0x%x\n", gc->buffers1[buffer]); - } - } - } - if( !fxHalGetDeviceInfo((SstRegs*)gc->reg_ptr, &devInfo) ) { - GrErrorCallback(" XXXGetDeviceInfo failed.\n", FXFALSE); - GDBG_INFO( gc->myLevel, - " XXXGetDeviceInfo failed. (0x%x)\n", - gc->reg_ptr ); - GR_RETURN( 0 ); - } -#if 0 - /* COMMAND FIFO SETUP */ - gcFifo->fifoOffset = gc->fbOffset + - ( gc->bufSize * ( gc->grColBuf + gc->grAuxBuf ) ); - gcFifo->fifoSize = 0x400000 - gcFifo->fifoOffset + gc->fbOffset; - - if ( !fxHalInitCmdFifo((SstRegs *) gc->reg_ptr, - 0, /* which fifo - 0 for 3d cmd fifo */ - /* v fifoStart - offset from hw base v */ - gcFifo->fifoOffset, - gcFifo->fifoSize, /* size - in bytes */ - FXTRUE, /* directExec */ - FXFALSE, /* disableHoles */ - FXFALSE) /* agpEnable */ ) { -#ifdef FX_FAIL_HWC - GrErrorCallBack( "fxHalInitCmdFifo failed.\n", FxFALSE ); -#endif - GDBG_INFO( 0, "Error: fxHalInitCmdFifo failed\n" ); - GR_RETURN( 0 ); - } -#endif - if ( !fxHalInitVideo( (SstRegs*) gc->reg_ptr, - (resolution == GR_RESOLUTION_NONE) ? GR_RESOLUTION_640x480 - : (resolution), - refresh, - NULL ) ) { - GR_RETURN( 0 ); - } - fxHalInitVideoOverlaySurface( (SstRegs*) gc->reg_ptr, /* SstRegs */ - FXTRUE, /* 1=enable Overlay surface*/ - FXFALSE, /* 1=enable OS stereo, 0=disable*/ - FXFALSE, /* 1=enable horizontal*/ - 0, /* horizontal scale factor (ignored if*/ - FXFALSE, /* 1=enable vertical scaling,*/ - 0, /* vertical scale factor (ignored if not*/ - 0, /* duh*/ - 1, /* 0=OS linear, 1=tiled*/ - SST_OVERLAY_PIXEL_RGB565U, /* pixel format of OS*/ - FXFALSE, /* bypass clut for OS?*/ - FXFALSE, /* 0=lower 256 CLUT entries,*/ - gc->buffers0[gc->curBuffer], /* board address of beginning of OS */ - gc->strideInTiles ); /* distance between scanlines of the OS, in*/ - _grReCacheFifo(0); -#ifndef __linux__ - /* - ** initialize context checking - */ - { - gc->lostContext = &lostcontext_csim; - *gc->lostContext = FXFALSE; - gc->contextP = 1; - } -#endif /* defined(__linux__) */ -#endif /* !defined( USE_PACKET_FIFO ) */ - - /* Compute Virtual FIFO address extents */ -#ifdef GLIDE_INIT_HWC - if (bInfo->fifoInfo.agpFifo) { - gcFifo->fifoStart = (FxU32 *) bInfo->fifoInfo.agpVirtAddr; - gcFifo->fifoOffset = bInfo->fifoInfo.agpPhysAddr; - } else { -#else - { -#endif - gcFifo->fifoStart = gc->rawLfb + ( gcFifo->fifoOffset >> 2 ); - } - gcFifo->fifoEnd = gcFifo->fifoStart + ( gcFifo->fifoSize >> 2 ); - - /* Adjust room values. - ** RoomToEnd needs enough room for the jmp packet since we never - ** allow the hw to auto-wrap. RoomToRead needs to be adjusted so that - ** we never acutally write onto the read ptr. - ** - ** fifoRoom is generally the min of roomToEnd and roomToRead, but we - ** 'know' here that roomToRead < roomToEnd. - */ -#if USE_PACKET_FIFO - gcFifo->roomToEnd = gcFifo->fifoSize - FIFO_END_ADJUST; - gcFifo->fifoRoom = gcFifo->roomToReadPtr = gcFifo->roomToEnd - sizeof( FxU32 ); - - /* Set initial fifo state. hw read and sw write pointers at - * start of the fifo. - */ - gcFifo->fifoPtr = gcFifo->fifoStart; - gcFifo->fifoRead = HW_FIFO_PTR( FXTRUE ); -#endif /* !USE_PACKET_FIFO */ - -#ifndef __linux__ - if ( (void*)gcFifo->fifoPtr != (void*)gcFifo->fifoRead ) { -#ifdef GLIDE_INIT_HWC - hwcRestoreVideo( bInfo ); -#endif - GDBG_INFO( gc->myLevel, "Initial fifo state is incorrect\n" ); - return 0; - } -#endif /* defined(__linux__) */ - -#if __POWERPC__ && PCI_BUMP_N_GRIND - enableCopyBackCache((FxU32)gcFifo->fifoStart,gcFifo->fifoSize); -#endif - - if (!gc->cmdTransportInfo.autoBump) { - gcFifo->bumpSize = _GlideRoot.environment.bumpSize; - - gcFifo->lastBump = gcFifo->fifoPtr; - gcFifo->bumpPos = gcFifo->fifoPtr + gcFifo->bumpSize; -#if __POWERPC__ && PCI_BUMP_N_GRIND - gcFifo->fifoJmpHdr[0] = - ( SSTCP_PKT0_JMP_LOCAL | - ( gcFifo->fifoOffset << ( SSTCP_PKT0_ADDR_SHIFT - 2 ))); -#else - gcFifo->fifoJmpHdr[0] = - ( SSTCP_PKT0_JMP_AGP | - ( gcFifo->fifoOffset << ( SSTCP_PKT0_ADDR_SHIFT - 2 ))); - gcFifo->fifoJmpHdr[1] = (gcFifo->fifoOffset >> 25); #endif - } else { - gcFifo->fifoJmpHdr[0] = - ( SSTCP_PKT0_JMP_LOCAL | - ( gcFifo->fifoOffset << ( SSTCP_PKT0_ADDR_SHIFT - 2 ))); - - - } - - GDBG_INFO(80, "Command Fifo:\n" - "\tfifoStart: 0x%x\n" - "\tfifoEnd: 0x%x\n" - "\tfifoOffset: 0x%x\n" - "\tfifoSize: 0x%x\n" - "\tfifoPtr: 0x%x\n", - gcFifo->fifoStart, - gcFifo->fifoEnd, - gcFifo->fifoOffset, - gcFifo->fifoSize, - gcFifo->fifoPtr ); - -#ifdef __linux__ - _grImportFifo((AnyPtr)*driInfo.fifoPtr, (AnyPtr)*driInfo.fifoRead); -#endif - - /* The hw is now in a usable state from the fifo macros. - * - * NB: See the comment in fxglide.h for the difference between - * these flags. - */ - gc->open = FXTRUE; - - /* Setup the procs that we can do w/o any mode knowledge */ - gc->archDispatchProcs.texDownloadProcs = _GlideRoot.deviceArchProcs.curTexProcs; - gc->archDispatchProcs.drawTrianglesProc = _GlideRoot.deviceArchProcs.curDrawTrisProc; - - /* Default render procs to window space */ - gc->archDispatchProcs.coorModeTriVector = (*_GlideRoot.deviceArchProcs.curTriProcs) + GR_WINDOW_COORDS; - gc->archDispatchProcs.drawVertexList = _GlideRoot.deviceArchProcs.curVertexListProcs[GR_WINDOW_COORDS]; - - /*------------------------------------------------------ - GC Init - ------------------------------------------------------*/ - GDBG_INFO(gc->myLevel, " GC Init\n"); - initGC( gc ); - - gc->orgSW = gc->state.screen_width; - gc->orgSH = gc->state.screen_height; - - /*------------------------------------------------------ - 3D State Init - ------------------------------------------------------*/ - GDBG_INFO( gc->myLevel, " 3D State Init\n"); - - GDBG_INFO( gc->myLevel, " Setting default register states\n" ); - gc->state.shadow.fbzMode = ( SST_ENRECTCLIP | SST_ENZBIAS ); - - GDBG_INFO( gc->myLevel, " Setting up initial draw buffer state\n" ); - REG_GROUP_BEGIN(BROADCAST_ID, leftOverlayBuf, 1, 0x1); - REG_GROUP_SET(hw, leftOverlayBuf, gc->buffers0[gc->frontBuffer]); - REG_GROUP_END(); - - REG_GROUP_BEGIN(BROADCAST_ID, swapbufferCMD, 1, 0x1); - REG_GROUP_SET(hw, swapbufferCMD, 0x0); - REG_GROUP_END(); - - gc->state.shadow.colBufferAddr = gc->buffers0[gc->curBuffer]; - gc->state.shadow.colBufferStride = gc->strideInTiles | SST_BUFFER_MEMORY_TILED; - gc->state.shadow.auxBufferAddr = gc->buffers0[nColBuffers]; - gc->state.shadow.auxBufferStride = gc->strideInTiles | SST_BUFFER_MEMORY_TILED; - -#ifdef GLIDE_INIT_HWC - REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); - { - REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride); -#else /* defined(__linux__) */ - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); -#endif /* defined(__linux__) */ - REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr); - REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); - } - REG_GROUP_END(); -#else - /* enable all chip mask */ - - REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); - REG_GROUP_SET(hw, colBufferAddr, gc->buffers0[gc->curBuffer]); - REG_GROUP_SET(hw, colBufferStride, gc->state.screen_width*2 ); - REG_GROUP_SET(hw, auxBufferAddr, gc->buffers0[nColBuffers]); - REG_GROUP_SET(hw, auxBufferStride, gc->state.screen_width*2 ); - REG_GROUP_END(); - - if (_GlideRoot.environment.guardbandclipping) { - FxU32 renderMode = gc->state.shadow.renderMode; - - renderMode |= SST_RM_ENGUARDBAND; - REG_GROUP_BEGIN(BROADCAST_ID, renderMode, 0x1, 0x1); - REG_GROUP_SET(hw, renderMode, renderMode); - REG_GROUP_END(); - - gc->state.shadow.renderMode = renderMode; - } -#endif - - GDBG_INFO( gc->myLevel, " Setting all Glide state\n" ); - assertDefaultState(); -#ifdef __linux__ - if (nColBuffers>1) - grRenderBuffer(GR_BUFFER_BACKBUFFER); - else - grRenderBuffer(GR_BUFFER_FRONTBUFFER); - grClipWindow(0, 0, gc->state.screen_width, gc->state.screen_height); -#else /* defined(__linux__) */ - clearBuffers( gc ); -#endif /* defined(__linux__) */ - - /* tbext */ - gc->textureBuffer.init = FXFALSE; - gc->textureBuffer.on = FXFALSE; - gc->textureBuffer.addr = 0; - gc->textureBuffer.stride = 0; - gc->textureBuffer.prevState.valid = FXFALSE; - - /* The new splash know the color format so we move it above splash screen */ - gc->state.color_format = format; - - /* -------------------------------------------------------- - Splash Screen - --------------------------------------------------------*/ - doSplash(); - - gc->windowed = FXFALSE; - _GlideRoot.windowsInit++; /* to avoid race with grSstControl() */ - - retVal = (GrContext_t)gc; - - GR_END(); + return ( grSstWinOpenExt(hWnd, + resolution, + refresh, + format, + origin, + GR_PIXFMT_RGB_565, + nColBuffers, + nAuxBuffers) ); } - - return retVal; -#undef FN_NAME + + #undef FN_NAME } /* grSstWinOpen */ #ifdef FX_GLIDE_NAPALM @@ -2239,6 +1584,10 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, } #endif /* defined(__linux__) */ + + /* this is a stupid hack but... */ + gc->chipCount = 1; + if (IS_NAPALM(gc->bInfo->pciInfo.deviceID)) { /* I apologize for this hack: @@ -2246,8 +1595,9 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, * gc->chipCount was forced to one. * It should be restored before we try to use it. */ + gc->chipCount = gc->bInfo->pciInfo.numChips ; - + /* All this stuff lets Joe bag-o-donuts force old apps */ /* to render with 32bpp and AA modes. */ /* Bear in mind: it is silly to try to force 16bpp */ @@ -2255,23 +1605,34 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, /* apps Z or W values to fit in a 16 bit depth buffer. */ if (_GlideRoot.environment.outputBpp == 32 || pixelformat == GR_PIXFMT_ARGB_8888) { - if ((_GlideRoot.environment.aaSample == 4) && + if ((_GlideRoot.environment.aaSample == 8) && /* 8xaa */ + (gc->chipCount > 2)) + pixelformat = GR_PIXFMT_AA_8_ARGB_8888 ; + else if ((_GlideRoot.environment.aaSample == 4) && (gc->chipCount > 1)) pixelformat = GR_PIXFMT_AA_4_ARGB_8888 ; else if (_GlideRoot.environment.aaSample == 2) pixelformat = GR_PIXFMT_AA_2_ARGB_8888 ; else pixelformat = GR_PIXFMT_ARGB_8888 ; - } else if (_GlideRoot.environment.outputBpp == 15 || pixelformat == GR_PIXFMT_ARGB_1555) { - if ((_GlideRoot.environment.aaSample == 4) && + } + else if (_GlideRoot.environment.outputBpp == 15 || pixelformat == GR_PIXFMT_ARGB_1555) { + if ((_GlideRoot.environment.aaSample == 8) && /* 8xaa */ + (gc->chipCount > 2)) + pixelformat = GR_PIXFMT_AA_8_ARGB_1555 ; + else if ((_GlideRoot.environment.aaSample == 4) && (gc->chipCount > 1)) pixelformat = GR_PIXFMT_AA_4_ARGB_1555 ; else if (_GlideRoot.environment.aaSample == 2) pixelformat = GR_PIXFMT_AA_2_ARGB_1555 ; else pixelformat = GR_PIXFMT_ARGB_1555 ; - } else if (pixelformat == GR_PIXFMT_RGB_565) { - if ((_GlideRoot.environment.aaSample == 4) && + } + else if (pixelformat == GR_PIXFMT_RGB_565) { + if ((_GlideRoot.environment.aaSample == 8) && /* 8xaa */ + (gc->chipCount > 2)) + pixelformat = GR_PIXFMT_AA_8_RGB_565; + else if ((_GlideRoot.environment.aaSample == 4) && (gc->chipCount > 1)) pixelformat = GR_PIXFMT_AA_4_RGB_565 ; else @@ -2366,6 +1727,22 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, gc->grPixelSize = 4; hwPixelFormat = SST_OVERLAY_PIXEL_RGB32U; break; + case GR_PIXFMT_AA_8_RGB_565: /* 8xaa */ + gc->grPixelSample = 8; + gc->grPixelSize = 2; + hwPixelFormat = SST_OVERLAY_PIXEL_RGB565U; + break; + case GR_PIXFMT_AA_8_ARGB_1555: + gc->grPixelSample = 8; + gc->grPixelSize = 2; + hwPixelFormat = SST_OVERLAY_PIXEL_RGB1555U; + break; + case GR_PIXFMT_AA_8_ARGB_8888: + gc->grPixelSample = 8; + gc->grPixelSize = 4; + hwPixelFormat = SST_OVERLAY_PIXEL_RGB32U; + break; + default: gc->grPixelSample = 0; GDBG_INFO( gc->myLevel, "Unsupported Pixel Format = %d\n", pixelformat); @@ -2374,6 +1751,7 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, break; } +#if 0 /* Old Way */ gc->sliCount = gc->chipCount / ((gc->grPixelSample == 4) ? 2 : 1); /* Default for the SLI case... */ @@ -2409,18 +1787,151 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, } } +#else + + switch( gc->chipCount ) + { + case 4: + switch( gc->grPixelSample ) + { + case 8: + gc->sliCount = 1; + gc->grSamplesPerChip = 2; + break; + + case 4: + gc->sliCount = 1; /*no sli, 1 sample per chip */ + gc->grSamplesPerChip = 1; + break; + + case 2: + if(!_GlideRoot.environment.forceOldAA) { + gc->grSamplesPerChip = 1; //2 way SLI, 1 sample per SLI unit + gc->sliCount = 2; + /* In this mode I think the video filter still works... */ + if(hwPixelFormat == SST_OVERLAY_PIXEL_RGB1555U) { + hwPixelFormat = SST_OVERLAY_PIXEL_RGB1555D; + } + else if(hwPixelFormat == SST_OVERLAY_PIXEL_RGB565U) { + hwPixelFormat = SST_OVERLAY_PIXEL_RGB565D; + + } + } + else { + gc->grSamplesPerChip = 2; /* 4 way SLI, 2 samples per SLI unit */ + gc->sliCount = 4; /* doesn't work yet */ + } + + break; + + case 1: + gc->sliCount = 4; + gc->grSamplesPerChip = 1; + break; + } + break; + + case 2: + switch( gc->grPixelSample ) + { + case 4: + gc->sliCount = 1; + gc->grSamplesPerChip = 2; + break; + + case 2: + if(!_GlideRoot.environment.forceOldAA) { + gc->sliCount = 1; /* no sli, 1 sample per chip */ + gc->grSamplesPerChip = 1; + if(hwPixelFormat == SST_OVERLAY_PIXEL_RGB1555U) { + hwPixelFormat = SST_OVERLAY_PIXEL_RGB1555D; + } + else if(hwPixelFormat == SST_OVERLAY_PIXEL_RGB565U) { + hwPixelFormat = SST_OVERLAY_PIXEL_RGB565D; + } + } + else + { + gc->sliCount = 2; /* 2 samples per SLI pair */ + gc->grSamplesPerChip = 2; + } + + break; + + case 1: + gc->sliCount = 2; + gc->grSamplesPerChip = 1; + break; + } + break; + + + case 1: + switch( gc->grPixelSample ) + { + case 2: + gc->sliCount = 1; + gc->grSamplesPerChip = 2; + break; + + case 1: + gc->sliCount = 1; + gc->grSamplesPerChip = 1; + break; + } + break; + + + default: + gc->sliCount = 1; + gc->grSamplesPerChip = 1; + break; + + } + +#endif + /* Yeesh. */ gc->enableSecondaryBuffer = gc->grSamplesPerChip > 1 ? FXTRUE : FXFALSE; /* Precompute which table entries to use for per-chip primary and secondary AA offsets. */ - /* Index 0 - No AA + /* Index 0 - No AA * Index 1 - 2-sample AA, 2 samples per chip * Index 2 - 2-sample AA, 1 sample per chip - * Index 3 - 4-sample AA, 2 samples per chip + * Index 3 - 4-sample AA, 2 samples per chip + + * Index 4 - 2-sample AA, 2 samples per chip - correct values + * Index 5 - 2-sample AA, 1 sample per chip - correct values + * Index 6 - 4-sample AA, 2 samples per chip - correct values */ - gc->sampleOffsetIndex = gc->grPixelSample-1 + ((gc->grSamplesPerChip == 1) ? 1 : 0); +//adjust offset index for 4 chip cards + if( gc->chipCount == 4 ) + { + switch ( gc->grPixelSample ) + { + case 8: + gc->sampleOffsetIndex = 9; + break; + case 4: + gc->sampleOffsetIndex = 8; + break; + + case 2: + gc->sampleOffsetIndex = 7; + break; + } + } + else + { + gc->sampleOffsetIndex = gc->grPixelSample-1 + ((gc->grSamplesPerChip == 1) ? 1 : 0); + if (!GETENV("FX_GLIDE_AA_SAMPLE") && gc->sampleOffsetIndex) + gc->sampleOffsetIndex+=3; + + } + + if (gc->sliCount == 0) { GDBG_INFO( gc->myLevel, "Unsupported Pixel Format = %d\n", pixelformat); GDBG_INFO( gc->myLevel, "Number of chips = %d\n", gc->chipCount); @@ -2450,10 +1961,10 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, switch (gc->grSstRez) { case GR_RESOLUTION_1600x1024: - gc->bInfo->h3analogSli = 1 ; - gc->do2ppc = FXTRUE; - break ; + gc->do2ppc = FXTRUE; + break ; case GR_RESOLUTION_1600x1200: + break; case GR_RESOLUTION_1792x1344: case GR_RESOLUTION_1856x1392: case GR_RESOLUTION_1920x1440: @@ -2537,6 +2048,10 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, gc->chipCount = 1 ; } } + +//enable analog for 8xaa 4 chip cards + if( gc->chipCount == 4 ) + gc->bInfo->h3analogSli = 1 ; /* compute tile dimensions */ gc->strideInTiles = ( gc->state.screen_width * (gc->grPixelSize >> 1) + ( TILE_WIDTH_PXLS - 1 ) ) / TILE_WIDTH_PXLS; @@ -2562,7 +2077,10 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, FxU32 sliBandHeightInPixels; FxU32 numBands; - chipScreenHeight = gc->state.screen_height >> (gc->sliCount - 1); +// chipScreenHeight = gc->state.screen_height >> (gc->sliCount - 1); + + chipScreenHeight = gc->state.screen_height/gc->sliCount; + /* Find the biggest value that's still * divisible by a power of two. The check @@ -2582,7 +2100,8 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, /* Recompute buffer memory requirements */ sliBandHeightInPixels = 1L << gc->sliBandHeight; - chipScreenHeight = gc->state.screen_height >> (gc->sliCount - 1); +// chipScreenHeight = gc->state.screen_height >> (gc->sliCount - 1); + chipScreenHeight = gc->state.screen_height / gc->sliCount; GDBG_INFO(80, "%s: SLI band height in pixels: %d\n",FN_NAME, sliBandHeightInPixels); numBands = (chipScreenHeight + (sliBandHeightInPixels - 1)) / sliBandHeightInPixels; @@ -2649,13 +2168,15 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, gc->tex_ptr = (FxU32*)SST_TEX_ADDRESS(bInfo->regInfo.sstBase); #ifdef FX_GLIDE_NAPALM - if (gc->chipCount) { - FxU32 chip ; - for (chip = 0 ; - chip < gc->chipCount - 1 ; - chip++) { - gc->slaveSstRegs[chip] = (SstRegs *) bInfo->regInfo.slaveSstBase[chip] ; - gc->slaveCRegs[chip] = (SstCRegs *)bInfo->regInfo.slaveCmdBase[chip] ; + if (IS_NAPALM(gc->bInfo->pciInfo.deviceID)) { + if (gc->chipCount) { + FxU32 chip ; + for (chip = 0 ; + chip < gc->chipCount - 1 ; + chip++) { + gc->slaveSstRegs[chip] = (SstRegs *) bInfo->regInfo.slaveSstBase[chip] ; + gc->slaveCRegs[chip] = (SstCRegs *)bInfo->regInfo.slaveCmdBase[chip] ; + } } } #endif @@ -2859,9 +2380,11 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, gc->fbOffset = 0; gc->tmuMemInfo[0].tramOffset = (pixelformat == GR_PIXFMT_ARGB_8888) ? 0x400000 : 0x200000; - gc->tmuMemInfo[0].tramSize = 0x1600000; + gc->tmuMemInfo[0].tramSize = + (IS_NAPALM(gc->bInfo->pciInfo.deviceID)) ? 0x1600000 : 0x0200000; gc->tmuMemInfo[1].tramOffset = gc->tmuMemInfo[0].tramSize + gc->tmuMemInfo[0].tramOffset; - gc->tmuMemInfo[1].tramSize = 0x1600000; + gc->tmuMemInfo[1].tramSize = + (IS_NAPALM(gc->bInfo->pciInfo.deviceID)) ? 0x1600000 : 0x0200000; gc->tmu_state[0].total_mem = gc->tmuMemInfo[0].tramSize; gc->tmu_state[1].total_mem = gc->tmuMemInfo[1].tramSize; #endif @@ -3046,9 +2569,10 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, else { bInfo->h3Mem = 32; } - + bInfo->h3pixelSize = gc->grPixelSize; + bInfo->buffInfo.enable2ndbuffer = FXFALSE; if (gc->grPixelSample > 1) bInfo->buffInfo.enable2ndbuffer = FXTRUE; @@ -3276,12 +2800,7 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -3292,15 +2811,7 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->buffers1[gc->curBuffer] | SST_BUFFER_BASE_SELECT); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif - - - + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->buffers1[nColBuffers] | SST_BUFFER_BASE_SELECT); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -3361,12 +2872,7 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->state.shadow.colBufferAddr); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->state.shadow.auxBufferAddr); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -3375,12 +2881,7 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, REG_GROUP_BEGIN(BROADCAST_ID, colBufferAddr, 4, 0xf); { REG_GROUP_SET(hw, colBufferAddr, gc->buffers1[gc->curBuffer] | SST_BUFFER_BASE_SELECT); -#ifdef __linux__ - REG_GROUP_SET(hw, colBufferStride, (!gc->curBuffer) ? driInfo.stride : - gc->state.shadow.colBufferStride ); -#else - REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride ); -#endif + REG_GROUP_SET(hw, colBufferStride, gc->state.shadow.colBufferStride); REG_GROUP_SET(hw, auxBufferAddr, gc->buffers1[nColBuffers] | SST_BUFFER_BASE_SELECT); REG_GROUP_SET(hw, auxBufferStride, gc->state.shadow.auxBufferStride); } @@ -3390,8 +2891,9 @@ GR_EXT_ENTRY(grSstWinOpenExt, GrContext_t, ( FxU32 hWnd, */ { /* Anti-aliasing default perturbation values */ - FxU32 defaultXOffset[4] = {0x7a, 0x2, 0x7c, 0x4}; - FxU32 defaultYOffset[4] = {0x7b, 0x4, 0x3, 0x7d}; +//8xaa + FxU32 defaultXOffset[8];// = {0x7a, 0x2, 0x7c, 0x4}; + FxU32 defaultYOffset[8];// = {0x7b, 0x4, 0x3, 0x7d}; _grAAOffsetValue(defaultXOffset, defaultYOffset, 0, gc->chipCount - 1, FXTRUE, FXTRUE); } @@ -3483,6 +2985,15 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context)) if (!gc) return 0; + + /* If we are OpenGL, we need to release Exclusive mode so other + ** OpenGL fullscreen apps can run. If not, we will cause a lot + ** of problems. + */ + if (_GlideRoot.environment.is_opengl == FXTRUE) { + hwcRestoreVideo(gc->bInfo); + } + #ifndef __linux__ if (gc->lostContext) { if (*gc->lostContext) @@ -3592,7 +3103,24 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context)) #undef FN_NAME } /* grSstWinClose */ +/*------------------------------------------------------------------- + Function: grSetNumPendingBuffers + Date: 13-Oct-2000 + Implementor(s): mmcclure + Description: + + Allow the application to supply the number of pending buffers + Arguments: + + NumPendingBuffers - Sent to force number of pending buffers + + Return: + -------------------------------------------------------------------*/ +GR_DIENTRY(grSetNumPendingBuffers, void, (FxI32 NumPendingBuffers)) +{ + _GlideRoot.environment.swapPendingCount = NumPendingBuffers; +} /*------------------------------------------------------------------- Function: grSelectContext @@ -3918,8 +3446,14 @@ GR_ENTRY(guGammaCorrectionRGB, void, (float r, float g, float b)) ** Fifa99 calls this routine after they use grGlideShutdown. ** The game crashes here with a null gc. */ - if (gc) - hwcGammaRGB(gc->bInfo, r, g, b); + if (_GlideRoot.environment.useAppGamma) + { + if (gc) + hwcGammaRGB(gc->bInfo, r, g, b); + } + else + GDBG_INFO(69,"guGammaCorrectionRGB::hwcGammaRGB (%3.3f, %3.3f, %3.3f) call ignored\n", r,g,b); + #endif /* !GLIDE_INIT_HAL */ GR_END(); @@ -3947,7 +3481,10 @@ GR_DIENTRY(grLoadGammaTable, void, (FxU32 nentries, FxU32 *red, FxU32 *green, Fx nentries = max; #ifdef GLIDE_INIT_HWC - hwcGammaTable(gc->bInfo, nentries, red, green, blue); + if (_GlideRoot.environment.useAppGamma) + hwcGammaTable(gc->bInfo, nentries, red, green, blue); + else + GDBG_INFO(69, "grLoadGammaTable::hwcGammaRGB call ignored\n"); #endif GR_END(); @@ -3998,8 +3535,11 @@ GR_ENTRY(grGammaCorrectionValue, void, (float gamma)) fxHalInitGamma(hw, gamma); #else /* !GLIDE_INIT_HAL */ - hwcGamma(gc->bInfo, gamma, gamma, gamma); - + if (_GlideRoot.environment.useAppGamma) + hwcGamma(gc->bInfo, gamma, gamma, gamma); + else + GDBG_INFO(69,"grGammaCorrectionValue::hwcGammaRGB (gamma = %3.3f) call ignored\n", gamma); + #endif /* !GLIDE_INIT_HAL */ GR_END(); @@ -4203,10 +3743,11 @@ _grAAOffsetValue(FxU32 *xOffset, _grChipMask( 1 << chipIndex); - aaCtrl = (xOffset[(chipIndex * 2)%4] << SST_AA_CONTROL_PRIMARY_X_OFFSET_SHIFT) | - (yOffset[(chipIndex * 2)%4] << SST_AA_CONTROL_PRIMARY_Y_OFFSET_SHIFT) | - (xOffset[(chipIndex * 2 + 1)%4] << SST_AA_CONTROL_SECONDARY_X_OFFSET_SHIFT) | - (yOffset[(chipIndex * 2 + 1)%4] << SST_AA_CONTROL_SECONDARY_Y_OFFSET_SHIFT) | +//8xaa + aaCtrl = (xOffset[(chipIndex * 2)%8] << SST_AA_CONTROL_PRIMARY_X_OFFSET_SHIFT) | + (yOffset[(chipIndex * 2)%8] << SST_AA_CONTROL_PRIMARY_Y_OFFSET_SHIFT) | + (xOffset[(chipIndex * 2 + 1)%8] << SST_AA_CONTROL_SECONDARY_X_OFFSET_SHIFT) | + (yOffset[(chipIndex * 2 + 1)%8] << SST_AA_CONTROL_SECONDARY_Y_OFFSET_SHIFT) | ((enableSecondary) ? SST_AA_CONTROL_AA_ENABLE : 0) | ((enablePrimary) ? 0 : SST_AA_CONTROL_AA_DISABLE_FIRST); @@ -4241,7 +3782,15 @@ _grEnableSliCtrl(void) /* ** enable sli mode */ - sliChipCountDivisor = (gc->grPixelSample == 4) ? 2 : 1; + +//8xaa + if( gc-> chipCount == 2 ) + sliChipCountDivisor = (gc->grPixelSample == 4) ? 2 : 1; + + if( gc-> chipCount == 4 ) + sliChipCountDivisor = (gc->grPixelSample == 2) ? 2 : 1; + + renderMask = (gc->chipCount / sliChipCountDivisor - 1) << gc->sliBandHeight; scanMask = (1 << gc->sliBandHeight) - 1; log2chipCount = 0; @@ -4341,6 +3890,7 @@ _grRenderMode(FxU32 pixelformat) switch (pixelformat) { case GR_PIXFMT_AA_2_ARGB_1555: case GR_PIXFMT_AA_4_ARGB_1555: + case GR_PIXFMT_AA_8_ARGB_1555: /* 8xaa */ renderMode |= SST_RM_DITHER_ROTATION ; case GR_PIXFMT_ARGB_1555: renderMode |= SST_RM_15BPP; @@ -4348,6 +3898,7 @@ _grRenderMode(FxU32 pixelformat) case GR_PIXFMT_ARGB_8888: case GR_PIXFMT_AA_2_ARGB_8888: case GR_PIXFMT_AA_4_ARGB_8888: + case GR_PIXFMT_AA_8_ARGB_8888: /* 8xaa */ renderMode |= SST_RM_32BPP; grColorMaskExt(gc->state.stateArgs.grColorMaskExtArgs.r, gc->state.stateArgs.grColorMaskExtArgs.g, @@ -4356,6 +3907,7 @@ _grRenderMode(FxU32 pixelformat) break; case GR_PIXFMT_AA_2_RGB_565: case GR_PIXFMT_AA_4_RGB_565: + case GR_PIXFMT_AA_8_RGB_565: /* 8xaa */ renderMode |= SST_RM_DITHER_ROTATION ; default: renderMode |= SST_RM_16BPP; diff --git a/glide3x/h5/glide3/src/gsstdef.h b/glide3x/h5/glide3/src/gsstdef.h index 4db95db..4890e88 100644 --- a/glide3x/h5/glide3/src/gsstdef.h +++ b/glide3x/h5/glide3/src/gsstdef.h @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gstrip.c b/glide3x/h5/glide3/src/gstrip.c index 5361127..2e75c83 100644 --- a/glide3x/h5/glide3/src/gstrip.c +++ b/glide3x/h5/glide3/src/gstrip.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gstrip_ppc.c b/glide3x/h5/glide3/src/gstrip_ppc.c index 60f62ee..5cd3b14 100644 --- a/glide3x/h5/glide3/src/gstrip_ppc.c +++ b/glide3x/h5/glide3/src/gstrip_ppc.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gtex.c b/glide3x/h5/glide3/src/gtex.c index bea507e..26f654c 100644 --- a/glide3x/h5/glide3/src/gtex.c +++ b/glide3x/h5/glide3/src/gtex.c @@ -19,6 +19,13 @@ ** ** $Header$ ** $Log: +** 39 3dfx 1.34.1.0.1.211/14/00 Jonny Cochrane Implement multisample LOD +** Dithering for 2x and 4x FSAA modes +** 38 3dfx 1.34.1.0.1.110/11/00 Brent Forced check in to enforce +** branching. +** 37 3dfx 1.34.1.0.1.007/11/00 Adam Briggs fixed a state management +** bug where using the constant color extension was inadvertently turning on +** chroma range substitution ** 36 3dfx 1.34.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. @@ -1028,6 +1035,9 @@ GR_ENTRY(grTexClampMode, void, } else { INVALIDATE_TMU(tmu, textureMode); } + + if(MultitextureAndTrilinear()) g3LodBiasPerChip(); + GR_END(); #undef FN_NAME @@ -1797,6 +1807,15 @@ GR_EXT_ENTRY(grTexColorCombineExt, void, if(gc->state.tac_requires_constant_color[tmu] || gc->state.tcc_requires_constant_color[tmu]) combineMode |= SST_CM_DISABLE_CHROMA_SUBSTITUTION; + /* + * AJB- If we are either turning on or turning off constant color + * combining, validateState will need to swap the values in + * chromaRange & chromaKey. + */ + if ((combineMode & SST_CM_DISABLE_CHROMA_SUBSTITUTION) != + (gc->state.tmuShadow[tmu].combineMode & SST_CM_DISABLE_CHROMA_SUBSTITUTION)) + INVALIDATE_TMU(tmu, texchroma) ; + /* Update shadows */ INVALIDATE_TMU(tmu, textureMode); gc->state.tmuShadow[tmu].tLOD = tLod; @@ -2151,6 +2170,15 @@ GR_EXT_ENTRY(grTexAlphaCombineExt, void, if(gc->state.tac_requires_constant_color[tmu] || gc->state.tcc_requires_constant_color[tmu]) combineMode |= SST_CM_DISABLE_CHROMA_SUBSTITUTION; + /* + * AJB- If we are either turning on or turning off constant color + * combining, validateState will need to swap the values in + * chromaRange & chromaKey. + */ + if ((combineMode & SST_CM_DISABLE_CHROMA_SUBSTITUTION) != + (gc->state.tmuShadow[tmu].combineMode & SST_CM_DISABLE_CHROMA_SUBSTITUTION)) + INVALIDATE_TMU(tmu, texchroma) ; + /* Update shadows */ INVALIDATE_TMU(tmu, textureMode); gc->state.tmuShadow[tmu].tLOD = tLod; @@ -2180,6 +2208,12 @@ GR_EXT_ENTRY(grTexAlphaCombineExt, void, /*--------------------------------------------------------------------------- ** grConstantColorValueExt +** +** A sad, sad story: +** +** Whoever designed this api extension overlooked the fact that there are two +** constant color inputs into the color combiner where here we only set one. +** (actually we set them both to the same thing, but in effect we only set one). */ GR_EXT_ENTRY(grConstantColorValueExt, void, (GrChipID_t tmu, @@ -2260,6 +2294,7 @@ GR_ENTRY(grTexFilterMode, void, INVALIDATE_TMU(tmu, textureMode); } + GR_END(); #undef FN_NAME } /* grTexFilterMode */ @@ -2274,40 +2309,44 @@ GR_ENTRY(grTexLodBiasValue, void, #define FN_NAME "grTexLodBiasValue" FxU32 tLod; FxI32 lodBias; - + + GR_BEGIN_NOFIFOCHECK("grTexLodBiasValue",88); GDBG_INFO_MORE(gc->myLevel,"(%d,%g)\n",tmu,fvalue); GR_CHECK_TMU(FN_NAME, tmu); - tLod = gc->state.tmuShadow[tmu].tLOD; - tLod &= ~(SST_LODBIAS); - lodBias = _grTexFloatLODToFixedLOD(fvalue); - /* Sign extend it. */ - lodBias = ((lodBias << (32-6)) >> (32-6)); - lodBias += _GlideRoot.environment.lodBias; - if(lodBias > 0x1f) lodBias = 0x1f; - if(lodBias < -0x20) lodBias = -0x20; - /* Mask it back off. */ - lodBias &= 0x3f; - tLod |= lodBias << SST_LODBIAS_SHIFT; - gc->state.tmuShadow[tmu].tLOD = tLod; + tLod = gc->state.tmuShadow[tmu].tLOD; + tLod &= ~(SST_LODBIAS); + lodBias = _grTexFloatLODToFixedLOD(fvalue); + /* Sign extend it. */ + lodBias = ((lodBias << (32-6)) >> (32-6)); + lodBias += _GlideRoot.environment.lodBias; + if(lodBias > 0x1f) lodBias = 0x1f; + if(lodBias < -0x20) lodBias = -0x20; + /* Mask it back off. */ + lodBias &= 0x3f; + tLod |= lodBias << SST_LODBIAS_SHIFT; - /* Update real shadows and update hardware immediately if we can. */ - if(!gc->state.mode2ppc || (tmu == gc->state.mode2ppcTMU)) { - SstRegs* tmuHw = SST_TMU(hw, tmu); + gc->state.tmuShadow[tmu].tLOD = tLod; + + /* Update real shadows and update hardware immediately if we can. */ + if(!gc->state.mode2ppc || (tmu == gc->state.mode2ppcTMU)) { + SstRegs* tmuHw = SST_TMU(hw, tmu); - gc->state.shadow.tmuState[tmu].tLOD = tLod; - _grChipMask( SST_CHIP_MASK_ALL_CHIPS ); - REG_GROUP_BEGIN((0x02 << tmu), tLOD, 1, 0x1); - { - REG_GROUP_SET(tmuHw, tLOD, gc->state.shadow.tmuState[tmu].tLOD); - } - REG_GROUP_END(); - _grChipMask( gc->chipmask ); - } else { - INVALIDATE_TMU(tmu, textureMode); - } + gc->state.shadow.tmuState[tmu].tLOD = tLod; + _grChipMask( SST_CHIP_MASK_ALL_CHIPS ); + REG_GROUP_BEGIN((0x02 << tmu), tLOD, 1, 0x1); + { + REG_GROUP_SET(tmuHw, tLOD, gc->state.shadow.tmuState[tmu].tLOD); + } + REG_GROUP_END(); + _grChipMask( gc->chipmask ); + } else { + INVALIDATE_TMU(tmu, textureMode); + } + + if(MultitextureAndTrilinear()) g3LodBiasPerChip(); GR_END(); #undef FN_NAME @@ -2437,6 +2476,7 @@ GR_ENTRY(grTexMipMapMode, void, gc->state.tmuShadow[tmu].tLOD = tLod; gc->state.tmuShadow[tmu].textureMode = texMode; + /* Update real shadows and update hardware immediately if we can. */ if(!gc->state.mode2ppc || (tmu == gc->state.mode2ppcTMU)) { SstRegs* tmuHw = SST_TMU(hw, tmu); @@ -2459,6 +2499,9 @@ GR_ENTRY(grTexMipMapMode, void, INVALIDATE_TMU(tmu, textureMode); } + + + #if GLIDE_CHECK_TRILINEAR /* Make sure that the trilinear blending bits are set in a * consistent manner across the tmu's. This only really matters if @@ -2473,6 +2516,8 @@ GR_ENTRY(grTexMipMapMode, void, if (gc->num_tmu > 1) _grTexCheckTriLinear(tmu); #endif /* GLIDE_CHECK_TRILINEAR */ + if(MultitextureAndTrilinear()) g3LodBiasPerChip(); + GR_END(); #undef FN_NAME } /* grTexMipMapMode */ @@ -2841,6 +2886,9 @@ GR_ENTRY(grTexSource, void, break; } + + if(MultitextureAndTrilinear()) g3LodBiasPerChip(); + GR_END(); #undef FN_NAME } /* grTexSource */ @@ -2896,6 +2944,9 @@ GR_ENTRY(grTexMultibase, void, INVALIDATE_TMU(tmu, textureMode); } + + if(MultitextureAndTrilinear()) g3LodBiasPerChip(); + GR_END(); #undef FN_NAME } /* grTexMultibase */ @@ -3474,3 +3525,139 @@ _g3LodXlat(const GrLOD_t someLOD, const FxBool tBig) #undef FN_NAME } /* _g3LodXlat */ + +/*------------------------------------------------------------------- + Function: _g3LodBiasPerChip + + Date: 14-Nov-2000 + + Implementor: Jonny Cochrane + + Description: Sub sample LOD Dithering. Called if multitexturing and + trilinear filtereing and in NON SLI mode AND No. Units > 1 and + mipmap dithereing NOT requested from tools. + + Arguments: None + + Return: Yes + -------------------------------------------------------------------*/ +void g3LodBiasPerChip(void) +{ + #define FN_NAME "g3LodBiasPerChip" + + FxI32 lodBias, tLod, tmu; + int idx = 0; + unsigned int i; + + int chipLodBias[2][4] = // these values per Gary Tarolli + { + // 4.2 format for tLod register + // 0.00, 0.50, 0.00, 0.00 - 2 chip. last two values are not used + {0x00, 0x02, 0x00, 0x00}, + // 0.00, 0.25, 0.50, 0.75 - 4 chip. + {0x00, 0x01, 0x02, 0x03} + }; + + GR_BEGIN_NOFIFOCHECK("g3LodBiasPerChip", 88); + + tmu = 0; + idx = gc->chipCount > 2; + + if ((gc->sliCount > 1) || (_GlideRoot.environment.texLodDither)) goto FORGET_IT; + + for (i = 0; i < gc->chipCount; i++) + { + tLod = gc->state.tmuShadow[tmu].tLOD; + tLod &= ~(SST_LODBIAS); + lodBias = chipLodBias[idx][i]; + + if(lodBias > 0x1f) lodBias = 0x1f; + if(lodBias < -0x20) lodBias = -0x20; + /* Mask it back off. */ + lodBias &= 0x3f; + tLod |= lodBias << SST_LODBIAS_SHIFT; + + if(!gc->state.mode2ppc || (tmu == gc->state.mode2ppcTMU)) { + SstRegs* tmuHw = SST_TMU(hw, tmu); + _grChipMask( 1L << i ); + REG_GROUP_BEGIN((0x02 << tmu), tLOD, 1, 0x1); + { + REG_GROUP_SET(tmuHw, tLOD, tLod); + } + REG_GROUP_END(); + _grChipMask( gc->chipmask ); + } else { + INVALIDATE_TMU(tmu, textureMode); + } + + } + + tmu = 1; + + for (i = 0; i < gc->chipCount; i++) + { + tLod = gc->state.tmuShadow[tmu].tLOD; + tLod &= ~(SST_LODBIAS); + lodBias = chipLodBias[idx][i]; + + if(lodBias > 0x1f) lodBias = 0x1f; + if(lodBias < -0x20) lodBias = -0x20; + /* Mask it back off. */ + lodBias &= 0x3f; + tLod |= lodBias << SST_LODBIAS_SHIFT; + + if(!gc->state.mode2ppc || (tmu == gc->state.mode2ppcTMU)) { + SstRegs* tmuHw = SST_TMU(hw, tmu); + _grChipMask( 1L << i ); + REG_GROUP_BEGIN((0x02 << tmu), tLOD, 1, 0x1); + { + REG_GROUP_SET(tmuHw, tLOD, tLod); + } + REG_GROUP_END(); + _grChipMask( gc->chipmask ); + } else { + INVALIDATE_TMU(tmu, textureMode); + } + + } + +FORGET_IT: + GR_END(); +#undef FN_NAME +} + + +/*------------------------------------------------------------------- + Function: MultitextureAndTrilinear + + Date: 14-Nov-2000 + + Implementor: Jonny Cochrane + + Description: Determines if we are multitexturing and trilinear + filtering + + Arguments: None + + Return: BOOL + -------------------------------------------------------------------*/ +FxBool MultitextureAndTrilinear(void) +{ + + #define FN_NAME "MultitextureAndTrilinear" + + GR_DCL_GC; + + FxBool retval = FXFALSE; + + if( (gc->state.per_tmu[0].evenOdd == 3) && //both even and odd on each tmu + (gc->state.per_tmu[1].evenOdd == 3) && + (gc->state.tmuShadow[0].textureMode & (SST_TMINFILTER | SST_TMAGFILTER)) && //and bilinear for mag and min filter + (gc->state.tmuShadow[1].textureMode & (SST_TMINFILTER | SST_TMAGFILTER))) + { + retval = FXTRUE; + } + + return retval; +} + diff --git a/glide3x/h5/glide3/src/gtexdl.c b/glide3x/h5/glide3/src/gtexdl.c index 394b665..d3f963d 100644 --- a/glide3x/h5/glide3/src/gtexdl.c +++ b/glide3x/h5/glide3/src/gtexdl.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 11 3dfx 1.8.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 10 3dfx 1.8.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. @@ -29,7 +31,7 @@ ** 7 3dfx 1.6 01/31/00 Adam Briggs Changed all device ID magic ** numbers to use those defined in fxhal.h & added IS_NAPALM macro to test ** against device ID range -** 6 3dfx 1.5 01/20/00 Kenneth Dyke Fixed texture memory sanity +** 6 3dfx 1.5 01/19/00 Kenneth Dyke Fixed texture memory sanity ** check bug. ** 5 3dfx 1.4 10/27/99 Stephane Huaulme keeping the Mac compiler ** happy... diff --git a/glide3x/h5/glide3/src/gthread.c b/glide3x/h5/glide3/src/gthread.c index 93734fc..25ad002 100644 --- a/glide3x/h5/glide3/src/gthread.c +++ b/glide3x/h5/glide3/src/gthread.c @@ -1,21 +1,21 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE ** ** ** diff --git a/glide3x/h5/glide3/src/gu.c b/glide3x/h5/glide3/src/gu.c index ac52331..487d612 100644 --- a/glide3x/h5/glide3/src/gu.c +++ b/glide3x/h5/glide3/src/gu.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gxdraw.c b/glide3x/h5/glide3/src/gxdraw.c index d663068..b03346a 100644 --- a/glide3x/h5/glide3/src/gxdraw.c +++ b/glide3x/h5/glide3/src/gxdraw.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: + ** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce + ** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/gxdraw_ppc.c b/glide3x/h5/glide3/src/gxdraw_ppc.c index 9e31de4..13f819c 100644 --- a/glide3x/h5/glide3/src/gxdraw_ppc.c +++ b/glide3x/h5/glide3/src/gxdraw_ppc.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: + ** 3 3dfx 1.0.1.0.1.0 10/11/00 Brent Forced check in to enforce + ** branching. ** 2 3dfx 1.0.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. diff --git a/glide3x/h5/glide3/src/makefile.linux b/glide3x/h5/glide3/src/makefile.linux index 677f682..01735a7 100644 --- a/glide3x/h5/glide3/src/makefile.linux +++ b/glide3x/h5/glide3/src/makefile.linux @@ -5,7 +5,7 @@ # INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE # DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). # THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +# EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR # FULL TEXT OF THE NON-WARRANTY PROVISIONS. # # USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO @@ -276,15 +276,9 @@ ifneq ($(FX_GLIDE_CTRISETUP),1) gdraw.o: fxinline.h endif -# $(CPP) from 3dfx.linux.mak runs gcc/egcs which guesses at file types so run -# cpp directly. However, cpp can get confused by $__LINE__ which is needed -# to manipulate the __LINE__ macro as a literal number. So we pass -$ -# to disallow $ in identifiers to disambiguate the situation. Note that -# the makefile syntax requires $ to be escaped so we use $$ below. -# -PREPROCESSOR=/lib/cpp -$$ +PREPROCESSOR=cpp %.o: %.s - $(PREPROCESSOR) $(PREPROCESSOR_FLAGS) $< > $*.tmp.s + $(PREPROCESSOR) $< > $*.tmp.s $(CC) $(AFLAGS) -c -o $@ $*.tmp.s $(RM) -f $*.tmp.s @@ -294,35 +288,20 @@ xdraw3.o : xdraw3.s fxgasm.h # 3DNow!(tm) dependencies # XXX_def.obj targets are the default targets - ifneq ($(GL_AMD3D),) -# I have to copy the build rule from above, because the _def/_3dnow -# causes the object file names not to match up with the source file names. -# And I need to selectively enable the 3DNow flags. - xdraw2_def.o: xdraw2.s xdraw2.inc.s fxgasm.h - $(PREPROCESSOR) $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -c -o $@ xdraw2.s xdraw2_3dnow.o: xdraw2.s xdraw2.inc.s fxgasm.h - $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw2.s xdraw3_def.o: xdraw3.s fxgasm.h - $(PREPROCESSOR) $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -c -o $@ xdraw3.s xdraw3_3dnow.o: xdraw3.s fxgasm.h - $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xdraw3.s xtexdl_3dnow.o: xtexdl.s fxgasm.h - $(PREPROCESSOR) -DGL_AMD3D -DUSE_PACKET_FIFO=1 $< > $*.tmp.s - $(CC) $(AFLAGS) -c -o $@ $*.tmp.s - $(RM) -f $*.tmp.s + $(CC) $(AFLAGS) -DGL_AMD3D -DUSE_PACKET_FIFO=1 -c -o $@ xtexdl.s endif # GL_AMD3D diff --git a/glide3x/h5/glide3/src/ppcdraw2.s b/glide3x/h5/glide3/src/ppcdraw2.s index 9b2c65e..ff8c3e0 100644 --- a/glide3x/h5/glide3/src/ppcdraw2.s +++ b/glide3x/h5/glide3/src/ppcdraw2.s @@ -1,23 +1,23 @@ - -; THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL -; PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH -; TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF -; INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE -; DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). -; THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -; EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR -; FULL TEXT OF THE NON-WARRANTY PROVISIONS. ; -; USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T -; RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I -; TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 -; AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA -; SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O -; THE UNITED STATES. +; THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY +; PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT +; TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +; INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE +; DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). +; THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER +; EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +; FULL TEXT OF THE NON-WARRANTY PROVISIONS. +; +; USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO +; RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN +; TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, +; AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR +; SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +; THE UNITED STATES. +; +; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED ; -; COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE - - + MACRO MakeFunction &fnName EXPORT &fnName[DS] diff --git a/glide3x/h5/glide3/src/rcver.h b/glide3x/h5/glide3/src/rcver.h index 0d41257..3656699 100644 --- a/glide3x/h5/glide3/src/rcver.h +++ b/glide3x/h5/glide3/src/rcver.h @@ -1,31 +1,31 @@ /* -** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONLY -** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGHT -** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DFX +** THIS SOFTWARE IS SUBJECT TO COPYRIGHT PROTECTION AND IS OFFERED ONL +** PURSUANT TO THE 3DFX GLIDE GENERAL PUBLIC LICENSE. THERE IS NO RIGH +** TO USE THE GLIDE TRADEMARK WITHOUT PRIOR WRITTEN PERMISSION OF 3DF ** INTERACTIVE, INC. A COPY OF THIS LICENSE MAY BE OBTAINED FROM THE ** DISTRIBUTOR OR BY CONTACTING 3DFX INTERACTIVE INC(info@3dfx.com). ** THIS PROGRAM IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER -** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR A +** EXPRESSED OR IMPLIED. SEE THE 3DFX GLIDE GENERAL PUBLIC LICENSE FOR ** FULL TEXT OF THE NON-WARRANTY PROVISIONS. ** -** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT TO -** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS IN -** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013, -** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FAR -** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS OF +** USE, DUPLICATION OR DISCLOSURE BY THE GOVERNMENT IS SUBJECT T +** RESTRICTIONS AS SET FORTH IN SUBDIVISION (C)(1)(II) OF THE RIGHTS I +** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 252.227-7013 +** AND/OR IN SIMILAR OR SUCCESSOR CLAUSES IN THE FAR, DOD OR NASA FA +** SUPPLEMENT. UNPUBLISHED RIGHTS RESERVED UNDER THE COPYRIGHT LAWS O ** THE UNITED STATES. ** -** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED +** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVE */ #define MANVERSION 3 #define MANREVISION 10 #ifdef __WIN32__ -#define BUILD_NUMBER 0655 +#define BUILD_NUMBER 0658 #endif -#define VERSIONSTR "3.10.00.0655" +#define VERSIONSTR "3.10.00.0658" #if defined(__WIN32__) #define _TRADEMARK_ "(tm)" diff --git a/glide3x/h5/glide3/src/tv.h b/glide3x/h5/glide3/src/tv.h index b8411fd..df4b45c 100644 --- a/glide3x/h5/glide3/src/tv.h +++ b/glide3x/h5/glide3/src/tv.h @@ -20,12 +20,14 @@ ** $Revision$ ** $Date$ ** $Log: +** 4 3dfx 1.1.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 3 3dfx 1.1.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. ** 2 3dfx 1.1 09/24/99 Mark McMahon Fixed PRS 7906: ** Incorrect memory size reported by control panel in SLI mode -** 1 3dfx 1.0 09/12/99 StarTeam VTS Administrator +** 1 3dfx 1.0 09/11/99 StarTeam VTS Administrator ** $ // // 1 17/09/99 15:29 Mmcmahon diff --git a/glide3x/h5/glide3/src/xdraw2.inc.s b/glide3x/h5/glide3/src/xdraw2.inc.s index b5517fb..4b8f71b 100644 --- a/glide3x/h5/glide3/src/xdraw2.inc.s +++ b/glide3x/h5/glide3/src/xdraw2.inc.s @@ -16,13 +16,20 @@ ** THE UNITED STATES. ** ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED - */ + * /* -*-asm-*- */ /* $Header$ * /* $Revision$ * /* $Log$ +/* Revision 1.4 2000/11/15 23:32:54 joseph +/* Syncing up with 3dfx internal source repository. These changes contain a +/* number of bug fixes. +/* +/* Revision 1.2.2.1 2000/11/14 14:11:19 alanh +/* merge in trunk updates, fixup pci code, and fix texus2 code pointers. +/* /* Revision 1.3 2000/10/20 19:07:00 billwhite /* 1.) Added changes for AMD 3DNow instructions in h5/glide3 and /* h3/glide3. @@ -153,7 +160,7 @@ push %esi /* save caller's register variable */ push %ebx /* save caller's register variable */ - mov _gc-4(%esp) , gc + mov _gc(%esp) , gc mov _vb-4(%esp) , fb /* get base address of vertex B */ push %ebp /* save frame pointer */ diff --git a/glide3x/h5/glide3/src/xdraw2.lst b/glide3x/h5/glide3/src/xdraw2.lst index 9850d61..36a9790 100644 --- a/glide3x/h5/glide3/src/xdraw2.lst +++ b/glide3x/h5/glide3/src/xdraw2.lst @@ -1,4 +1,4 @@ -Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:57 +Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 xdraw2.asm Page 1 - 1 @@ -23,6 +23,10 @@ xdraw2.asm Page 1 - 1 ;; $Header$ ;; $Revision$ ;; $Log$ + ;; Revision 1.3 2000/11/15 23:32:54 joseph + ;; Syncing up with 3dfx internal source repository. These changes contain a + ;; number of bug fixes. + ;; ;; Revision 1.1 2000/06/15 00:27:43 joseph ;; Initial checkin into SourceForge. ;; @@ -111,6 +115,7 @@ xdraw2.asm Page 1 - 1 = 0078 C reg_ptr = 00000078h = 0080 C lfb_ptr = 00000080h = 01E0 C cull_mode = 000001e0h + = 96AC C checkPtr = 000096ach = 0124 C tsuDataList = 00000124h = 0DD8 C triPacketHdr = 00000dd8h = 0DDC C cullStripHdr = 00000ddch @@ -283,6 +288,10 @@ xdraw2.asm Page 1 - 1 C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -952,8 +961,8 @@ xdraw2.asm Page 1 - 1 C ;; either specialized or we thunk through to C ;; grDrawTriangles for the clipping etc. C IFDEF GLIDE_DEBUG - C xor eax, eax - C mov [eax], eax + 00000000 33 C0 C xor eax, eax + 00000002 89 00 C mov [eax], eax C ENDIF C ELSE C ;; Prologue stuff @@ -1221,7 +1230,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_nocull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_nocull_invalid@12> - 00000000 ALIGN 32 + 00000004 ALIGN 32 PUBLIC PROC_TYPE(clip_cull_invalid) PROC_TYPE(clip_cull_invalid) PROC NEAR 1 IFDEF GL_AMD3D @@ -1233,7 +1242,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_cull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_cull_invalid@12> - 00000000 GLIDE_VALIDATE_STATE textequ <1> + 00000020 GLIDE_VALIDATE_STATE textequ <1> GLIDE_CLIP_COORDS textequ <1> = 1 GLIDE_CULLING textequ <1> = 1 GLIDE_PACK_RGB textequ <0> @@ -1264,6 +1273,10 @@ xdraw2.asm Page 1 - 1 C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -1933,8 +1946,8 @@ xdraw2.asm Page 1 - 1 C ;; either specialized or we thunk through to C ;; grDrawTriangles for the clipping etc. C IFDEF GLIDE_DEBUG - C xor eax, eax - C mov [eax], eax + 00000020 33 C0 C xor eax, eax + 00000022 89 00 C mov [eax], eax C ENDIF C ELSE C ;; Prologue stuff @@ -2202,7 +2215,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_cull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_cull_invalid@12> - 00000000 ALIGN 32 + 00000024 ALIGN 32 PUBLIC PROC_TYPE(clip_cull_valid) PROC_TYPE(clip_cull_valid) PROC NEAR 1 IFDEF GL_AMD3D @@ -2214,7 +2227,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_cull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_cull_valid@12> - 00000000 GLIDE_VALIDATE_STATE textequ <0> + 00000040 GLIDE_VALIDATE_STATE textequ <0> GLIDE_CLIP_COORDS textequ <1> = 0 GLIDE_CULLING textequ <1> = 1 GLIDE_PACK_RGB textequ <0> @@ -2245,6 +2258,10 @@ xdraw2.asm Page 1 - 1 C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -2914,8 +2931,8 @@ xdraw2.asm Page 1 - 1 C ;; either specialized or we thunk through to C ;; grDrawTriangles for the clipping etc. C IFDEF GLIDE_DEBUG - C xor eax, eax - C mov [eax], eax + 00000040 33 C0 C xor eax, eax + 00000042 89 00 C mov [eax], eax C ENDIF C ELSE C ;; Prologue stuff @@ -3183,7 +3200,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_cull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_cull_valid@12> - 00000000 ALIGN 32 + 00000044 ALIGN 32 PUBLIC PROC_TYPE(clip_nocull_valid) PROC_TYPE(clip_nocull_valid) PROC NEAR 1 IFDEF GL_AMD3D @@ -3195,7 +3212,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_nocull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_nocull_valid@12> - 00000000 GLIDE_VALIDATE_STATE textequ <0> + 00000060 GLIDE_VALIDATE_STATE textequ <0> GLIDE_CLIP_COORDS textequ <1> = 0 GLIDE_CULLING textequ <0> = 1 GLIDE_PACK_RGB textequ <0> @@ -3226,6 +3243,10 @@ xdraw2.asm Page 1 - 1 C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -3895,8 +3916,8 @@ xdraw2.asm Page 1 - 1 C ;; either specialized or we thunk through to C ;; grDrawTriangles for the clipping etc. C IFDEF GLIDE_DEBUG - C xor eax, eax - C mov [eax], eax + 00000060 33 C0 C xor eax, eax + 00000062 89 00 C mov [eax], eax C ENDIF C ELSE C ;; Prologue stuff @@ -4164,7 +4185,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_clip_nocull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_clip_nocull_valid@12> - 00000000 ALIGN 32 + 00000064 ALIGN 32 PUBLIC PROC_TYPE(win_nocull_invalid) PROC_TYPE(win_nocull_invalid) PROC NEAR 1 IFDEF GL_AMD3D @@ -4176,7 +4197,7 @@ xdraw2.asm Page 1 - 1 1 EXITM <__trisetup_3DNow_win_nocull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_nocull_invalid@12> - 00000000 GLIDE_VALIDATE_STATE textequ <1> + 00000080 GLIDE_VALIDATE_STATE textequ <1> GLIDE_CLIP_COORDS textequ <0> = 1 GLIDE_CULLING textequ <0> = 0 GLIDE_PACK_RGB textequ <0> @@ -4207,6 +4228,10 @@ xdraw2.asm Page 1 - 1 C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -4881,11 +4906,11 @@ xdraw2.asm Page 1 - 1 C ENDIF C ELSE C ;; Prologue stuff - 00000000 56 C push esi - 00000001 57 C push edi + 00000080 56 C push esi + 00000081 57 C push edi C - 00000002 53 C push ebx - 00000003 55 C push ebp + 00000082 53 C push ebx + 00000083 55 C push ebp C C ;; call getThreadValueSLOW C ;; mov gc, eax @@ -4906,29 +4931,29 @@ xdraw2.asm Page 1 - 1 C add eax, DWORD PTR __GlideRoot + tlsOffset C mov gc, [eax] C ELSE - 00000004 8B F2 C mov gc, edx + 00000084 8B F2 C mov gc, edx C ENDIF C IFDEF GLIDE_ALT_TAB - 00000006 85 F6 C test gc, gc - 00000008 0F 84 000000DA C je __triDone - 0000000E 8B 96 000096C4 C mov edx, [gc + windowed] - 00000014 F7 C2 00000001 C test edx, 1 - 0000001A 75 14 C jnz pastContextTest ; - 0000001C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] - 00000022 8B 1A C mov ebx, [edx] - 00000024 F7 C3 00000001 C test ebx, 1 - 0000002A 0F 85 000000B8 C jnz __triDone - 00000030 C pastContextTest: + 00000086 85 F6 C test gc, gc + 00000088 0F 84 000000DA C je __triDone + 0000008E 8B 96 000096C4 C mov edx, [gc + windowed] + 00000094 F7 C2 00000001 C test edx, 1 + 0000009A 75 14 C jnz pastContextTest ; + 0000009C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] + 000000A2 8B 1A C mov ebx, [edx] + 000000A4 F7 C3 00000001 C test ebx, 1 + 000000AA 0F 85 000000B8 C jnz __triDone + 000000B0 C pastContextTest: C C ENDIF C align 4 C IF GLIDE_VALIDATE_STATE C ;;; GR_FLUSH_STATE() - 00000030 8B 96 00000B78 C mov edx, DWORD PTR [gc+invalid] - 00000036 85 D2 C test edx, edx - 00000038 74 05 C je SHORT no_validatioin - 0000003A E8 00000000 E C call __grValidateState - 0000003F C no_validatioin: + 000000B0 8B 96 00000B78 C mov edx, DWORD PTR [gc+invalid] + 000000B6 85 D2 C test edx, edx + 000000B8 74 05 C je SHORT no_validatioin + 000000BA E8 00000000 E C call __grValidateState + 000000BF C no_validatioin: C ENDIF C align 4 C IF GLIDE_CULLING @@ -5000,19 +5025,19 @@ xdraw2.asm Page 1 - 1 C align 4 C ;; Check to make sure that we have enough room for C ;; the complete triangle packet. - 00000040 8B 46 4C C mov eax, [gc + curTriSize] - 00000043 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] + 000000C0 8B 46 4C C mov eax, [gc + curTriSize] + 000000C3 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] C - 00000049 83 C0 04 C add eax, 4 - 0000004C 3B D8 C cmp ebx, eax + 000000C9 83 C0 04 C add eax, 4 + 000000CC 3B D8 C cmp ebx, eax C - 0000004E 7D 10 C jge __triBegin + 000000CE 7D 10 C jge __triBegin C - 00000050 68 00000338 C push @Line - 00000055 6A 00 C push 0h + 000000D0 68 00000338 C push @Line + 000000D5 6A 00 C push 0h C - 00000057 50 C push eax - 00000058 E8 00000000 E C call __grCommandTransportMakeRoom@12 + 000000D7 50 C push eax + 000000D8 E8 00000000 E C call __grCommandTransportMakeRoom@12 C C ;; Send triangle parameters C @@ -5051,12 +5076,12 @@ ENDM ; GR_FIFO_WRITE C nop C C GR_FIFO_WRITE fifo, 0, eax ; Write packet header to fifo - 00000060 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate - 00000060 8B AE 00000DE4 C - 00000066 B9 00000004 C align 32 + 000000E0 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate + 000000E0 8B AE 00000DE4 C + 000000E6 B9 00000004 C align 32 C __vertexStart: - 0000006B 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex - 00000071 90 C add fifo, 8 + 000000EB 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex + 000000F1 90 C add fifo, 8 C C nop ; Avoid p5 agi w/ load of vertex ptr 1C IFDEF HAL_CSIM @@ -5072,20 +5097,20 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000072 89 45 00 1C mov [fifo + 0], eax + 000000F2 89 45 00 1C mov [fifo + 0], eax 1C ENDIF - 00000075 83 C5 04 C nop + 000000F5 83 C5 04 C nop C C mov eax, DWORD PTR [vertex] ; X - 00000080 C lea dlp, [gc + tsuDataList] ; Reset the dataList - 00000080 8B 54 0C 10 C - 00000084 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X + 00000100 C lea dlp, [gc + tsuDataList] ; Reset the dataList + 00000100 8B 54 0C 10 C + 00000104 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X C mov eax, DWORD PTR [vertex + 4] ; Y - 00000087 90 C - 00000088 90 C xor packCol, packCol ; Clear packed color + 00000107 90 C + 00000108 90 C xor packCol, packCol ; Clear packed color C GR_FIFO_WRITE fifo, -4, eax ; PCI write Y - 00000089 8B 02 C - 0000008B 8D 9E 00000124 C __doParams: + 00000109 8B 02 C + 0000010B 8D 9E 00000124 C __doParams: C mov eax, DWORD PTR [dlp] ; Get first offset from the data list C add dlp, 4 ; dlp++ 1C IFDEF HAL_CSIM @@ -5101,11 +5126,11 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000091 89 45 F8 1C mov [fifo + -8], eax + 00000111 89 45 F8 1C mov [fifo + -8], eax 1C ENDIF - 00000094 8B 42 04 C + 00000114 8B 42 04 C C cmp eax, 0 ; Are we done? - 00000097 33 FF C je __nextVertex + 00000117 33 FF C je __nextVertex C 1C IFDEF HAL_CSIM 1C pushad @@ -5120,29 +5145,29 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000099 89 45 FC 1C mov [fifo + -4], eax + 00000119 89 45 FC 1C mov [fifo + -4], eax 1C ENDIF C ;; Not using align directive here because it sometimes - 0000009C C ;; introduces an agi for the eax use below. - 0000009C 8B 03 C nop - 0000009E 83 C3 04 C nop + 0000011C C ;; introduces an agi for the eax use below. + 0000011C 8B 03 C nop + 0000011E 83 C3 04 C nop C - 000000A1 83 F8 00 C __paramLoop: - 000000A4 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex + 00000121 83 F8 00 C __paramLoop: + 00000124 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex C add fifo, 4 ; fifoPtr += sizeof(FxU32) C C mov eax, DWORD PTR [dlp] ; offset = *(dlp + 1) - 000000A6 90 C add dlp, 4 ; dlp++ - 000000A7 90 C + 00000126 90 C add dlp, 4 ; dlp++ + 00000127 90 C C cmp eax, 0 ; Are we done? - 000000A8 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data - 000000A8 8B 3C 02 C - 000000AB 83 C5 04 C jne SHORT __paramLoop + 00000128 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data + 00000128 8B 3C 02 C + 0000012B 83 C5 04 C jne SHORT __paramLoop C - 000000AE 8B 03 C align 4 - 000000B0 83 C3 04 C __nextVertex: + 0000012E 8B 03 C align 4 + 00000130 83 C3 04 C __nextVertex: C ;; On to the next vertex - 000000B3 83 F8 00 C add vOffset, 4 + 00000133 83 F8 00 C add vOffset, 4 C 1C IFDEF HAL_CSIM 1C pushad @@ -5157,48 +5182,48 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 000000B6 89 7D FC 1C mov [fifo + -4], tempVal + 00000136 89 7D FC 1C mov [fifo + -4], tempVal 1C ENDIF C cmp vOffset, 16 ; Offset of one past last vertex? - 000000B9 75 ED C jne __vertexStart + 00000139 75 ED C jne __vertexStart C C ;; Update gc->fifoPtr and gc->fifoRoom - 000000BC C mov eax, fifo + 0000013C C mov eax, fifo C mov ebx, [gc + fifoPtr] - 000000BC 83 C1 04 C + 0000013C 83 C1 04 C C mov [gc + fifoPtr], fifo - 000000BF 83 F9 10 C sub eax, ebx - 000000C2 75 BC C + 0000013F 83 F9 10 C sub eax, ebx + 00000142 75 BC C C mov ebx, [gc + trisDrawn] ; _GlideRoot.stats.trisDrawn++; C sub [gc + fifoRoom], eax - 000000C4 8B C5 C - 000000C6 8B 9E 00000DE4 C add ebx, 1 + 00000144 8B C5 C + 00000146 8B 9E 00000DE4 C add ebx, 1 C mov [gc + trisDrawn], ebx - 000000CC 89 AE 00000DE4 C - 000000D2 2B C3 C ;; return 1 (triangle drawn) + 0000014C 89 AE 00000DE4 C + 00000152 2B C3 C ;; return 1 (triangle drawn) C mov eax, 1h - 000000D4 8B 5E 10 C - 000000D7 29 86 00000DEC C __triDone: + 00000154 8B 5E 10 C + 00000157 29 86 00000DEC C __triDone: C ;; Restore trashed registers - 000000DD 83 C3 01 C mov ecx, [gc + trisProcessed] - 000000E0 89 5E 10 C pop ebp + 0000015D 83 C3 01 C mov ecx, [gc + trisProcessed] + 00000160 89 5E 10 C pop ebp C C add ecx, 1 ; _GlideRoot.stats.trisProcessed++; - 000000E3 B8 00000001 C pop ebx + 00000163 B8 00000001 C pop ebx C - 000000E8 C pop edi + 00000168 C pop edi C mov [gc + trisProcessed], ecx - 000000E8 8B 4E 0C C - 000000EB 5D C pop esi + 00000168 8B 4E 0C C + 0000016B 5D C pop esi C ret 12 - 000000EC 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR - 000000EF 5B C ENDIF ; !GL_AMD3D + 0000016C 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR + 0000016F 5B C ENDIF ; !GL_AMD3D C - 000000F0 5F C - 000000F1 89 4E 0C C + 00000170 5F C + 00000171 89 4E 0C C C - 000000F4 5E C - 000000F5 C2 000C C + 00000174 5E C + 00000175 C2 000C C C C C @@ -5213,7 +5238,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_nocull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_nocull_invalid@12> - 000000F8 ALIGN 32 + 00000178 ALIGN 32 PUBLIC PROC_TYPE(win_cull_invalid) 1 IFDEF GL_AMD3D @@ -5226,7 +5251,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_cull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_cull_invalid@12> - 00000100 GLIDE_VALIDATE_STATE textequ <1> + 00000180 GLIDE_VALIDATE_STATE textequ <1> GLIDE_CLIP_COORDS textequ <0> = 1 GLIDE_CULLING textequ <1> = 0 GLIDE_PACK_RGB textequ <0> @@ -5257,6 +5282,10 @@ ENDM ; GR_FIFO_WRITE C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -5931,11 +5960,11 @@ ENDM ; GR_FIFO_WRITE C ENDIF C ELSE C ;; Prologue stuff - 00000100 56 C push esi - 00000101 57 C push edi + 00000180 56 C push esi + 00000181 57 C push edi C - 00000102 53 C push ebx - 00000103 55 C push ebp + 00000182 53 C push ebx + 00000183 55 C push ebp C C ;; call getThreadValueSLOW C ;; mov gc, eax @@ -5956,29 +5985,29 @@ ENDM ; GR_FIFO_WRITE C add eax, DWORD PTR __GlideRoot + tlsOffset C mov gc, [eax] C ELSE - 00000104 8B F2 C mov gc, edx + 00000184 8B F2 C mov gc, edx C ENDIF C IFDEF GLIDE_ALT_TAB - 00000106 85 F6 C test gc, gc - 00000108 0F 84 0000015A C je __triDone - 0000010E 8B 96 000096C4 C mov edx, [gc + windowed] - 00000114 F7 C2 00000001 C test edx, 1 - 0000011A 75 14 C jnz pastContextTest ; - 0000011C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] - 00000122 8B 1A C mov ebx, [edx] - 00000124 F7 C3 00000001 C test ebx, 1 - 0000012A 0F 85 00000138 C jnz __triDone - 00000130 C pastContextTest: + 00000186 85 F6 C test gc, gc + 00000188 0F 84 0000015A C je __triDone + 0000018E 8B 96 000096C4 C mov edx, [gc + windowed] + 00000194 F7 C2 00000001 C test edx, 1 + 0000019A 75 14 C jnz pastContextTest ; + 0000019C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] + 000001A2 8B 1A C mov ebx, [edx] + 000001A4 F7 C3 00000001 C test ebx, 1 + 000001AA 0F 85 00000138 C jnz __triDone + 000001B0 C pastContextTest: C C ENDIF C align 4 C IF GLIDE_VALIDATE_STATE C ;;; GR_FLUSH_STATE() - 00000130 8B 96 00000B78 C mov edx, DWORD PTR [gc+invalid] - 00000136 85 D2 C test edx, edx - 00000138 74 05 C je SHORT no_validatioin - 0000013A E8 00000000 E C call __grValidateState - 0000013F C no_validatioin: + 000001B0 8B 96 00000B78 C mov edx, DWORD PTR [gc+invalid] + 000001B6 85 D2 C test edx, edx + 000001B8 74 05 C je SHORT no_validatioin + 000001BA E8 00000000 E C call __grValidateState + 000001BF C no_validatioin: C ENDIF C align 4 C IF GLIDE_CULLING @@ -5996,73 +6025,73 @@ ENDM ; GR_FIFO_WRITE C C ;; Pre-load the current culling mode before all of the C ;; floating point area stuff. - 00000140 8B 44 24 14 C mov fa, [esp + _va$] - 00000144 8B 5C 24 18 C mov fb, [esp + _vb$] + 000001C0 8B 44 24 14 C mov fa, [esp + _va$] + 000001C4 8B 5C 24 18 C mov fb, [esp + _vb$] C - 00000148 8B 96 000001E0 C mov cull, [gc + cull_mode] - 0000014E 8B 4C 24 1C C mov fc, [esp + _vc$] + 000001C8 8B 96 000001E0 C mov cull, [gc + cull_mode] + 000001CE 8B 4C 24 1C C mov fc, [esp + _vc$] C - 00000152 85 D2 C test cull, cull - 00000154 74 53 C jz nocull + 000001D2 85 D2 C test cull, cull + 000001D4 74 53 C jz nocull C - 00000156 C1 E2 1F C shl cull, 31 ; culltest << 31 + 000001D6 C1 E2 1F C shl cull, 31 ; culltest << 31 C - 00000159 C Area_Computation: + 000001D9 C Area_Computation: C ; 47-3 C ; jmp ret_pop0f - 00000159 D9 00 C flds [fa + X] ; xa - 0000015B D8 23 C fsubs [fb + X] ; dxAB - 0000015D D9 03 C flds [fb + X] ; | xb - 0000015F D8 21 C fsubs [fc + X] ; | dxBC - 00000161 D9 43 04 C flds [fb + Y] ; | | yb - 00000164 D8 61 04 C fsubs [fc + Y] ; | | dyBC - 00000167 D9 40 04 C flds [fa + Y] ; | | | ya - 0000016A D8 63 04 C fsubs [fb + Y] ; | | | dyAB - 0000016D D9 C3 C fld st(3) ; | | | | dxAB - 0000016F D8 CA C fmul st, st(2) ; | | | | t0 t0=dxAB*dyBC - 00000171 D9 C3 C fld st(3) ; | | | | | dxBC - 00000173 D8 CA C fmul st, st(2) ; | | | | | t1 t1=dxBC*dyAB - 00000175 DE E9 C fsubp st(1),st ; | | | | area - 00000177 D9 15 00000004 R C fst zArea ; | | | | area + 000001D9 D9 00 C flds [fa + X] ; xa + 000001DB D8 23 C fsubs [fb + X] ; dxAB + 000001DD D9 03 C flds [fb + X] ; | xb + 000001DF D8 21 C fsubs [fc + X] ; | dxBC + 000001E1 D9 43 04 C flds [fb + Y] ; | | yb + 000001E4 D8 61 04 C fsubs [fc + Y] ; | | dyBC + 000001E7 D9 40 04 C flds [fa + Y] ; | | | ya + 000001EA D8 63 04 C fsubs [fb + Y] ; | | | dyAB + 000001ED D9 C3 C fld st(3) ; | | | | dxAB + 000001EF D8 CA C fmul st, st(2) ; | | | | t0 t0=dxAB*dyBC + 000001F1 D9 C3 C fld st(3) ; | | | | | dxBC + 000001F3 D8 CA C fmul st, st(2) ; | | | | | t1 t1=dxBC*dyAB + 000001F5 DE E9 C fsubp st(1),st ; | | | | area + 000001F7 D9 15 00000004 R C fst zArea ; | | | | area C C ;; Pop temp things from the sw culling off the fp stack - 0000017D DD D8 C fstp st(0) ; 4 - 0000017F DD D8 C fstp st(0) ; 3 - 00000181 DD D8 C fstp st(0) ; 2 - 00000183 DD D8 C fstp st(0) ; 1 - 00000185 DD D8 C fstp st(0) ; 0 + 000001FD DD D8 C fstp st(0) ; 4 + 000001FF DD D8 C fstp st(0) ; 3 + 00000201 DD D8 C fstp st(0) ; 2 + 00000203 DD D8 C fstp st(0) ; 1 + 00000205 DD D8 C fstp st(0) ; 0 C - 00000187 8B 2D 00000004 R C mov intArea, zArea ; j = *(long *)&area - 0000018D 33 C0 C xor eax, eax ; Clear the return value (0 == culled) + 00000207 8B 2D 00000004 R C mov intArea, zArea ; j = *(long *)&area + 0000020D 33 C0 C xor eax, eax ; Clear the return value (0 == culled) C C ; Zero Area Triangle Check - 0000018F 81 E5 7FFFFFFF C and intArea, 7fffffffh ; if ((j & 0x7FFFFFFF) == 0) - 00000195 0F 84 000000CD C jz __triDone + 0000020F 81 E5 7FFFFFFF C and intArea, 7fffffffh ; if ((j & 0x7FFFFFFF) == 0) + 00000215 0F 84 000000CD C jz __triDone C C ;; Triangle area check vs culling mode - 0000019B 8B 2D 00000004 R C mov intArea, zArea ; reload area just in case we're culling - 000001A1 33 EA C xor intArea, cull ; if (j ^ (culltest << 31)) + 0000021B 8B 2D 00000004 R C mov intArea, zArea ; reload area just in case we're culling + 00000221 33 EA C xor intArea, cull ; if (j ^ (culltest << 31)) C - 000001A3 0F 8D 000000BF C jge __triDone - 000001A9 C nocull: + 00000223 0F 8D 000000BF C jge __triDone + 00000229 C nocull: C ENDIF ; GLIDE_CULLING C C align 4 C ;; Check to make sure that we have enough room for C ;; the complete triangle packet. - 000001AC 8B 46 4C C mov eax, [gc + curTriSize] - 000001AF 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] + 0000022C 8B 46 4C C mov eax, [gc + curTriSize] + 0000022F 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] C - 000001B5 83 C0 04 C add eax, 4 - 000001B8 3B D8 C cmp ebx, eax + 00000235 83 C0 04 C add eax, 4 + 00000238 3B D8 C cmp ebx, eax C - 000001BA 7D 24 C jge __triBegin + 0000023A 7D 24 C jge __triBegin C - 000001BC 68 00000338 C push @Line - 000001C1 6A 00 C push 0h + 0000023C 68 00000338 C push @Line + 00000241 6A 00 C push 0h C - 000001C3 50 C push eax - 000001C4 E8 00000000 E C call __grCommandTransportMakeRoom@12 + 00000243 50 C push eax + 00000244 E8 00000000 E C call __grCommandTransportMakeRoom@12 C C ;; Send triangle parameters C @@ -6101,12 +6130,12 @@ ENDM ; GR_FIFO_WRITE C nop C C GR_FIFO_WRITE fifo, 0, eax ; Write packet header to fifo - 000001E0 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate - 000001E0 8B AE 00000DE4 C - 000001E6 B9 00000004 C align 32 + 00000260 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate + 00000260 8B AE 00000DE4 C + 00000266 B9 00000004 C align 32 C __vertexStart: - 000001EB 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex - 000001F1 90 C add fifo, 8 + 0000026B 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex + 00000271 90 C add fifo, 8 C C nop ; Avoid p5 agi w/ load of vertex ptr 1C IFDEF HAL_CSIM @@ -6122,20 +6151,20 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 000001F2 89 45 00 1C mov [fifo + 0], eax + 00000272 89 45 00 1C mov [fifo + 0], eax 1C ENDIF - 000001F5 83 C5 04 C nop + 00000275 83 C5 04 C nop C C mov eax, DWORD PTR [vertex] ; X - 00000200 C lea dlp, [gc + tsuDataList] ; Reset the dataList - 00000200 8B 54 0C 10 C - 00000204 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X + 00000280 C lea dlp, [gc + tsuDataList] ; Reset the dataList + 00000280 8B 54 0C 10 C + 00000284 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X C mov eax, DWORD PTR [vertex + 4] ; Y - 00000207 90 C - 00000208 90 C xor packCol, packCol ; Clear packed color + 00000287 90 C + 00000288 90 C xor packCol, packCol ; Clear packed color C GR_FIFO_WRITE fifo, -4, eax ; PCI write Y - 00000209 8B 02 C - 0000020B 8D 9E 00000124 C __doParams: + 00000289 8B 02 C + 0000028B 8D 9E 00000124 C __doParams: C mov eax, DWORD PTR [dlp] ; Get first offset from the data list C add dlp, 4 ; dlp++ 1C IFDEF HAL_CSIM @@ -6151,11 +6180,11 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000211 89 45 F8 1C mov [fifo + -8], eax + 00000291 89 45 F8 1C mov [fifo + -8], eax 1C ENDIF - 00000214 8B 42 04 C + 00000294 8B 42 04 C C cmp eax, 0 ; Are we done? - 00000217 33 FF C je __nextVertex + 00000297 33 FF C je __nextVertex C 1C IFDEF HAL_CSIM 1C pushad @@ -6170,29 +6199,29 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000219 89 45 FC 1C mov [fifo + -4], eax + 00000299 89 45 FC 1C mov [fifo + -4], eax 1C ENDIF C ;; Not using align directive here because it sometimes - 0000021C C ;; introduces an agi for the eax use below. - 0000021C 8B 03 C nop - 0000021E 83 C3 04 C nop + 0000029C C ;; introduces an agi for the eax use below. + 0000029C 8B 03 C nop + 0000029E 83 C3 04 C nop C - 00000221 83 F8 00 C __paramLoop: - 00000224 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex + 000002A1 83 F8 00 C __paramLoop: + 000002A4 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex C add fifo, 4 ; fifoPtr += sizeof(FxU32) C C mov eax, DWORD PTR [dlp] ; offset = *(dlp + 1) - 00000226 90 C add dlp, 4 ; dlp++ - 00000227 90 C + 000002A6 90 C add dlp, 4 ; dlp++ + 000002A7 90 C C cmp eax, 0 ; Are we done? - 00000228 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data - 00000228 8B 3C 02 C - 0000022B 83 C5 04 C jne SHORT __paramLoop + 000002A8 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data + 000002A8 8B 3C 02 C + 000002AB 83 C5 04 C jne SHORT __paramLoop C - 0000022E 8B 03 C align 4 - 00000230 83 C3 04 C __nextVertex: + 000002AE 8B 03 C align 4 + 000002B0 83 C3 04 C __nextVertex: C ;; On to the next vertex - 00000233 83 F8 00 C add vOffset, 4 + 000002B3 83 F8 00 C add vOffset, 4 C 1C IFDEF HAL_CSIM 1C pushad @@ -6207,48 +6236,48 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000236 89 7D FC 1C mov [fifo + -4], tempVal + 000002B6 89 7D FC 1C mov [fifo + -4], tempVal 1C ENDIF C cmp vOffset, 16 ; Offset of one past last vertex? - 00000239 75 ED C jne __vertexStart + 000002B9 75 ED C jne __vertexStart C C ;; Update gc->fifoPtr and gc->fifoRoom - 0000023C C mov eax, fifo + 000002BC C mov eax, fifo C mov ebx, [gc + fifoPtr] - 0000023C 83 C1 04 C + 000002BC 83 C1 04 C C mov [gc + fifoPtr], fifo - 0000023F 83 F9 10 C sub eax, ebx - 00000242 75 BC C + 000002BF 83 F9 10 C sub eax, ebx + 000002C2 75 BC C C mov ebx, [gc + trisDrawn] ; _GlideRoot.stats.trisDrawn++; C sub [gc + fifoRoom], eax - 00000244 8B C5 C - 00000246 8B 9E 00000DE4 C add ebx, 1 + 000002C4 8B C5 C + 000002C6 8B 9E 00000DE4 C add ebx, 1 C mov [gc + trisDrawn], ebx - 0000024C 89 AE 00000DE4 C - 00000252 2B C3 C ;; return 1 (triangle drawn) + 000002CC 89 AE 00000DE4 C + 000002D2 2B C3 C ;; return 1 (triangle drawn) C mov eax, 1h - 00000254 8B 5E 10 C - 00000257 29 86 00000DEC C __triDone: + 000002D4 8B 5E 10 C + 000002D7 29 86 00000DEC C __triDone: C ;; Restore trashed registers - 0000025D 83 C3 01 C mov ecx, [gc + trisProcessed] - 00000260 89 5E 10 C pop ebp + 000002DD 83 C3 01 C mov ecx, [gc + trisProcessed] + 000002E0 89 5E 10 C pop ebp C C add ecx, 1 ; _GlideRoot.stats.trisProcessed++; - 00000263 B8 00000001 C pop ebx + 000002E3 B8 00000001 C pop ebx C - 00000268 C pop edi + 000002E8 C pop edi C mov [gc + trisProcessed], ecx - 00000268 8B 4E 0C C - 0000026B 5D C pop esi + 000002E8 8B 4E 0C C + 000002EB 5D C pop esi C ret 12 - 0000026C 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR - 0000026F 5B C ENDIF ; !GL_AMD3D + 000002EC 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR + 000002EF 5B C ENDIF ; !GL_AMD3D C - 00000270 5F C - 00000271 89 4E 0C C + 000002F0 5F C + 000002F1 89 4E 0C C C - 00000274 5E C - 00000275 C2 000C C + 000002F4 5E C + 000002F5 C2 000C C C C C @@ -6263,7 +6292,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_cull_invalid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_cull_invalid@12> - 00000278 ALIGN 32 + 000002F8 ALIGN 32 PUBLIC PROC_TYPE(win_cull_valid) PROC_TYPE(win_cull_valid) PROC NEAR 1 IFDEF GL_AMD3D @@ -6275,7 +6304,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_cull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_cull_valid@12> - 00000280 GLIDE_VALIDATE_STATE textequ <0> + 00000300 GLIDE_VALIDATE_STATE textequ <0> GLIDE_CLIP_COORDS textequ <0> = 0 GLIDE_CULLING textequ <1> = 0 GLIDE_PACK_RGB textequ <0> @@ -6306,6 +6335,10 @@ ENDM ; GR_FIFO_WRITE C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -6980,11 +7013,11 @@ ENDM ; GR_FIFO_WRITE C ENDIF C ELSE C ;; Prologue stuff - 00000280 56 C push esi - 00000281 57 C push edi + 00000300 56 C push esi + 00000301 57 C push edi C - 00000282 53 C push ebx - 00000283 55 C push ebp + 00000302 53 C push ebx + 00000303 55 C push ebp C C ;; call getThreadValueSLOW C ;; mov gc, eax @@ -7005,19 +7038,19 @@ ENDM ; GR_FIFO_WRITE C add eax, DWORD PTR __GlideRoot + tlsOffset C mov gc, [eax] C ELSE - 00000284 8B F2 C mov gc, edx + 00000304 8B F2 C mov gc, edx C ENDIF C IFDEF GLIDE_ALT_TAB - 00000286 85 F6 C test gc, gc - 00000288 0F 84 0000013A C je __triDone - 0000028E 8B 96 000096C4 C mov edx, [gc + windowed] - 00000294 F7 C2 00000001 C test edx, 1 - 0000029A 75 14 C jnz pastContextTest ; - 0000029C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] - 000002A2 8B 1A C mov ebx, [edx] - 000002A4 F7 C3 00000001 C test ebx, 1 - 000002AA 0F 85 00000118 C jnz __triDone - 000002B0 C pastContextTest: + 00000306 85 F6 C test gc, gc + 00000308 0F 84 0000013A C je __triDone + 0000030E 8B 96 000096C4 C mov edx, [gc + windowed] + 00000314 F7 C2 00000001 C test edx, 1 + 0000031A 75 14 C jnz pastContextTest ; + 0000031C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] + 00000322 8B 1A C mov ebx, [edx] + 00000324 F7 C3 00000001 C test ebx, 1 + 0000032A 0F 85 00000118 C jnz __triDone + 00000330 C pastContextTest: C C ENDIF C align 4 @@ -7045,73 +7078,73 @@ ENDM ; GR_FIFO_WRITE C C ;; Pre-load the current culling mode before all of the C ;; floating point area stuff. - 000002B0 8B 44 24 14 C mov fa, [esp + _va$] - 000002B4 8B 5C 24 18 C mov fb, [esp + _vb$] + 00000330 8B 44 24 14 C mov fa, [esp + _va$] + 00000334 8B 5C 24 18 C mov fb, [esp + _vb$] C - 000002B8 8B 96 000001E0 C mov cull, [gc + cull_mode] - 000002BE 8B 4C 24 1C C mov fc, [esp + _vc$] + 00000338 8B 96 000001E0 C mov cull, [gc + cull_mode] + 0000033E 8B 4C 24 1C C mov fc, [esp + _vc$] C - 000002C2 85 D2 C test cull, cull - 000002C4 74 53 C jz nocull + 00000342 85 D2 C test cull, cull + 00000344 74 53 C jz nocull C - 000002C6 C1 E2 1F C shl cull, 31 ; culltest << 31 + 00000346 C1 E2 1F C shl cull, 31 ; culltest << 31 C - 000002C9 C Area_Computation: + 00000349 C Area_Computation: C ; 47-3 C ; jmp ret_pop0f - 000002C9 D9 00 C flds [fa + X] ; xa - 000002CB D8 23 C fsubs [fb + X] ; dxAB - 000002CD D9 03 C flds [fb + X] ; | xb - 000002CF D8 21 C fsubs [fc + X] ; | dxBC - 000002D1 D9 43 04 C flds [fb + Y] ; | | yb - 000002D4 D8 61 04 C fsubs [fc + Y] ; | | dyBC - 000002D7 D9 40 04 C flds [fa + Y] ; | | | ya - 000002DA D8 63 04 C fsubs [fb + Y] ; | | | dyAB - 000002DD D9 C3 C fld st(3) ; | | | | dxAB - 000002DF D8 CA C fmul st, st(2) ; | | | | t0 t0=dxAB*dyBC - 000002E1 D9 C3 C fld st(3) ; | | | | | dxBC - 000002E3 D8 CA C fmul st, st(2) ; | | | | | t1 t1=dxBC*dyAB - 000002E5 DE E9 C fsubp st(1),st ; | | | | area - 000002E7 D9 15 00000004 R C fst zArea ; | | | | area + 00000349 D9 00 C flds [fa + X] ; xa + 0000034B D8 23 C fsubs [fb + X] ; dxAB + 0000034D D9 03 C flds [fb + X] ; | xb + 0000034F D8 21 C fsubs [fc + X] ; | dxBC + 00000351 D9 43 04 C flds [fb + Y] ; | | yb + 00000354 D8 61 04 C fsubs [fc + Y] ; | | dyBC + 00000357 D9 40 04 C flds [fa + Y] ; | | | ya + 0000035A D8 63 04 C fsubs [fb + Y] ; | | | dyAB + 0000035D D9 C3 C fld st(3) ; | | | | dxAB + 0000035F D8 CA C fmul st, st(2) ; | | | | t0 t0=dxAB*dyBC + 00000361 D9 C3 C fld st(3) ; | | | | | dxBC + 00000363 D8 CA C fmul st, st(2) ; | | | | | t1 t1=dxBC*dyAB + 00000365 DE E9 C fsubp st(1),st ; | | | | area + 00000367 D9 15 00000004 R C fst zArea ; | | | | area C C ;; Pop temp things from the sw culling off the fp stack - 000002ED DD D8 C fstp st(0) ; 4 - 000002EF DD D8 C fstp st(0) ; 3 - 000002F1 DD D8 C fstp st(0) ; 2 - 000002F3 DD D8 C fstp st(0) ; 1 - 000002F5 DD D8 C fstp st(0) ; 0 + 0000036D DD D8 C fstp st(0) ; 4 + 0000036F DD D8 C fstp st(0) ; 3 + 00000371 DD D8 C fstp st(0) ; 2 + 00000373 DD D8 C fstp st(0) ; 1 + 00000375 DD D8 C fstp st(0) ; 0 C - 000002F7 8B 2D 00000004 R C mov intArea, zArea ; j = *(long *)&area - 000002FD 33 C0 C xor eax, eax ; Clear the return value (0 == culled) + 00000377 8B 2D 00000004 R C mov intArea, zArea ; j = *(long *)&area + 0000037D 33 C0 C xor eax, eax ; Clear the return value (0 == culled) C C ; Zero Area Triangle Check - 000002FF 81 E5 7FFFFFFF C and intArea, 7fffffffh ; if ((j & 0x7FFFFFFF) == 0) - 00000305 0F 84 000000BD C jz __triDone + 0000037F 81 E5 7FFFFFFF C and intArea, 7fffffffh ; if ((j & 0x7FFFFFFF) == 0) + 00000385 0F 84 000000BD C jz __triDone C C ;; Triangle area check vs culling mode - 0000030B 8B 2D 00000004 R C mov intArea, zArea ; reload area just in case we're culling - 00000311 33 EA C xor intArea, cull ; if (j ^ (culltest << 31)) + 0000038B 8B 2D 00000004 R C mov intArea, zArea ; reload area just in case we're culling + 00000391 33 EA C xor intArea, cull ; if (j ^ (culltest << 31)) C - 00000313 0F 8D 000000AF C jge __triDone - 00000319 C nocull: + 00000393 0F 8D 000000AF C jge __triDone + 00000399 C nocull: C ENDIF ; GLIDE_CULLING C C align 4 C ;; Check to make sure that we have enough room for C ;; the complete triangle packet. - 0000031C 8B 46 4C C mov eax, [gc + curTriSize] - 0000031F 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] + 0000039C 8B 46 4C C mov eax, [gc + curTriSize] + 0000039F 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] C - 00000325 83 C0 04 C add eax, 4 - 00000328 3B D8 C cmp ebx, eax + 000003A5 83 C0 04 C add eax, 4 + 000003A8 3B D8 C cmp ebx, eax C - 0000032A 7D 14 C jge __triBegin + 000003AA 7D 14 C jge __triBegin C - 0000032C 68 00000338 C push @Line - 00000331 6A 00 C push 0h + 000003AC 68 00000338 C push @Line + 000003B1 6A 00 C push 0h C - 00000333 50 C push eax - 00000334 E8 00000000 E C call __grCommandTransportMakeRoom@12 + 000003B3 50 C push eax + 000003B4 E8 00000000 E C call __grCommandTransportMakeRoom@12 C C ;; Send triangle parameters C @@ -7150,12 +7183,12 @@ ENDM ; GR_FIFO_WRITE C nop C C GR_FIFO_WRITE fifo, 0, eax ; Write packet header to fifo - 00000340 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate - 00000340 8B AE 00000DE4 C - 00000346 B9 00000004 C align 32 + 000003C0 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate + 000003C0 8B AE 00000DE4 C + 000003C6 B9 00000004 C align 32 C __vertexStart: - 0000034B 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex - 00000351 90 C add fifo, 8 + 000003CB 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex + 000003D1 90 C add fifo, 8 C C nop ; Avoid p5 agi w/ load of vertex ptr 1C IFDEF HAL_CSIM @@ -7171,20 +7204,20 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000352 89 45 00 1C mov [fifo + 0], eax + 000003D2 89 45 00 1C mov [fifo + 0], eax 1C ENDIF - 00000355 83 C5 04 C nop + 000003D5 83 C5 04 C nop C C mov eax, DWORD PTR [vertex] ; X - 00000360 C lea dlp, [gc + tsuDataList] ; Reset the dataList - 00000360 8B 54 0C 10 C - 00000364 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X + 000003E0 C lea dlp, [gc + tsuDataList] ; Reset the dataList + 000003E0 8B 54 0C 10 C + 000003E4 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X C mov eax, DWORD PTR [vertex + 4] ; Y - 00000367 90 C - 00000368 90 C xor packCol, packCol ; Clear packed color + 000003E7 90 C + 000003E8 90 C xor packCol, packCol ; Clear packed color C GR_FIFO_WRITE fifo, -4, eax ; PCI write Y - 00000369 8B 02 C - 0000036B 8D 9E 00000124 C __doParams: + 000003E9 8B 02 C + 000003EB 8D 9E 00000124 C __doParams: C mov eax, DWORD PTR [dlp] ; Get first offset from the data list C add dlp, 4 ; dlp++ 1C IFDEF HAL_CSIM @@ -7200,11 +7233,11 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000371 89 45 F8 1C mov [fifo + -8], eax + 000003F1 89 45 F8 1C mov [fifo + -8], eax 1C ENDIF - 00000374 8B 42 04 C + 000003F4 8B 42 04 C C cmp eax, 0 ; Are we done? - 00000377 33 FF C je __nextVertex + 000003F7 33 FF C je __nextVertex C 1C IFDEF HAL_CSIM 1C pushad @@ -7219,29 +7252,29 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000379 89 45 FC 1C mov [fifo + -4], eax + 000003F9 89 45 FC 1C mov [fifo + -4], eax 1C ENDIF C ;; Not using align directive here because it sometimes - 0000037C C ;; introduces an agi for the eax use below. - 0000037C 8B 03 C nop - 0000037E 83 C3 04 C nop + 000003FC C ;; introduces an agi for the eax use below. + 000003FC 8B 03 C nop + 000003FE 83 C3 04 C nop C - 00000381 83 F8 00 C __paramLoop: - 00000384 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex + 00000401 83 F8 00 C __paramLoop: + 00000404 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex C add fifo, 4 ; fifoPtr += sizeof(FxU32) C C mov eax, DWORD PTR [dlp] ; offset = *(dlp + 1) - 00000386 90 C add dlp, 4 ; dlp++ - 00000387 90 C + 00000406 90 C add dlp, 4 ; dlp++ + 00000407 90 C C cmp eax, 0 ; Are we done? - 00000388 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data - 00000388 8B 3C 02 C - 0000038B 83 C5 04 C jne SHORT __paramLoop + 00000408 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data + 00000408 8B 3C 02 C + 0000040B 83 C5 04 C jne SHORT __paramLoop C - 0000038E 8B 03 C align 4 - 00000390 83 C3 04 C __nextVertex: + 0000040E 8B 03 C align 4 + 00000410 83 C3 04 C __nextVertex: C ;; On to the next vertex - 00000393 83 F8 00 C add vOffset, 4 + 00000413 83 F8 00 C add vOffset, 4 C 1C IFDEF HAL_CSIM 1C pushad @@ -7256,48 +7289,48 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000396 89 7D FC 1C mov [fifo + -4], tempVal + 00000416 89 7D FC 1C mov [fifo + -4], tempVal 1C ENDIF C cmp vOffset, 16 ; Offset of one past last vertex? - 00000399 75 ED C jne __vertexStart + 00000419 75 ED C jne __vertexStart C C ;; Update gc->fifoPtr and gc->fifoRoom - 0000039C C mov eax, fifo + 0000041C C mov eax, fifo C mov ebx, [gc + fifoPtr] - 0000039C 83 C1 04 C + 0000041C 83 C1 04 C C mov [gc + fifoPtr], fifo - 0000039F 83 F9 10 C sub eax, ebx - 000003A2 75 BC C + 0000041F 83 F9 10 C sub eax, ebx + 00000422 75 BC C C mov ebx, [gc + trisDrawn] ; _GlideRoot.stats.trisDrawn++; C sub [gc + fifoRoom], eax - 000003A4 8B C5 C - 000003A6 8B 9E 00000DE4 C add ebx, 1 + 00000424 8B C5 C + 00000426 8B 9E 00000DE4 C add ebx, 1 C mov [gc + trisDrawn], ebx - 000003AC 89 AE 00000DE4 C - 000003B2 2B C3 C ;; return 1 (triangle drawn) + 0000042C 89 AE 00000DE4 C + 00000432 2B C3 C ;; return 1 (triangle drawn) C mov eax, 1h - 000003B4 8B 5E 10 C - 000003B7 29 86 00000DEC C __triDone: + 00000434 8B 5E 10 C + 00000437 29 86 00000DEC C __triDone: C ;; Restore trashed registers - 000003BD 83 C3 01 C mov ecx, [gc + trisProcessed] - 000003C0 89 5E 10 C pop ebp + 0000043D 83 C3 01 C mov ecx, [gc + trisProcessed] + 00000440 89 5E 10 C pop ebp C C add ecx, 1 ; _GlideRoot.stats.trisProcessed++; - 000003C3 B8 00000001 C pop ebx + 00000443 B8 00000001 C pop ebx C - 000003C8 C pop edi + 00000448 C pop edi C mov [gc + trisProcessed], ecx - 000003C8 8B 4E 0C C - 000003CB 5D C pop esi + 00000448 8B 4E 0C C + 0000044B 5D C pop esi C ret 12 - 000003CC 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR - 000003CF 5B C ENDIF ; !GL_AMD3D + 0000044C 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR + 0000044F 5B C ENDIF ; !GL_AMD3D C - 000003D0 5F C - 000003D1 89 4E 0C C + 00000450 5F C + 00000451 89 4E 0C C C - 000003D4 5E C - 000003D5 C2 000C C + 00000454 5E C + 00000455 C2 000C C C C C @@ -7312,7 +7345,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_cull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_cull_valid@12> - 000003D8 ALIGN 32 + 00000458 ALIGN 32 PUBLIC PROC_TYPE(win_nocull_valid) PROC_TYPE(win_nocull_valid) PROC NEAR 1 IFDEF GL_AMD3D @@ -7324,7 +7357,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_nocull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_nocull_valid@12> - 000003E0 GLIDE_VALIDATE_STATE textequ <0> + 00000460 GLIDE_VALIDATE_STATE textequ <0> GLIDE_CLIP_COORDS textequ <0> = 0 GLIDE_CULLING textequ <0> = 0 GLIDE_PACK_RGB textequ <0> @@ -7355,6 +7388,10 @@ ENDM ; GR_FIFO_WRITE C ;; $Header$ C ;; $Revision$ C ;; $Log$ + C ;; Revision 1.3 2000/11/15 23:32:54 joseph + C ;; Syncing up with 3dfx internal source repository. These changes contain a + C ;; number of bug fixes. + C ;; C ;; Revision 1.1 2000/06/15 00:27:43 joseph C ;; Initial checkin into SourceForge. C ;; @@ -8029,11 +8066,11 @@ ENDM ; GR_FIFO_WRITE C ENDIF C ELSE C ;; Prologue stuff - 000003E0 56 C push esi - 000003E1 57 C push edi + 00000460 56 C push esi + 00000461 57 C push edi C - 000003E2 53 C push ebx - 000003E3 55 C push ebp + 00000462 53 C push ebx + 00000463 55 C push ebp C C ;; call getThreadValueSLOW C ;; mov gc, eax @@ -8054,19 +8091,19 @@ ENDM ; GR_FIFO_WRITE C add eax, DWORD PTR __GlideRoot + tlsOffset C mov gc, [eax] C ELSE - 000003E4 8B F2 C mov gc, edx + 00000464 8B F2 C mov gc, edx C ENDIF C IFDEF GLIDE_ALT_TAB - 000003E6 85 F6 C test gc, gc - 000003E8 0F 84 000000DA C je __triDone - 000003EE 8B 96 000096C4 C mov edx, [gc + windowed] - 000003F4 F7 C2 00000001 C test edx, 1 - 000003FA 75 14 C jnz pastContextTest ; - 000003FC 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] - 00000402 8B 1A C mov ebx, [edx] - 00000404 F7 C3 00000001 C test ebx, 1 - 0000040A 0F 85 000000B8 C jnz __triDone - 00000410 C pastContextTest: + 00000466 85 F6 C test gc, gc + 00000468 0F 84 000000DA C je __triDone + 0000046E 8B 96 000096C4 C mov edx, [gc + windowed] + 00000474 F7 C2 00000001 C test edx, 1 + 0000047A 75 14 C jnz pastContextTest ; + 0000047C 8B 96 000096BC C mov edx, DWORD PTR [gc+lostContext] + 00000482 8B 1A C mov ebx, [edx] + 00000484 F7 C3 00000001 C test ebx, 1 + 0000048A 0F 85 000000B8 C jnz __triDone + 00000490 C pastContextTest: C C ENDIF C align 4 @@ -8148,19 +8185,19 @@ ENDM ; GR_FIFO_WRITE C align 4 C ;; Check to make sure that we have enough room for C ;; the complete triangle packet. - 00000410 8B 46 4C C mov eax, [gc + curTriSize] - 00000413 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] + 00000490 8B 46 4C C mov eax, [gc + curTriSize] + 00000493 8B 9E 00000DEC C mov ebx, [gc + fifoRoom] C - 00000419 83 C0 04 C add eax, 4 - 0000041C 3B D8 C cmp ebx, eax + 00000499 83 C0 04 C add eax, 4 + 0000049C 3B D8 C cmp ebx, eax C - 0000041E 7D 20 C jge __triBegin + 0000049E 7D 20 C jge __triBegin C - 00000420 68 00000338 C push @Line - 00000425 6A 00 C push 0h + 000004A0 68 00000338 C push @Line + 000004A5 6A 00 C push 0h C - 00000427 50 C push eax - 00000428 E8 00000000 E C call __grCommandTransportMakeRoom@12 + 000004A7 50 C push eax + 000004A8 E8 00000000 E C call __grCommandTransportMakeRoom@12 C C ;; Send triangle parameters C @@ -8199,12 +8236,12 @@ ENDM ; GR_FIFO_WRITE C nop C C GR_FIFO_WRITE fifo, 0, eax ; Write packet header to fifo - 00000440 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate - 00000440 8B AE 00000DE4 C - 00000446 B9 00000004 C align 32 + 000004C0 C add fifo, 4 ; Advance fifo for hdr & x/y coordinate + 000004C0 8B AE 00000DE4 C + 000004C6 B9 00000004 C align 32 C __vertexStart: - 0000044B 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex - 00000451 90 C add fifo, 8 + 000004CB 8B 86 00000DD8 C mov vertex, [esp + STKOFF + vOffset] ; Current vertex + 000004D1 90 C add fifo, 8 C C nop ; Avoid p5 agi w/ load of vertex ptr 1C IFDEF HAL_CSIM @@ -8220,20 +8257,20 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000452 89 45 00 1C mov [fifo + 0], eax + 000004D2 89 45 00 1C mov [fifo + 0], eax 1C ENDIF - 00000455 83 C5 04 C nop + 000004D5 83 C5 04 C nop C C mov eax, DWORD PTR [vertex] ; X - 00000460 C lea dlp, [gc + tsuDataList] ; Reset the dataList - 00000460 8B 54 0C 10 C - 00000464 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X + 000004E0 C lea dlp, [gc + tsuDataList] ; Reset the dataList + 000004E0 8B 54 0C 10 C + 000004E4 83 C5 08 C GR_FIFO_WRITE fifo, -8, eax ; PCI write X C mov eax, DWORD PTR [vertex + 4] ; Y - 00000467 90 C - 00000468 90 C xor packCol, packCol ; Clear packed color + 000004E7 90 C + 000004E8 90 C xor packCol, packCol ; Clear packed color C GR_FIFO_WRITE fifo, -4, eax ; PCI write Y - 00000469 8B 02 C - 0000046B 8D 9E 00000124 C __doParams: + 000004E9 8B 02 C + 000004EB 8D 9E 00000124 C __doParams: C mov eax, DWORD PTR [dlp] ; Get first offset from the data list C add dlp, 4 ; dlp++ 1C IFDEF HAL_CSIM @@ -8249,11 +8286,11 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000471 89 45 F8 1C mov [fifo + -8], eax + 000004F1 89 45 F8 1C mov [fifo + -8], eax 1C ENDIF - 00000474 8B 42 04 C + 000004F4 8B 42 04 C C cmp eax, 0 ; Are we done? - 00000477 33 FF C je __nextVertex + 000004F7 33 FF C je __nextVertex C 1C IFDEF HAL_CSIM 1C pushad @@ -8268,29 +8305,29 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000479 89 45 FC 1C mov [fifo + -4], eax + 000004F9 89 45 FC 1C mov [fifo + -4], eax 1C ENDIF C ;; Not using align directive here because it sometimes - 0000047C C ;; introduces an agi for the eax use below. - 0000047C 8B 03 C nop - 0000047E 83 C3 04 C nop + 000004FC C ;; introduces an agi for the eax use below. + 000004FC 8B 03 C nop + 000004FE 83 C3 04 C nop C - 00000481 83 F8 00 C __paramLoop: - 00000484 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex + 00000501 83 F8 00 C __paramLoop: + 00000504 74 16 C mov tempVal, DWORD PTR [eax + vertex] ; Get the parameter from teh vertex C add fifo, 4 ; fifoPtr += sizeof(FxU32) C C mov eax, DWORD PTR [dlp] ; offset = *(dlp + 1) - 00000486 90 C add dlp, 4 ; dlp++ - 00000487 90 C + 00000506 90 C add dlp, 4 ; dlp++ + 00000507 90 C C cmp eax, 0 ; Are we done? - 00000488 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data - 00000488 8B 3C 02 C - 0000048B 83 C5 04 C jne SHORT __paramLoop + 00000508 C GR_FIFO_WRITE fifo, -4, tempVal ; *fifoPtr = data + 00000508 8B 3C 02 C + 0000050B 83 C5 04 C jne SHORT __paramLoop C - 0000048E 8B 03 C align 4 - 00000490 83 C3 04 C __nextVertex: + 0000050E 8B 03 C align 4 + 00000510 83 C3 04 C __nextVertex: C ;; On to the next vertex - 00000493 83 F8 00 C add vOffset, 4 + 00000513 83 F8 00 C add vOffset, 4 C 1C IFDEF HAL_CSIM 1C pushad @@ -8305,48 +8342,48 @@ ENDM ; GR_FIFO_WRITE 1C popfd 1C popad 1C ELSE - 00000496 89 7D FC 1C mov [fifo + -4], tempVal + 00000516 89 7D FC 1C mov [fifo + -4], tempVal 1C ENDIF C cmp vOffset, 16 ; Offset of one past last vertex? - 00000499 75 ED C jne __vertexStart + 00000519 75 ED C jne __vertexStart C C ;; Update gc->fifoPtr and gc->fifoRoom - 0000049C C mov eax, fifo + 0000051C C mov eax, fifo C mov ebx, [gc + fifoPtr] - 0000049C 83 C1 04 C + 0000051C 83 C1 04 C C mov [gc + fifoPtr], fifo - 0000049F 83 F9 10 C sub eax, ebx - 000004A2 75 BC C + 0000051F 83 F9 10 C sub eax, ebx + 00000522 75 BC C C mov ebx, [gc + trisDrawn] ; _GlideRoot.stats.trisDrawn++; C sub [gc + fifoRoom], eax - 000004A4 8B C5 C - 000004A6 8B 9E 00000DE4 C add ebx, 1 + 00000524 8B C5 C + 00000526 8B 9E 00000DE4 C add ebx, 1 C mov [gc + trisDrawn], ebx - 000004AC 89 AE 00000DE4 C - 000004B2 2B C3 C ;; return 1 (triangle drawn) + 0000052C 89 AE 00000DE4 C + 00000532 2B C3 C ;; return 1 (triangle drawn) C mov eax, 1h - 000004B4 8B 5E 10 C - 000004B7 29 86 00000DEC C __triDone: + 00000534 8B 5E 10 C + 00000537 29 86 00000DEC C __triDone: C ;; Restore trashed registers - 000004BD 83 C3 01 C mov ecx, [gc + trisProcessed] - 000004C0 89 5E 10 C pop ebp + 0000053D 83 C3 01 C mov ecx, [gc + trisProcessed] + 00000540 89 5E 10 C pop ebp C C add ecx, 1 ; _GlideRoot.stats.trisProcessed++; - 000004C3 B8 00000001 C pop ebx + 00000543 B8 00000001 C pop ebx C - 000004C8 C pop edi + 00000548 C pop edi C mov [gc + trisProcessed], ecx - 000004C8 8B 4E 0C C - 000004CB 5D C pop esi + 00000548 8B 4E 0C C + 0000054B 5D C pop esi C ret 12 - 000004CC 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR - 000004CF 5B C ENDIF ; !GL_AMD3D + 0000054C 83 C1 01 C ENDIF ; !GLIDE_CLIP_COOR + 0000054F 5B C ENDIF ; !GL_AMD3D C - 000004D0 5F C - 000004D1 89 4E 0C C + 00000550 5F C + 00000551 89 4E 0C C C - 000004D4 5E C - 000004D5 C2 000C C + 00000554 5E C + 00000555 C2 000C C C C C @@ -8361,7 +8398,7 @@ ENDM ; GR_FIFO_WRITE 1 EXITM <__trisetup_3DNow_win_nocull_valid@12> 1 ELSE 1 EXITM <__trisetup_Default_win_nocull_valid@12> - 000004D8 IFDEF GL_AMD3D + 00000558 IFDEF GL_AMD3D ALIGN 32 PUBLIC __trisetup_clip_coor_thunk@12 __trisetup_clip_coor_thunk@12 PROC NEAR @@ -8399,8 +8436,8 @@ ENDM ; GR_FIFO_WRITE _TEXT ENDS END - 04D8 - Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:57 + 0558 + Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 xdraw2.asm Symbols 2 - 1 @@ -8421,55 +8458,55 @@ Segments and Groups: CONST . . . . . . . . . . . . . 32 Bit 000C Para Private FLAT . . . . . . . . . . . . . . GROUP _DATA . . . . . . . . . . . . . 32 Bit 0008 Para Private -_TEXT . . . . . . . . . . . . . 32 Bit 04D8 Page Public 'CODE' +_TEXT . . . . . . . . . . . . . 32 Bit 0558 Page Public 'CODE' Procedures, parameters and locals: N a m e Type Value Attr -__trisetup_Default_clip_cull_invalid@12 P Near 0000 _TEXT Length= 0000 Public -__trisetup_Default_clip_cull_valid@12 P Near 0000 _TEXT Length= 0000 Public -__trisetup_Default_clip_nocull_invalid@12 P Near 0000 _TEXT Length= 0000 Public -__trisetup_Default_clip_nocull_valid@12 P Near 0000 _TEXT Length= 0000 Public -__trisetup_Default_win_cull_invalid@12 . P Near 0100 _TEXT Length= 0178 Public - pastContextTest . . . . . . . L Near 0130 _TEXT - no_validatioin . . . . . . . . L Near 013F _TEXT - Area_Computation . . . . . . . L Near 0159 _TEXT - nocull . . . . . . . . . . . . L Near 01A9 _TEXT - __triBegin . . . . . . . . . . L Near 01E0 _TEXT - __vertexStart . . . . . . . . L Near 0200 _TEXT - __doParams . . . . . . . . . . L Near 021C _TEXT - __paramLoop . . . . . . . . . L Near 0228 _TEXT - __nextVertex . . . . . . . . . L Near 023C _TEXT - __triDone . . . . . . . . . . L Near 0268 _TEXT -__trisetup_Default_win_cull_valid@12 . P Near 0280 _TEXT Length= 0158 Public - pastContextTest . . . . . . . L Near 02B0 _TEXT - Area_Computation . . . . . . . L Near 02C9 _TEXT - nocull . . . . . . . . . . . . L Near 0319 _TEXT - __triBegin . . . . . . . . . . L Near 0340 _TEXT - __vertexStart . . . . . . . . L Near 0360 _TEXT - __doParams . . . . . . . . . . L Near 037C _TEXT - __paramLoop . . . . . . . . . L Near 0388 _TEXT - __nextVertex . . . . . . . . . L Near 039C _TEXT - __triDone . . . . . . . . . . L Near 03C8 _TEXT -__trisetup_Default_win_nocull_invalid@12 . P Near 0000 _TEXT Length= 00F8 Public - pastContextTest . . . . . . . L Near 0030 _TEXT - no_validatioin . . . . . . . . L Near 003F _TEXT - __triBegin . . . . . . . . . . L Near 0060 _TEXT - __vertexStart . . . . . . . . L Near 0080 _TEXT - __doParams . . . . . . . . . . L Near 009C _TEXT - __paramLoop . . . . . . . . . L Near 00A8 _TEXT - __nextVertex . . . . . . . . . L Near 00BC _TEXT - __triDone . . . . . . . . . . L Near 00E8 _TEXT -__trisetup_Default_win_nocull_valid@12 . P Near 03E0 _TEXT Length= 00F8 Public - pastContextTest . . . . . . . L Near 0410 _TEXT - __triBegin . . . . . . . . . . L Near 0440 _TEXT - __vertexStart . . . . . . . . L Near 0460 _TEXT - __doParams . . . . . . . . . . L Near 047C _TEXT - __paramLoop . . . . . . . . . L Near 0488 _TEXT - __nextVertex . . . . . . . . . L Near 049C _TEXT - __triDone . . . . . . . . . . L Near 04C8 _TEXT +__trisetup_Default_clip_cull_invalid@12 P Near 0020 _TEXT Length= 0004 Public +__trisetup_Default_clip_cull_valid@12 P Near 0040 _TEXT Length= 0004 Public +__trisetup_Default_clip_nocull_invalid@12 P Near 0000 _TEXT Length= 0004 Public +__trisetup_Default_clip_nocull_valid@12 P Near 0060 _TEXT Length= 0004 Public +__trisetup_Default_win_cull_invalid@12 . P Near 0180 _TEXT Length= 0178 Public + pastContextTest . . . . . . . L Near 01B0 _TEXT + no_validatioin . . . . . . . . L Near 01BF _TEXT + Area_Computation . . . . . . . L Near 01D9 _TEXT + nocull . . . . . . . . . . . . L Near 0229 _TEXT + __triBegin . . . . . . . . . . L Near 0260 _TEXT + __vertexStart . . . . . . . . L Near 0280 _TEXT + __doParams . . . . . . . . . . L Near 029C _TEXT + __paramLoop . . . . . . . . . L Near 02A8 _TEXT + __nextVertex . . . . . . . . . L Near 02BC _TEXT + __triDone . . . . . . . . . . L Near 02E8 _TEXT +__trisetup_Default_win_cull_valid@12 . P Near 0300 _TEXT Length= 0158 Public + pastContextTest . . . . . . . L Near 0330 _TEXT + Area_Computation . . . . . . . L Near 0349 _TEXT + nocull . . . . . . . . . . . . L Near 0399 _TEXT + __triBegin . . . . . . . . . . L Near 03C0 _TEXT + __vertexStart . . . . . . . . L Near 03E0 _TEXT + __doParams . . . . . . . . . . L Near 03FC _TEXT + __paramLoop . . . . . . . . . L Near 0408 _TEXT + __nextVertex . . . . . . . . . L Near 041C _TEXT + __triDone . . . . . . . . . . L Near 0448 _TEXT +__trisetup_Default_win_nocull_invalid@12 . P Near 0080 _TEXT Length= 00F8 Public + pastContextTest . . . . . . . L Near 00B0 _TEXT + no_validatioin . . . . . . . . L Near 00BF _TEXT + __triBegin . . . . . . . . . . L Near 00E0 _TEXT + __vertexStart . . . . . . . . L Near 0100 _TEXT + __doParams . . . . . . . . . . L Near 011C _TEXT + __paramLoop . . . . . . . . . L Near 0128 _TEXT + __nextVertex . . . . . . . . . L Near 013C _TEXT + __triDone . . . . . . . . . . L Near 0168 _TEXT +__trisetup_Default_win_nocull_valid@12 . P Near 0460 _TEXT Length= 00F8 Public + pastContextTest . . . . . . . L Near 0490 _TEXT + __triBegin . . . . . . . . . . L Near 04C0 _TEXT + __vertexStart . . . . . . . . L Near 04E0 _TEXT + __doParams . . . . . . . . . . L Near 04FC _TEXT + __paramLoop . . . . . . . . . L Near 0508 _TEXT + __nextVertex . . . . . . . . . L Near 051C _TEXT + __triDone . . . . . . . . . . L Near 0548 _TEXT Symbols: @@ -8482,9 +8519,11 @@ $T2006 . . . . . . . . . . . . . DWord 0008 CONST Area . . . . . . . . . . . . . . DWord 0004 _DATA CPUType . . . . . . . . . . . . Number 0010h CoordinateSpace . . . . . . . . Number 0D98h +GDBG_INFO_ON . . . . . . . . . . Text GLIDE_ALT_TAB . . . . . . . . . Text GLIDE_CLIP_COORDS . . . . . . . Text 0 GLIDE_CULLING . . . . . . . . . Text 0 +GLIDE_DEBUG . . . . . . . . . . Text GLIDE_GENERIC_SETUP . . . . . . Text 0 GLIDE_INIT_HWC . . . . . . . . . Text GLIDE_PACKED_RGB . . . . . . . . Text 0 @@ -8525,6 +8564,7 @@ _vb$ . . . . . . . . . . . . . . Number 0018h _vc$ . . . . . . . . . . . . . . Number 001Ch bInfo . . . . . . . . . . . . . Number 011Ch base_ptr . . . . . . . . . . . . Number 0074h +checkPtr . . . . . . . . . . . . Number 96ACh colorType . . . . . . . . . . . Number 0B74h cullStripHdr . . . . . . . . . . Number 0DDCh cull_mode . . . . . . . . . . . Number 01E0h diff --git a/glide3x/h5/glide3/src/xdraw2.s b/glide3x/h5/glide3/src/xdraw2.s index 69129b2..b4c2da1 100644 --- a/glide3x/h5/glide3/src/xdraw2.s +++ b/glide3x/h5/glide3/src/xdraw2.s @@ -16,11 +16,15 @@ ** THE UNITED STATES. ** ** COPYRIGHT 3DFX INTERACTIVE, INC. 1999, ALL RIGHTS RESERVED - */ + * -/* $Header$ */ -/* $Revision$ */ +/* $Header$ * +/* $Revision$ * /* $Log$ +/* Revision 1.3 2000/11/15 23:32:54 joseph +/* Syncing up with 3dfx internal source repository. These changes contain a +/* number of bug fixes. +/* /* Revision 1.1 2000/06/15 00:27:43 joseph /* Initial checkin into SourceForge. /* diff --git a/glide3x/h5/glide3/src/xdraw3.asm b/glide3x/h5/glide3/src/xdraw3.asm index 6955efd..3a55dc3 100644 --- a/glide3x/h5/glide3/src/xdraw3.asm +++ b/glide3x/h5/glide3/src/xdraw3.asm @@ -3282,12 +3282,13 @@ update_fifo_ptr: mov DWORD PTR [gc+trisProcessed], ebx; Store trisProcessed ; back to GC - ;; Clean up the stack + ;; Clean up the stack // FIXED by JHunter (wrong order, trashed edi/esi and ebx) pop ebp + + pop edi pop esi pop ebx - pop edi ret 12 ; 0000000cH diff --git a/glide3x/h5/glide3/src/xdraw3.lst b/glide3x/h5/glide3/src/xdraw3.lst index f653ea3..32ee9e4 100644 --- a/glide3x/h5/glide3/src/xdraw3.lst +++ b/glide3x/h5/glide3/src/xdraw3.lst @@ -1,4 +1,4 @@ -Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:57 +Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 xdraw3.asm Page 1 - 1 @@ -2209,6 +2209,7 @@ xdraw3.asm Page 1 - 1 = 0078 C reg_ptr = 00000078h = 0080 C lfb_ptr = 00000080h = 01E0 C cull_mode = 000001e0h + = 96AC C checkPtr = 000096ach = 0124 C tsuDataList = 00000124h = 0DD8 C triPacketHdr = 00000dd8h = 0DDC C cullStripHdr = 00000ddch @@ -3411,7 +3412,7 @@ xdraw3.asm Page 1 - 1 endif ; !GL_AMD3D END - Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:57 + Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 xdraw3.asm Symbols 2 - 1 @@ -3502,7 +3503,9 @@ Symbols: CPUType . . . . . . . . . . . . Number 0010h CoordinateSpace . . . . . . . . Number 0D98h +GDBG_INFO_ON . . . . . . . . . . Text GLIDE_ALT_TAB . . . . . . . . . Text +GLIDE_DEBUG . . . . . . . . . . Text GLIDE_INIT_HWC . . . . . . . . . Text GLIDE_PACKED_RGB . . . . . . . . Text 0 GLIDE_TRI_CULLING . . . . . . . Text 1 @@ -3543,6 +3546,7 @@ _vc . . . . . . . . . . . . . . Number 001Ch bInfo . . . . . . . . . . . . . Number 011Ch base_ptr . . . . . . . . . . . . Number 0074h ccoow . . . . . . . . . . . . . DWord 0004 _DATA +checkPtr . . . . . . . . . . . . Number 96ACh colorType . . . . . . . . . . . Number 0B74h cullStripHdr . . . . . . . . . . Number 0DDCh cull_mode . . . . . . . . . . . Number 01E0h diff --git a/glide3x/h5/glide3/src/xtexdl.lst b/glide3x/h5/glide3/src/xtexdl.lst index 9c3d27c..cb50402 100644 --- a/glide3x/h5/glide3/src/xtexdl.lst +++ b/glide3x/h5/glide3/src/xtexdl.lst @@ -1,4 +1,4 @@ -Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:56 +Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 xtexdl.asm Page 1 - 1 @@ -23,6 +23,10 @@ xtexdl.asm Page 1 - 1 ;; $Header$ ;; $Revision$ ;; $Log$ + ;; Revision 1.3 2000/11/15 23:32:54 joseph + ;; Syncing up with 3dfx internal source repository. These changes contain a + ;; number of bug fixes. + ;; ;; Revision 1.1 2000/06/15 00:27:43 joseph ;; Initial checkin into SourceForge. ;; @@ -98,6 +102,7 @@ xtexdl.asm Page 1 - 1 = 0078 C reg_ptr = 00000078h = 0080 C lfb_ptr = 00000080h = 01E0 C cull_mode = 000001e0h + = 96AC C checkPtr = 000096ach = 0124 C tsuDataList = 00000124h = 0DD8 C triPacketHdr = 00000dd8h = 0DDC C cullStripHdr = 00000ddch @@ -238,11 +243,11 @@ ENDM ; GR_FIFO_WRITE ENDIF 00000014 85 F6 sub curT, eax ; curT = maxT - minT - 00000016 0F 84 0000012A mov fifo, [gc + fifoPtr] ; fifoPtr + 00000016 0F 84 0000013C mov fifo, [gc + fifoPtr] ; fifoPtr 0000001C 8B 96 000096BC 00000022 8B 0A mov curS, [esp + _maxS$] ; curS = maxS 00000024 F7 C1 00000001 add curT, 1 ; curT = maxT - minT + 1 - 0000002A 0F 85 00000116 + 0000002A 0F 85 00000128 femms ; we'll use MMX/3DNow!, make sure FPU register cleared 00000030 2B D8 mov edx, curS ; curS = maxS = scanline width in DWORDs @@ -282,10 +287,10 @@ ENDM ; GR_FIFO_WRITE ifdef USE_PACKET_FIFO push @Line ; Line # inside this function 00000075 F7 C5 00000004 push 0 ; NULL file name - 0000007B 0F 84 0000009F + 0000007B 0F 84 000000B1 push 4 ; fifo space required (bytes) 00000081 83 FA 04 call __grCommandTransportMakeRoom@12 ; make fifo room - 00000084 7D 26 endif + 00000084 7D 2A endif mov fifo, [gc + fifoPtr] ; fifoPtr modified by _grCommandTransportMakeRoom, reload 00000086 68 000000C4 @@ -301,23 +306,23 @@ ENDM ; GR_FIFO_WRITE 000000A0 8B 4C 24 1C sub fRoom, 4 ; fifoRoom -= 4 000000A4 F7 C5 00000004 mov [gc + fifoRoom], fRoom ; store new fifoRoom - 000000AA 74 74 add fifo, 4 ; fifoPtr += 4 + 000000AA 0F 84 00000082 add fifo, 4 ; fifoPtr += 4 - 000000AC IFDEF GLIDE_DEBUG + 000000B0 IFDEF GLIDE_DEBUG mov [gc + checkPtr], fifo ; checkPtr - 000000AC C7 45 00 ENDIF + 000000B0 C7 45 00 ENDIF 00000000 - 000000B3 83 EA 04 + 000000B7 83 EA 04 mov [gc + fifoPtr], fifo ; store new fifoPtr - 000000B6 89 96 00000DEC jmp __startDownload ; fifo aligned, download texture now - 000000BC 83 C5 04 + 000000BA 89 96 00000DEC jmp __startDownload ; fifo aligned, download texture now + 000000C0 83 C5 04 align 32 - ;; ebx = curT, edi = dataPtr, esi = gc, ebp = fifo, ecx = maxS = curS + 000000C3 89 AE 000096AC ;; ebx = curT, edi = dataPtr, esi = gc, ebp = fifo, ecx = maxS = curS ;; edx=fifoRoom, mm1 = texAddr|packetHdr, mm2 = TEX_ROW_ADDR_INCR(1)|0 - 000000BF 89 AE 00000DE4 __loopT: - 000000C5 EB 59 + 000000C9 89 AE 00000DE4 __loopT: + 000000CF EB 61 IFDEF GLIDE_DEBUG ;; Make sure that we have a QWORD aligned fifoPtr; force GP if not aligned @@ -330,93 +335,93 @@ ENDM ; GR_FIFO_WRITE __alignmentOK: ENDIF ; GLIDE_DEBUG - ;; Compute packet header words - ;; hdr1: downloadSpace[31:30] numWords[21:3] packetType[2:0] + 000000E0 F7 C5 00000004 ;; Compute packet header words + 000000E6 74 04 ;; hdr1: downloadSpace[31:30] numWords[21:3] packetType[2:0] ;; hdr2: download address[29:0] - - movq [fifo], mm1 ; store hdr2 | hdr1 - add fifo, 8 ; increment fifo ptr (hdr1 + hdr2) + 000000E8 33 C0 + 000000EA 89 00 movq [fifo], mm1 ; store hdr2 | hdr1 + 000000EC add fifo, 8 ; increment fifo ptr (hdr1 + hdr2) ;; S coordinate inner loop unrolled for 8 texels a write __loopS: movq mm0, [dataPtr] ; load 64 bit data (8 texels) - 000000E0 0F 7F 4D 00 add fifo, 8 ; pre-increment fifoPtr += 2 * sizeof(FxU32) - 000000E4 83 C5 08 + 000000EC 0F 7F 4D 00 add fifo, 8 ; pre-increment fifoPtr += 2 * sizeof(FxU32) + 000000F0 83 C5 08 add dataPtr, 8 ; dataPtr += 2 * sizeof(FxU32) sub curS, 8 ; curS -= 2 * sizeof(FxU32) - 000000E7 movq [fifo - 8], mm0 ; *fifoPtr = texelData[64 bits] + 000000F3 movq [fifo - 8], mm0 ; *fifoPtr = texelData[64 bits] jnz __loopS ; loop while curS > 0 - 000000E7 0F 6F 07 - 000000EA 83 C5 08 mov ecx, [gc + fifoPtr] ; old fifo ptr + 000000F3 0F 6F 07 + 000000F6 83 C5 08 mov ecx, [gc + fifoPtr] ; old fifo ptr nop ; filler - 000000ED 83 C7 08 - 000000F0 83 E9 08 mov eax, fifo ; new fifo ptr + 000000F9 83 C7 08 + 000000FC 83 E9 08 mov eax, fifo ; new fifo ptr mov [gc + fifoPtr], fifo ; save new fifo ptr - 000000F3 0F 7F 45 F8 - 000000F7 75 EE IFDEF GLIDE_DEBUG + 000000FF 0F 7F 45 F8 + 00000103 75 EE IFDEF GLIDE_DEBUG mov [gc + checkPtr], fifo ; checkPtr - 000000F9 8B 8E 00000DE4 ENDIF - 000000FF 90 + 00000105 8B 8E 00000DE4 ENDIF + 0000010B 90 sub eax, ecx ; new fifo ptr - old fifo ptr = fifo space used up - 00000100 8B C5 mov curS, [esp + _maxS$] ; curS = maxS = width of scanline (bytes) - 00000102 89 AE 00000DE4 + 0000010C 8B C5 mov curS, [esp + _maxS$] ; curS = maxS = width of scanline (bytes) + 0000010E 89 AE 00000DE4 sub fRoom, eax ; new fifo space available = old fifo space available - fifo space used up = new fifo space available sub curT, 1 ; curT-- - + 00000114 89 AE 000096AC mov [gc + fifoRoom], fRoom ; save new fifo space available jz __dlDone ; loop while curT > 0 - 00000108 2B C1 - 0000010A 8B 4C 24 1C ;; Check for room to write the next texture scanline + 0000011A 2B C1 + 0000011C 8B 4C 24 1C ;; Check for room to write the next texture scanline - 0000010E 2B D0 ;; ebx = curT, edi = dataPtr, esi = gc, ebp = fifo - 00000110 83 EB 01 ;; edx = fifoRoom, mm1 = texAddr|packetHdr, mm2 = TEX_ROW_ADDR_INCR(1)|0 + 00000120 2B D0 ;; ebx = curT, edi = dataPtr, esi = gc, ebp = fifo + 00000122 83 EB 01 ;; edx = fifoRoom, mm1 = texAddr|packetHdr, mm2 = TEX_ROW_ADDR_INCR(1)|0 - 00000113 89 96 00000DEC paddd mm1, mm2 ; texAddr+=TEX_ROW_ADDR_INCR(1) | packetHdr - 00000119 74 2B mov esp, esp ; filler + 00000125 89 96 00000DEC paddd mm1, mm2 ; texAddr+=TEX_ROW_ADDR_INCR(1) | packetHdr + 0000012B 74 2B mov esp, esp ; filler __startDownload: lea eax, [curS+8] ; fifo space needed = scan line width + header size cmp fRoom, eax ; fifo space available >= fifo space required ? jge __loopT ; yup, write next scan line - 0000011B 0F FE CA ifdef USE_PACKET_FIFO - 0000011E 8B E4 push @Line ; Line # inside this function - 00000120 push 0h ; NULL file name - 00000120 8D 41 08 + 0000012D 0F FE CA ifdef USE_PACKET_FIFO + 00000130 8B E4 push @Line ; Line # inside this function + 00000132 push 0h ; NULL file name + 00000132 8D 41 08 push eax ; fifo space required - 00000123 3B D0 call __grCommandTransportMakeRoom@12 ; make fifo room (if fifoPtr QWORD aligned before - 00000125 7D B9 endif + 00000135 3B D0 call __grCommandTransportMakeRoom@12 ; make fifo room (if fifoPtr QWORD aligned before + 00000137 7D A7 endif mov fifo, [gc + fifoPtr] ; fifoPtr was modified by _grCommandTransportMakeRoom, reload - 00000127 68 0000012A - 0000012C 6A 00 mov fRoom, [gc + fifoRoom] ; fifoRoom was modified by _grCommandTransportMakeRoom, reload + 00000139 68 0000012A + 0000013E 6A 00 mov fRoom, [gc + fifoRoom] ; fifoRoom was modified by _grCommandTransportMakeRoom, reload mov curS, [esp + _maxS$] ; curS = maxS = width of scanline (bytes) - 0000012E 50 jmp __loopT ; we now have enough fifo room, write next scanline - 0000012F E8 00000000 E + 00000140 50 jmp __loopT ; we now have enough fifo room, write next scanline + 00000141 E8 00000000 E __dlDone: - 00000134 8B AE 00000DE4 femms ; exit 3DNow!(tm) state + 00000146 8B AE 00000DE4 femms ; exit 3DNow!(tm) state - 0000013A 8B 96 00000DEC pop ebp ; restore caller's register variable - 00000140 8B 4C 24 1C pop edi ; restore caller's register variable - 00000144 EB 9A + 0000014C 8B 96 00000DEC pop ebp ; restore caller's register variable + 00000152 8B 4C 24 1C pop edi ; restore caller's register variable + 00000156 EB 88 pop esi ; restore caller's register variable - 00000146 pop ebx ; restore caller's register variable + 00000158 pop ebx ; restore caller's register variable - 00000146 0F 0E ret 24 ; pop 6 DWORD parameters and return + 00000158 0F 0E ret 24 ; pop 6 DWORD parameters and return - 00000148 5D __grTexDownload_3DNow_MMX@24 ENDP - 00000149 5F + 0000015A 5D __grTexDownload_3DNow_MMX@24 ENDP + 0000015B 5F _TEXT ENDS - 0000014A 5E - 0000014B 5B END - 0000014C C2 0018 - 0000014F - 014F - Microsoft (R) Macro Assembler Version 6.14.8444 06/20/00 17:18:56 + 0000015C 5E + 0000015D 5B END + 0000015E C2 0018 + 00000161 + 0161 + Microsoft (R) Macro Assembler Version 6.14.8444 06/30/00 13:01:25 xtexdl.asm Symbols 2 - 1 @@ -434,19 +439,20 @@ Segments and Groups: N a m e Size Length Align Combine Class FLAT . . . . . . . . . . . . . . GROUP -_TEXT . . . . . . . . . . . . . 32 Bit 014F Page Public 'CODE' +_TEXT . . . . . . . . . . . . . 32 Bit 0161 Page Public 'CODE' Procedures, parameters and locals: N a m e Type Value Attr -__grTexDownload_3DNow_MMX@24 . . P Near 0000 _TEXT Length= 014F Public - __mmxAlignFifo . . . . . . . . L Near 00AC _TEXT +__grTexDownload_3DNow_MMX@24 . . P Near 0000 _TEXT Length= 0161 Public + __mmxAlignFifo . . . . . . . . L Near 00B0 _TEXT __loopT . . . . . . . . . . . L Near 00E0 _TEXT - __loopS . . . . . . . . . . . L Near 00E7 _TEXT - __startDownload . . . . . . . L Near 0120 _TEXT - __dlDone . . . . . . . . . . . L Near 0146 _TEXT + __alignmentOK . . . . . . . . L Near 00EC _TEXT + __loopS . . . . . . . . . . . L Near 00F3 _TEXT + __startDownload . . . . . . . L Near 0132 _TEXT + __dlDone . . . . . . . . . . . L Near 0158 _TEXT Symbols: @@ -455,7 +461,9 @@ Symbols: CPUType . . . . . . . . . . . . Number 0010h CoordinateSpace . . . . . . . . Number 0D98h +GDBG_INFO_ON . . . . . . . . . . Text GLIDE_ALT_TAB . . . . . . . . . Text +GLIDE_DEBUG . . . . . . . . . . Text GLIDE_INIT_HWC . . . . . . . . . Text GLIDE_PACKED_RGB . . . . . . . . Text 0 GLIDE_TRI_CULLING . . . . . . . Text 1 @@ -490,6 +498,7 @@ _minT$ . . . . . . . . . . . . . Number 0020h _texData$ . . . . . . . . . . . Number 0028h bInfo . . . . . . . . . . . . . Number 011Ch base_ptr . . . . . . . . . . . . Number 0074h +checkPtr . . . . . . . . . . . . Number 96ACh colorType . . . . . . . . . . . Number 0B74h cullStripHdr . . . . . . . . . . Number 0DDCh cull_mode . . . . . . . . . . . Number 01E0h diff --git a/glide3x/h5/glide3/src/xtexdl.s b/glide3x/h5/glide3/src/xtexdl.s index 2355055..0471434 100644 --- a/glide3x/h5/glide3/src/xtexdl.s +++ b/glide3x/h5/glide3/src/xtexdl.s @@ -21,6 +21,10 @@ /* $Header$ * /* $Revision$ * /* $Log$ +/* Revision 1.3 2000/11/15 23:32:54 joseph +/* Syncing up with 3dfx internal source repository. These changes contain a +/* number of bug fixes. +/* /* Revision 1.1 2000/06/15 00:27:43 josep /* Initial checkin into SourceForge / diff --git a/glide3x/h5/glide3/src/xtexdl_def.c b/glide3x/h5/glide3/src/xtexdl_def.c index 82426c0..f505dc4 100644 --- a/glide3x/h5/glide3/src/xtexdl_def.c +++ b/glide3x/h5/glide3/src/xtexdl_def.c @@ -19,6 +19,8 @@ ** ** $Header$ ** $Log: +** 7 3dfx 1.4.1.0.1.0 10/11/00 Brent Forced check in to enforce +** branching. ** 6 3dfx 1.4.1.0 06/20/00 Joseph Kain Changes to support the ** Napalm Glide open source release. Changes include cleaned up offensive ** comments and new legal headers. @@ -32,7 +34,7 @@ ** PCI_BUMP_N_GRIND on PowerPC. ** 2 3dfx 1.1 09/22/99 Larry warner Created download procedures ** for FXT1 format. -** 1 3dfx 1.0 09/12/99 StarTeam VTS Administrator +** 1 3dfx 1.0 09/11/99 StarTeam VTS Administrator ** $ ** ** 9 8/05/99 5:03p Larryw