summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/glide/fxdd.c
diff options
context:
space:
mode:
authorDaniel Borca <dborca@users.sourceforge.net>2004-01-29 15:46:02 +0000
committerDaniel Borca <dborca@users.sourceforge.net>2004-01-29 15:46:02 +0000
commit4fe1303e833183319f50107a98b8627f36633c65 (patch)
tree4a94476a6ee0fd37eae67258093ad2de0cea3d31 /src/mesa/drivers/glide/fxdd.c
parentf8c31fcba38f55932a9209a1778265c66466b623 (diff)
GL_TEXTURE_1D and other stories...
Diffstat (limited to 'src/mesa/drivers/glide/fxdd.c')
-rw-r--r--src/mesa/drivers/glide/fxdd.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/mesa/drivers/glide/fxdd.c b/src/mesa/drivers/glide/fxdd.c
index ef73f79641..448fd043d0 100644
--- a/src/mesa/drivers/glide/fxdd.c
+++ b/src/mesa/drivers/glide/fxdd.c
@@ -1502,6 +1502,11 @@ fxDDInitExtensions(GLcontext * ctx)
#if 1
_mesa_enable_extension(ctx, "GL_ARB_vertex_buffer_object");
#endif
+ /* not just yet */
+#if 0
+ _mesa_enable_extension(ctx, "GL_ARB_fragment_program");
+ _mesa_enable_extension(ctx, "GL_ARB_vertex_program");
+#endif
}
@@ -1540,6 +1545,13 @@ fx_check_IsInHardware(GLcontext * ctx)
}
}
+ /* [dBorca]
+ * We could avoid this for certain `sfactor/dfactor'
+ * I do not think that is even worthwhile to check
+ * because if someone is using blending they use more
+ * interesting settings and also it would add more
+ * state tracking to a lot of the code.
+ */
if (ctx->Color.ColorLogicOpEnabled && (ctx->Color.LogicOp != GL_COPY)) {
return FX_FALLBACK_LOGICOP;
}
@@ -1558,17 +1570,18 @@ fx_check_IsInHardware(GLcontext * ctx)
/* Unsupported texture/multitexture cases */
+ /* we can only do 1D/2D textures */
+ if (ctx->Texture.Unit[0]._ReallyEnabled & ~(TEXTURE_1D_BIT|TEXTURE_2D_BIT))
+ return FX_FALLBACK_TEXTURE_MAP;
+
if (fxMesa->haveTwoTMUs) {
- /* we can only do 2D textures */
- if (ctx->Texture.Unit[0]._ReallyEnabled & ~TEXTURE_2D_BIT)
- return FX_FALLBACK_TEXTURE_1D_3D;
- if (ctx->Texture.Unit[1]._ReallyEnabled & ~TEXTURE_2D_BIT)
- return FX_FALLBACK_TEXTURE_1D_3D;
+ if (ctx->Texture.Unit[1]._ReallyEnabled & ~(TEXTURE_1D_BIT|TEXTURE_2D_BIT))
+ return FX_FALLBACK_TEXTURE_MAP;
- if (ctx->Texture.Unit[0]._ReallyEnabled & TEXTURE_2D_BIT) {
+ if (ctx->Texture.Unit[0]._ReallyEnabled) {
if (fxMesa->type < GR_SSTTYPE_Voodoo2)
if (ctx->Texture.Unit[0].EnvMode == GL_BLEND &&
- (ctx->Texture.Unit[1]._ReallyEnabled & TEXTURE_2D_BIT ||
+ (ctx->Texture.Unit[1]._ReallyEnabled ||
ctx->Texture.Unit[0].EnvColor[0] != 0 ||
ctx->Texture.Unit[0].EnvColor[1] != 0 ||
ctx->Texture.Unit[0].EnvColor[2] != 0 ||
@@ -1579,7 +1592,7 @@ fx_check_IsInHardware(GLcontext * ctx)
return FX_FALLBACK_TEXTURE_BORDER;
}
- if (ctx->Texture.Unit[1]._ReallyEnabled & TEXTURE_2D_BIT) {
+ if (ctx->Texture.Unit[1]._ReallyEnabled) {
if (fxMesa->type < GR_SSTTYPE_Voodoo2)
if (ctx->Texture.Unit[1].EnvMode == GL_BLEND)
return FX_FALLBACK_TEXTURE_ENV;
@@ -1600,6 +1613,8 @@ fx_check_IsInHardware(GLcontext * ctx)
if (ctx->Texture._EnabledUnits == 0x3) {
/* Can't use multipass to blend a multitextured triangle - fall
* back to software.
+ * [dBorca] we hit this case only when we try to emulate
+ * multitexture by multipass!
*/
if (!fxMesa->haveTwoTMUs && ctx->Color.BlendEnabled) {
return FX_FALLBACK_TEXTURE_MULTI;
@@ -1621,7 +1636,7 @@ fx_check_IsInHardware(GLcontext * ctx)
}
if (fxMesa->type < GR_SSTTYPE_Voodoo2)
- if ((ctx->Texture.Unit[0]._ReallyEnabled & TEXTURE_2D_BIT) &&
+ if (ctx->Texture.Unit[0]._ReallyEnabled &&
(ctx->Texture.Unit[0].EnvMode == GL_BLEND)) {
return FX_FALLBACK_TEXTURE_ENV;
}
@@ -1688,12 +1703,14 @@ fxSetupDDPointers(GLcontext * ctx)
ctx->Driver.Finish = fxDDFinish;
ctx->Driver.Flush = NULL;
ctx->Driver.ChooseTextureFormat = fxDDChooseTextureFormat;
+ ctx->Driver.TexImage1D = fxDDTexImage1D;
ctx->Driver.TexImage2D = fxDDTexImage2D;
ctx->Driver.TexSubImage2D = fxDDTexSubImage2D;
ctx->Driver.CompressedTexImage2D = fxDDCompressedTexImage2D;
ctx->Driver.CompressedTexSubImage2D = fxDDCompressedTexSubImage2D;
ctx->Driver.IsCompressedFormat = fxDDIsCompressedFormat;
ctx->Driver.CompressedTextureSize = fxDDCompressedTextureSize;
+ ctx->Driver.TestProxyTexImage = fxDDTestProxyTexImage;
ctx->Driver.TexEnv = fxDDTexEnv;
ctx->Driver.TexParameter = fxDDTexParam;
ctx->Driver.BindTexture = fxDDTexBind;