Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-27 Thread Aapo Tahkola
On Wed, 23 Aug 2006 21:45:25 +0200
Rune Petersen <[EMAIL PROTECTED]> wrote:

> 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.

Fine by me. disable_lowimpact_fallback and hw_tcl_on should really be
part of struct r300_context to avoid thread issues.

-- 
Aapo Tahkola

-
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


Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-23 Thread Rune Petersen
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 -  1.63
+++ radeon/radeon_screen.c  17 Aug 2006 19:03:50 -
@@ -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 -  1.58
+++ r300/r300_context.c 17 Aug 2006 19:03:51 -
@@ -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 -  1.108
+++ r300/r300_render.c  17 Aug 2006 19:03:51 -
@@ -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_LIN

Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-23 Thread Aapo Tahkola
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.


-- 
Aapo Tahkola

-
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


Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-15 Thread Daniel Kasak
Aapo Tahkola wrote:

> Unreal Tournament 2004:
> Set "UseVBO" option to "True"
> in ~/.ut2004/System/UT2004.ini .
>   

Hey. WOW!
That makes ut2004 playable on my system :)
Don't suppose you've got any more of these tips? :)

Dan

-
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


Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-15 Thread Ian Romanick
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Aapo Tahkola wrote:
> *cough* patch.
> 
> 
> 
> diff -uNr src_orig/engine/rendergl.cpp src/engine/rendergl.cpp
> --- src_orig/engine/rendergl.cpp  2006-08-15 18:51:23.0 +0300
> +++ src/engine/rendergl.cpp   2006-07-31 03:29:06.0 +0300
> @@ -140,6 +140,7 @@
>  const char *vendor = (const char *)glGetString(GL_VENDOR);
>  extern int floatvtx;
>  if(strstr(vendor, "ATI")) floatvtx = 1;
> +if(strstr(vendor, "Tungsten Graphics, Inc.")) floatvtx = 1;
>  if(floatvtx) conoutf("WARNING: Using floating point vertexes. (use 
> \"/floatvtx 0\" to disable)");
>  
>  if(forcenoshaders || !strstr(exts, "GL_ARB_vertex_program") || 
> !strstr(exts, "GL_ARB_fragment_program"))

DO NOT CHECK FOR EXTENSION STRINGS IN THIS MANNER.

Using strstr by itself is just plain wrong.  What if a driver exposes
GL_ARB_fragment_program_shadow but not GL_ARB_fragment_program?  This
usually isn't an issue for ARB extensions, but there are a few EXT and
vendor extensions where this will yield incorrect results (i.e., false
positives).

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFE4kEXX1gOwKyEAw8RAj7NAJ9loBpITOENA1SOZIqXRoj5KtgnxACfZO4y
FmgyJP7xUg+yviHTWXfMfmo=
=nXey
-END PGP SIGNATURE-

-
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


Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-15 Thread Rune Petersen
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
***


Rune Petersen

-
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


Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-15 Thread Rune Petersen
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
> 
> Unreal Tournament 2004:
> Set "UseVBO" option to "True"
> in ~/.ut2004/System/UT2004.ini .
> 
> Rune, could you add these to your status list?

Yes, thank you.


Rune Petersen

-
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


Re: [r300] sauerbraten and ut2k4 performance tips

2006-08-15 Thread Aapo Tahkola
*cough* patch.

-- 
Aapo Tahkola
diff -uNr src_orig/engine/rendergl.cpp src/engine/rendergl.cpp
--- src_orig/engine/rendergl.cpp	2006-08-15 18:51:23.0 +0300
+++ src/engine/rendergl.cpp	2006-07-31 03:29:06.0 +0300
@@ -140,6 +140,7 @@
 const char *vendor = (const char *)glGetString(GL_VENDOR);
 extern int floatvtx;
 if(strstr(vendor, "ATI")) floatvtx = 1;
+if(strstr(vendor, "Tungsten Graphics, Inc.")) floatvtx = 1;
 if(floatvtx) conoutf("WARNING: Using floating point vertexes. (use \"/floatvtx 0\" to disable)");
 
 if(forcenoshaders || !strstr(exts, "GL_ARB_vertex_program") || !strstr(exts, "GL_ARB_fragment_program"))
-
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


[r300] sauerbraten and ut2k4 performance tips

2006-08-15 Thread Aapo Tahkola
Sauerbraten:
a) open console and type "/floatvtx 1" or
b) use this patch or
c) wait for this patch to get integrated

Unreal Tournament 2004:
Set "UseVBO" option to "True"
in ~/.ut2004/System/UT2004.ini .

Rune, could you add these to your status list?

-- 
Aapo Tahkola

-
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