grSetNumPendingBuffers visible with grGetProcAddress

This commit is contained in:
dborca
2004-02-16 07:42:16 +00:00
parent a9362d59c3
commit 08220f02bd
10 changed files with 54 additions and 14 deletions

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.1.1.8.2 2003/12/08 13:13:11 dborca
** better Texus2 integration
**
** Revision 1.1.1.1.8.1 2003/11/03 13:34:29 dborca
** Voodoo2 happiness (DJGPP & Linux)
**
@@ -920,6 +923,7 @@ static GrExtensionTuple _extensionTable[] = {
{ "txImgQuantize", (GrProc)txImgQuantize },
{ "txPalToNcc", (GrProc)txPalToNcc },
#endif
{ "grSetNumPendingBuffers", (GrProc)grSetNumPendingBuffers},
{ 0, 0 }
};

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.1.1.8.4 2004/01/20 14:04:10 dborca
** compilation and some other minor fixes to aid in debugging
**
** Revision 1.1.1.1.8.3 2003/11/03 13:34:29 dborca
** Voodoo2 happiness (DJGPP & Linux)
**
@@ -1351,6 +1354,7 @@ struct _GlideRoot_s {
FxU32 snapshot; /* register trace snapshot */
FxBool disableDitherSub; /* Turn off dither subtraction? */
FxBool texLodDither; /* Always do lod-dithering */
FxI32 swapPendingCount; /* pending buffer swap count */
/* Force alternate buffer strategy */
FxI32 nColorBuffer;
@@ -3372,5 +3376,9 @@ GR_ENTRY(grTexDownloadTableExt,
void,
(GrChipID_t tmu, GrTexTable_t type, void *data));
GR_ENTRY(grSetNumPendingBuffers,
void,
(FxI32 NumPendingBuffers));
#endif /* __FXGLIDE_H__ */

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.1.1 1999/12/07 21:42:32 joseph
** Initial checkin into SourceForge.
**
**
** 1 10/08/98 11:30a Brent
**
@@ -975,17 +978,14 @@ GR_ENTRY(grBufferSwap, void, (FxU32 swapInterval))
(swapInterval > 255) || (swapInterval < 0),
"swap_interval out of range");
/* wait until there's 6 or fewer buffer swaps pending */
/* the hardware counter is only 3 bits so we don't want it to overflow */
/* also the latency gets too long */
#if defined(GLIDE3) && defined(GLIDE3_ALPHA)
while (_grBufferNumPending() > 4)
while (_grBufferNumPending() > _GlideRoot.environment.swapPendingCount)
;
#else
while (grBufferNumPending() > 6)
;
#endif
/* if the interval is non-zero turn on VSYNC waiting */
vSync = (swapInterval > 0);

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.1.1 1999/12/07 21:42:33 joseph
** Initial checkin into SourceForge.
**
**
** 2 10/08/98 3:04p Atai
** added clip coords tri cull version
@@ -644,7 +647,12 @@ _GlideInitEnvironment(void)
if ((envStr != NULL) && (_GlideRoot.environment.swapInterval < 0)) {
_GlideRoot.environment.swapInterval = 0;
}
/* wait until there's 6 or fewer buffer swaps pending */
/* the hardware counter is only 3 bits so we don't want it to overflow */
/* also the latency gets too long */
_GlideRoot.environment.swapPendingCount = 4;
_GlideRoot.environment.snapshot = GLIDE_GETENV("FX_SNAPSHOT", 0);
GDBG_INFO(80," triBoundsCheck: %d\n",_GlideRoot.environment.triBoundsCheck);

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.1.1.8.1 2003/11/03 13:34:29 dborca
** Voodoo2 happiness (DJGPP & Linux)
**
** Revision 1.1.1.1 1999/12/07 21:42:33 joseph
** Initial checkin into SourceForge.
**
@@ -1703,10 +1706,7 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context))
-------------------------------------------------------------------*/
GR_DIENTRY(grSetNumPendingBuffers, void, (FxI32 NumPendingBuffers))
{
/* [dBorca] TODO
*
_GlideRoot.environment.swapPendingCount = NumPendingBuffers;
*/
}
/*-------------------------------------------------------------------

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.1.1.6.2 2003/12/08 13:13:11 dborca
** better Texus2 integration
**
** Revision 1.1.1.1.6.1 2003/11/07 13:38:38 dborca
** unite the clans
**
@@ -851,6 +854,7 @@ static GrExtensionTuple _extensionTable[] = {
{ "txImgQuantize", (GrProc)txImgQuantize },
{ "txPalToNcc", (GrProc)txPalToNcc },
#endif
{ "grSetNumPendingBuffers", (GrProc)grSetNumPendingBuffers},
{ 0, 0 }
};

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.2.4.4 2003/11/07 13:38:38 dborca
** unite the clans
**
** Revision 1.2.4.3 2003/07/25 07:13:41 dborca
** removed debris
**
@@ -1433,6 +1436,7 @@ struct _GlideRoot_s {
FxBool texLodDither; /* Always do lod-dithering */
FxI32 tmuMemory; /* tmuMemory */
float gammaR, gammaG, gammaB; /* Gamma settings */
FxI32 swapPendingCount; /* pending buffer swap count */
/* Force alternate buffer strategy */
FxI32 nColorBuffer;
@@ -2277,4 +2281,8 @@ GR_EXT_ENTRY(grTexDownloadTableExt,
void,
(GrChipID_t tmu, GrTexTable_t type, void *data));
GR_ENTRY(grSetNumPendingBuffers,
void,
(FxI32 NumPendingBuffers));
#endif /* __FXGLIDE_H__ */

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.2.1 2003/11/07 13:38:38 dborca
** unite the clans
**
** Revision 1.5 2000/11/24 18:36:48 alanh
** Add new grStippleMode and grStipplePattern functions for both Voodoo3 and
** Voodoo5 hardware.
@@ -1065,7 +1068,7 @@ GR_ENTRY(grBufferSwap, void, (FxU32 swapInterval))
swapInterval = ((swapInterval - 1) << 1) | 1; /* Format for hw */
}
while(_grBufferNumPending() > 3);
while(_grBufferNumPending() > _GlideRoot.environment.swapPendingCount);
/* Cycle the buffer indices */
{
@@ -1184,7 +1187,7 @@ GR_ENTRY(grDRIBufferSwap, void, (FxU32 swapInterval))
swapInterval = ((swapInterval - 1) << 1) | 1; /* Format for hw */
}
while(_grBufferNumPending() > 3);
while(_grBufferNumPending() > _GlideRoot.environment.swapPendingCount);
#if USE_PACKET_FIFO
{

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.2 2001/03/05 15:02:18 alanh
** Set FX_GLIDE_SWAPINTERVAL to 0 by default
**
** Revision 1.1.1.1 1999/11/24 21:44:57 joseph
** Initial checkin for SourceForge
**
@@ -894,6 +897,8 @@ _GlideInitEnvironment(void)
_GlideRoot.environment.snapshot = GLIDE_GETENV("FX_SNAPSHOT", -1L);
GDBG_INFO(80," snapshot: %d\n",_GlideRoot.environment.snapshot);
_GlideRoot.environment.swapPendingCount = 3;
_GlideRoot.environment.gammaR = GLIDE_FGETENV("SSTH3_RGAMMA", -1.f);
_GlideRoot.environment.gammaG = GLIDE_FGETENV("SSTH3_GGAMMA", -1.f);
_GlideRoot.environment.gammaB = GLIDE_FGETENV("SSTH3_BGAMMA", -1.f);

View File

@@ -19,6 +19,9 @@
**
** $Header$
** $Log$
** Revision 1.1.2.1 2003/11/07 13:38:38 dborca
** unite the clans
**
** Revision 1.1.1.1.6.1 2003/06/29 18:43:27 guillemj
** Fix compilation warnings.
**
@@ -1684,10 +1687,7 @@ GR_ENTRY(grSstWinClose, FxBool, (GrContext_t context))
-------------------------------------------------------------------*/
GR_DIENTRY(grSetNumPendingBuffers, void, (FxI32 NumPendingBuffers))
{
/* [dBorca] TODO
*
_GlideRoot.environment.swapPendingCount = NumPendingBuffers;
*/
}
/*-------------------------------------------------------------------