diff options
author | daryll <daryll> | 2000-04-11 16:29:08 +0000 |
---|---|---|
committer | daryll <daryll> | 2000-04-11 16:29:08 +0000 |
commit | 187957e3cb71a57e467c59b84d2040adb79437ce (patch) | |
tree | ef693c0863c5da0f0c2320260e72d89e91ed443b /xc | |
parent | 59dcffd4bc7b94e4827939004ff3094ed43c8d91 (diff) |
More work on the GL_BLEND for performer this time without breaking Q3A.
Preparing to wrap Block/Wakeup handlers to move locking down into the driver.
Diffstat (limited to 'xc')
-rw-r--r-- | xc/extras/Mesa/src/FX/fxdd.c | 3 | ||||
-rw-r--r-- | xc/extras/Mesa/src/FX/fxsetup.c | 18 | ||||
-rw-r--r-- | xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c | 2 | ||||
-rw-r--r-- | xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c | 39 |
4 files changed, 51 insertions, 11 deletions
diff --git a/xc/extras/Mesa/src/FX/fxdd.c b/xc/extras/Mesa/src/FX/fxdd.c index fd0434bcd..b5d700a74 100644 --- a/xc/extras/Mesa/src/FX/fxdd.c +++ b/xc/extras/Mesa/src/FX/fxdd.c @@ -964,7 +964,8 @@ static GLboolean fxIsInHardware(GLcontext *ctx) if (ctx->Texture.ReallyEnabled & TEXTURE0_2D) { if (ctx->Texture.Unit[0].EnvMode == GL_BLEND && - (ctx->Texture.Unit[0].EnvColor[0] != 0 || + (ctx->Texture.ReallyEnabled & TEXTURE1_2D || + ctx->Texture.Unit[0].EnvColor[0] != 0 || ctx->Texture.Unit[0].EnvColor[1] != 0 || ctx->Texture.Unit[0].EnvColor[2] != 0 || ctx->Texture.Unit[0].EnvColor[3] != 1)) { diff --git a/xc/extras/Mesa/src/FX/fxsetup.c b/xc/extras/Mesa/src/FX/fxsetup.c index d8f7f889a..9e00d152a 100644 --- a/xc/extras/Mesa/src/FX/fxsetup.c +++ b/xc/extras/Mesa/src/FX/fxsetup.c @@ -490,11 +490,12 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) if (ti->whichTMU==FX_TMU_BOTH) tmu=FX_TMU0; else tmu=ti->whichTMU; + if (fxMesa->tmuSrc!=tmu || - (unitsmode&(FX_UM_E0_BLEND|FX_UM_E1_BLEND) != - fxMesa->lastUnitsMode&(FX_UM_E0_BLEND|FX_UM_E1_BLEND))) { - if (unitsmode&FX_UM_E0_BLEND || unitsmode&FX_UM_E1_BLEND) - fxSelectSingleTMUSrc_NoLock(fxMesa, tmu, ti->LODblend, GL_TRUE); + (unitsmode&FX_UM_E0_BLEND != + fxMesa->lastUnitsMode&FX_UM_E0_BLEND)) { + if (unitsmode&FX_UM_E0_BLEND) + fxSelectSingleTMUSrc_NoLock(fxMesa, tmu, ti->LODblend, GL_FALSE); else fxSelectSingleTMUSrc_NoLock(fxMesa, tmu, ti->LODblend, GL_FALSE); } @@ -563,7 +564,6 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) FXFALSE); break; case GL_BLEND: -#if 0 FX_grAlphaCombine_NoLock(GR_COMBINE_FUNCTION_SCALE_OTHER, GR_COMBINE_FACTOR_LOCAL, locala, @@ -581,12 +581,10 @@ static void fxSetupTextureSingleTMU_NoLock(GLcontext *ctx, GLuint textureset) localc, GR_COMBINE_OTHER_TEXTURE, FXTRUE); +#if 0 + /* We're not enabling blending that requires multipass */ ctx->Driver.MultipassFunc = fxMultipassBlend; -#else -#ifndef FX_SILENT - /*fprintf(stderr,"fx Driver: GL_BLEND not yet supported\n");*/ #endif -#endif break; case GL_REPLACE: if((ifmt==GL_RGB) || (ifmt==GL_LUMINANCE)) @@ -1544,6 +1542,8 @@ void fxSetScissorValues(GLcontext *ctx) static void fxSetupScissor(GLcontext *ctx) { fxMesaContext fxMesa=(fxMesaContext)ctx->DriverCtx; + /* If we're not going to be setting the clip values in the CLIP_LOOP + then make a call to it here to set it once */ if (!fxMesa->needClip) { BEGIN_BOARD_LOCK(); fxSetScissorValues(ctx); diff --git a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c index 9fbb12ed2..f9cc8cd10 100644 --- a/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c +++ b/xc/lib/GL/mesa/src/drv/tdfx/tdfx_xmesa.c @@ -314,6 +314,7 @@ XMesaWindowMoved() { gCCPriv->height=dPriv->h; gCCPriv->y_delta=gCCPriv->screen_height-gCCPriv->y_offset-gCCPriv->height; } + gCCPriv->needClip=1; switch (dPriv->numClipRects) { case 0: gCCPriv->clipMinX=dPriv->x; @@ -332,7 +333,6 @@ XMesaWindowMoved() { gCCPriv->needClip=0; break; default: - gCCPriv->needClip=1; } } diff --git a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c index c22791520..4faad2c14 100644 --- a/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c +++ b/xc/programs/Xserver/hw/xfree86/drivers/tdfx/tdfx_dri.c @@ -140,6 +140,45 @@ TDFXInitVisualConfigs(ScreenPtr pScreen) return TRUE; } +/* Right now these (Wakeup/Block)Handlers are the standard DRI + versions. Eventually move locking down into the acceleration functions */ +static void TDFXDoWakeupHandler(int screenNum, pointer wakeupData, + unsigned long result, pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[screenNum]; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + DRILock(pScreen, 0); + if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { + /* hide X context by swapping 2D component here */ + (*pDRIPriv->pDriverInfo->SwapContext)(pScreen, + DRI_3D_SYNC, + DRI_2D_CONTEXT, + pDRIPriv->partial3DContextStore, + DRI_2D_CONTEXT, + pDRIPriv->hiddenContextStore); + } +} + +static TDFXDoBlockHandler(int screenNum, pointer blockData, pointer pTimeout, + pointer pReadmask) +{ + ScreenPtr pScreen = screenInfo.screens[screenNum]; + DRIScreenPrivPtr pDRIPriv = DRI_SCREEN_PRIV(pScreen); + + if (pDRIPriv->pDriverInfo->driverSwapMethod == DRI_HIDE_X_CONTEXT) { + /* hide X context by swapping 2D component here */ + (*pDRIPriv->pDriverInfo->SwapContext)(pScreen, + DRI_2D_SYNC, + DRI_NO_CONTEXT, + NULL, + DRI_2D_CONTEXT, + pDRIPriv->partial3DContextStore); + } + DRIUnlock(pScreen); +} + + Bool TDFXDRIScreenInit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum]; |