Aapo Tahkola wrote:
> On Tue, 15 Aug 2006 22:16:48 +0200
> Rune Petersen <[EMAIL PROTECTED]> wrote:
>
>> Aapo Tahkola wrote:
>>> Sauerbraten:
>>> a) open console and type "/floatvtx 1" or
>>> b) use this patch or
>>> c) wait for this patch to get integrated
>> What version did you use?
>> the latest release hits a fallback:
>>
>> *********************************WARN_ONCE*********************************
>> File r300_render.c function r300Fallback line 402
>> Software fallback:ctx->Polygon.OffsetLine
>> ***************************************************************************
>
> So I lied. Maybe we should add dri-conf options for them? It's not like
> we could magically fix them all in any case.
Something like this? (could be made nicer =)
I couldn't really decide if it should be part of the driver or as a
separate patch to apply.
It does 2 things:
1) Allows you to disable S3TC, wine-games sometimes need S3TC enabled.
2) Disable fallbacks that usually have low impact.
Rune Petersen
Index: radeon/radeon_screen.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/radeon/radeon_screen.c,v
retrieving revision 1.63
diff -u -r1.63 radeon_screen.c
--- radeon/radeon_screen.c 27 May 2006 09:03:25 -0000 1.63
+++ radeon/radeon_screen.c 17 Aug 2006 19:03:50 -0000
@@ -153,6 +153,17 @@
DRI_CONF_DESC(de,"Grösse des Befehlspuffers (in KB)") \
DRI_CONF_OPT_END
+#define DRI_CONF_DISABLE_S3TC(def) \
+DRI_CONF_OPT_BEGIN(disable_s3tc,bool,def) \
+ DRI_CONF_DESC(en,"Disable S3TC compression") \
+DRI_CONF_OPT_END
+
+#define DRI_CONF_DISABLE_FALLBACK(def) \
+DRI_CONF_OPT_BEGIN(disable_lowimpact_fallback,bool,def) \
+ DRI_CONF_DESC(en,"Disable Low-impact fallback") \
+DRI_CONF_OPT_END
+
+
const char __driConfigOptions[] =
DRI_CONF_BEGIN
DRI_CONF_SECTION_PERFORMANCE
@@ -162,12 +173,14 @@
DRI_CONF_MAX_TEXTURE_IMAGE_UNITS(8, 2, 8)
DRI_CONF_MAX_TEXTURE_COORD_UNITS(8, 2, 8)
DRI_CONF_COMMAND_BUFFER_SIZE(8, 8, 32)
+ DRI_CONF_DISABLE_FALLBACK(false)
DRI_CONF_SECTION_END
DRI_CONF_SECTION_QUALITY
DRI_CONF_TEXTURE_DEPTH(DRI_CONF_TEXTURE_DEPTH_FB)
DRI_CONF_DEF_MAX_ANISOTROPY(1.0, "1.0,2.0,4.0,8.0,16.0")
DRI_CONF_NO_NEG_LOD_BIAS(false)
DRI_CONF_FORCE_S3TC_ENABLE(false)
+ DRI_CONF_DISABLE_S3TC(false)
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)
@@ -176,7 +189,7 @@
DRI_CONF_NO_RAST(false)
DRI_CONF_SECTION_END
DRI_CONF_END;
-static const GLuint __driNConfigOptions = 14;
+static const GLuint __driNConfigOptions = 16;
#ifndef RADEON_DEBUG
int RADEON_DEBUG = 0;
Index: r300/r300_context.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_context.c,v
retrieving revision 1.58
diff -u -r1.58 r300_context.c
--- r300/r300_context.c 15 Aug 2006 16:48:06 -0000 1.58
+++ r300/r300_context.c 17 Aug 2006 19:03:51 -0000
@@ -166,7 +166,7 @@
0,
};
-
+int disable_lowimpact_fallback;
/* Create the device specific rendering context.
*/
GLboolean r300CreateContext(const __GLcontextModes * glVisual,
@@ -331,7 +331,7 @@
driInitExtensions(ctx, card_extensions, GL_TRUE);
- if (r300->radeon.glCtx->Mesa_DXTn) {
+ if (r300->radeon.glCtx->Mesa_DXTn && !driQueryOptionb
(&r300->radeon.optionCache, "disable_s3tc")) {
_mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" );
_mesa_enable_extension( ctx, "GL_S3_s3tc" );
}
@@ -339,6 +339,8 @@
_mesa_enable_extension( ctx, "GL_EXT_texture_compression_s3tc" );
}
+ disable_lowimpact_fallback = driQueryOptionb(&r300->radeon.optionCache,
"disable_lowimpact_fallback");
+
radeonInitSpanFuncs(ctx);
r300InitCmdBuf(r300);
r300InitState(r300);
Index: r300/r300_render.c
===================================================================
RCS file: /cvs/mesa/Mesa/src/mesa/drivers/dri/r300/r300_render.c,v
retrieving revision 1.108
diff -u -r1.108 r300_render.c
--- r300/r300_render.c 11 Aug 2006 13:59:37 -0000 1.108
+++ r300/r300_render.c 17 Aug 2006 19:03:51 -0000
@@ -397,6 +397,9 @@
FALLBACK_IF(ctx->Polygon.OffsetFill); // GL_POLYGON_OFFSET_FILL
FALLBACK_IF(ctx->Fog.Enabled);
#endif
+
+ if(!disable_lowimpact_fallback){
+
FALLBACK_IF(ctx->Polygon.OffsetPoint); // GL_POLYGON_OFFSET_POINT
FALLBACK_IF(ctx->Polygon.OffsetLine); // GL_POLYGON_OFFSET_LINE
//FALLBACK_IF(ctx->Stencil.Enabled); // GL_STENCIL_TEST
@@ -411,6 +414,9 @@
/* HW doesnt appear to directly support these */
FALLBACK_IF(ctx->Line.SmoothFlag); // GL_LINE_SMOOTH
FALLBACK_IF(ctx->Point.SmoothFlag); // GL_POINT_SMOOTH
+
+ }
+
/* Rest could be done with vertex fragments */
if (ctx->Extensions.NV_point_sprite || ctx->Extensions.ARB_point_sprite)
FALLBACK_IF(ctx->Point.PointSprite); // GL_POINT_SPRITE_NV
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel