Am 2004.01.03 16:22:54 +0100 schrieb(en) Felix K�hling:
[...]
>
> I just added a short HOWTO to the Wiki:
> http://dri.sourceforge.net/cgi-bin/moin.cgi/ConfigurationForDevelopers.
> Let me know if you find any problems with the config code or the HOWTO.
thanks a lot!
>
> I'm going to try your patch in a minute. I think Torcs can use 3 TMUs.
>
did it work ?
here are three patches to use additionally to the TMU3/6 patch.
Now by default 2 TMUs are chosen and you can adjust to 1..3 / 1..6
greetings,
Andreas
diff -ru Mesa_orig/src/mesa/drivers/dri/common/xmlpool.h Mesa/src/mesa/drivers/dri/common/xmlpool.h
--- Mesa_orig/src/mesa/drivers/dri/common/xmlpool.h Sat Dec 6 15:06:27 2003
+++ Mesa/src/mesa/drivers/dri/common/xmlpool.h Sun Jan 4 12:22:10 2004
@@ -192,6 +192,14 @@
DRI_CONF_DESC_END \
DRI_CONF_OPT_END
+#define DRI_CONF_MAX_TMU(def,range) \
+DRI_CONF_OPT_BEGIN_V(max_tmu,int,def,range) \
+ DRI_CONF_DESC_BEGIN(en,"maximum number of texture mapping units") \
+ DRI_CONF_DESC_END \
+ DRI_CONF_DESC_BEGIN(de,"Maximalanzahl Textureinheiten") \
+ DRI_CONF_DESC_END \
+DRI_CONF_OPT_END
+
/** \brief Performance-related options */
#define DRI_CONF_SECTION_PERFORMANCE \
DRI_CONF_SECTION_BEGIN \
--- Mesa_orig/src/mesa/drivers/dri/r200/r200_context.c Sat Dec 13 18:07:05 2003
+++ Mesa/src/mesa/drivers/dri/r200/r200_context.c Sun Jan 4 11:51:07 2004
@@ -314,9 +314,10 @@
*/
ctx = rmesa->glCtx;
- ctx->Const.MaxTextureUnits = 2;
- ctx->Const.MaxTextureImageUnits = 2;
- ctx->Const.MaxTextureCoordUnits = 2;
+ ctx->Const.MaxTextureUnits = driQueryOptioni (&rmesa->optionCache,
+ "max_tmu");
+ ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
+ ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureUnits;
driCalculateMaxTextureLevels( rmesa->texture_heaps,
rmesa->nr_heaps,
--- Mesa_orig/src/mesa/drivers/dri/r200/r200_screen.c Sat Dec 13 18:07:05 2003
+++ Mesa/src/mesa/drivers/dri/r200/r200_screen.c Sun Jan 4 11:32:29 2004
@@ -67,6 +67,7 @@
DRI_CONF_COLOR_REDUCTION(DRI_CONF_COLOR_REDUCTION_DITHER)
DRI_CONF_ROUND_MODE(DRI_CONF_ROUND_TRUNC)
DRI_CONF_DITHER_MODE(DRI_CONF_DITHER_XERRORDIFF)
+ DRI_CONF_MAX_TMU(2,"1:6")
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
DRI_CONF_NO_RAST(false)
--- Mesa_orig/src/mesa/drivers/dri/radeon/radeon_context.c Sat Dec 13 18:07:05
2003
+++ Mesa/src/mesa/drivers/dri/radeon/radeon_context.c Sun Jan 4 14:30:49 2004
@@ -304,9 +304,10 @@
*/
ctx = rmesa->glCtx;
- ctx->Const.MaxTextureUnits = 2;
- ctx->Const.MaxTextureImageUnits = 2;
- ctx->Const.MaxTextureCoordUnits = 2;
+ ctx->Const.MaxTextureUnits = driQueryOptioni (&rmesa->optionCache,
+ "max_tmu");
+ ctx->Const.MaxTextureImageUnits = ctx->Const.MaxTextureUnits;
+ ctx->Const.MaxTextureCoordUnits = ctx->Const.MaxTextureUnits;
driCalculateMaxTextureLevels( rmesa->texture_heaps,
rmesa->nr_heaps,
--- Mesa_orig/src/mesa/drivers/dri/radeon/radeon_screen.c Sat Dec 13 18:07:05
2003
+++ Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c Sun Jan 4 14:23:03 2004
@@ -66,6 +66,7 @@
DRI_CONF_COLOR_REDUCTION(DRI_CONF_COLOR_REDUCTION_DITHER)
DRI_CONF_ROUND_MODE(DRI_CONF_ROUND_TRUNC)
DRI_CONF_DITHER_MODE(DRI_CONF_DITHER_XERRORDIFF)
+ DRI_CONF_MAX_TMU(2,"1:3")
DRI_CONF_SECTION_END
DRI_CONF_SECTION_DEBUG
DRI_CONF_NO_RAST(false)