# ATI Radeon 7500 DRI GUIDE w/ S3TC ENABLED!

## ccrunner84

The biggest diffrence and setback from the DRI drivers is the lack of S3TC in them.  I've done alot of reading and have found out myself how to include this S3TC patch and managed to get it working.  As far as I know this ONLY works for the Radeon 7500 and lower maybe.

I did this all with the latest mm-kernel and in the kernel setup I had radeon as a DRI module.  Im also using the latest Xfree server.

STEP 1 GETTING READY

FIRST, you need to download the DRI source and the  mesa source from the CVS tree.

First make sure you have cvs emerged.  Grab the source as follows:

cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri login 

Hit Enter for password

cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/dri co xc

this will download the DRI source

Next you need to get MESA

cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/mesa login  

cvs -z3 -d:pserver:anonymous@dri.freedesktop.org:/cvs/mesa co Mesa 

STEP 2 COMPILING DXTN

Go grab this file and compile it.  Just going into the directory that you untar it to and running a simple make will do it

http://vayne.fdns.net/files/libtxc_dxtn.tar.gz

Now copy all the modules (should be 3) to /lib and /usr/X11R6/lib

STEP 3 GETTING THE S3TC PATCH

Download the following tar file to your /HOMEFOLDER/Mesa/src/mesa directory

http://www.mail-archive.com/dri-devel@lists.sourceforge.net/msg15093/mesa_r200_radeon_txc.diff.gz

Then goto the folder in a terminal and run:

zcat mesa_r200_radeon_txc.diff.gz | patch -p0

*After I patched this I kept running into errors when I tried to compile, so I opened the file

/HOMEFOLDER/Mesa/src/mesa/drivers/dri/r200/r200_texmem.c file and then replaced the problamatic code, which is this:

 if ( R200_DEBUG & DEBUG_TEXTURE ) {

fprintf( stderr, "%s( %p, %p ) level/width/height/face/type = %d/%d/%d/%u/%x\n",

__FUNCTION__, (void *)t, (void *)t->base.tObj,

level, width, height, face, t->base.tObj->Image[t->base.tObj->BaseLevel]->IntFormat );

} 

AND REPLACE THE ABOVE WITH THIS:

if ( R200_DEBUG & DEBUG_TEXTURE ) {

fprintf( stderr, "%s( %p, %p ) level/width/height/face = %d/%d/%d/%u\n",

__FUNCTION__, (void *)t, (void *)t->base.tObj, level, width, height, face);

}

Next save the file after you edited the file

STEP 4 SETTING UP YOUR HOST.def file

Next browse to where you downloaded you DRI CVS source, browse to /xc/xc/config/cf and edit the HOST.def file

The main item you need to edit is where you mesa tree was downloaded to:

* You need this now */

#define MesaSrcDir /HOMEFOLDER?/Mesa   

Also a little further down the file you will see what dri and 2d drivers are being compiled, I only want radeon drivers so I changed it as follows:

#if defined(PpcArchitecture)

#define XF86CardDrivers ati

#define DriDrivers radeon r200

#elif defined(i386Architecture)

#define XF86CardDrivers ati 

#define DriDrivers r200 radeon

#else

#define XF86CardDrivers ati 

#define DriDrivers r200 radeon

Save the file and close it, were about ready to compile!

STEP 5 COMPILING AND INSTALLING

Next step is to compile, for me I went to /HOMEFOLDER?/DRIFOLDERIDOWNLOADEDSOURCE2/xc/xc and did a make World

After you finish you should be able to do a make install and then for safety's sake I restarted X and ran glxinfo and Saw S3TC was showing up:)

CHEERS!  

PS.  Sorry if this so called guide is confusing, if you have problems please post them, im still not 100% sure these were all the steps I went through, but from what I pulled up in my console history and all the folders I had open it should work like a charm.[/b]

UPDATES:  Added the patch for the buggy code, also added a missing link  :Razz: Last edited by ccrunner84 on Wed Mar 31, 2004 3:18 am; edited 2 times in total

----------

## ccrunner84

here is my GLXINFO output after the patched DRI module...

bash-2.05b# glxinfo

name of display: :0.0

libGL warning: 3D driver claims to not support visual 0x24

libGL warning: 3D driver claims to not support visual 0x28

libGL warning: 3D driver claims to not support visual 0x2c

libGL warning: 3D driver claims to not support visual 0x30

Mesa: software DXTn compression/decompression available

display: :0  screen: 0

direct rendering: Yes

server glx vendor string: SGI

server glx version string: 1.2

server glx extensions:

    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,

    GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,

    GLX_SGIS_multisample, GLX_SGIX_fbconfig

client glx vendor string: SGI

client glx version string: 1.2

client glx extensions:

    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,

    GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,

    GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,

    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,

    GLX_SGIX_visual_select_group

GLX extensions:

    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control,

    GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_video_sync,

    GLX_SGIS_multisample, GLX_SGIX_fbconfig

OpenGL vendor string: Tungsten Graphics, Inc.

OpenGL renderer string: Mesa DRI Radeon 20030328 AGP 2x x86/MMX/SSE2 TCL

OpenGL version string: 1.2 Mesa 6.1

OpenGL extensions:

    GL_ARB_imaging, GL_ARB_multisample, GL_ARB_multitexture,

    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,

    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,

    GL_ARB_texture_env_dot3, GL_ARB_texture_mirrored_repeat,

    GL_ARB_transpose_matrix, GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra,

    GL_EXT_blend_color, GL_EXT_blend_logic_op, GL_EXT_blend_minmax,

    GL_EXT_blend_subtract, GL_EXT_clip_volume_hint,

    GL_EXT_compiled_vertex_array, GL_EXT_convolution, GL_EXT_copy_texture,

    GL_EXT_draw_range_elements, GL_EXT_histogram, GL_EXT_packed_pixels,

    GL_EXT_polygon_offset, GL_EXT_rescale_normal, GL_EXT_secondary_color,

    GL_EXT_separate_specular_color, GL_EXT_subtexture, GL_EXT_texture,

    GL_EXT_texture3D, GL_EXT_texture_compression_s3tc,

    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,

    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,

    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,

    GL_EXT_texture_mirror_clamp, GL_EXT_texture_object,

    GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels,

    GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once,

    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,

    GL_MESA_ycbcr_texture, GL_MESA_window_pos, GL_NV_blend_square,

    GL_NV_light_max_exponent, GL_NV_texture_rectangle,

    GL_NV_texgen_reflection, GL_SGI_color_matrix, GL_SGI_color_table,

    GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,

    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_S3_s3tc

glu version: 1.3

glu extensions:

    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav

 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat

----------------------------------------------------------------------

0x23 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x24 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 None

0x25 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x26 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

0x27 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x28 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 None

0x29 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x2a 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

0x2b 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x2c 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 None

0x2d 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x2e 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

0x2f 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x30 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 None

0x31 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x32 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 SlowLast edited by ccrunner84 on Mon Mar 29, 2004 12:17 am; edited 1 time in total

----------

## ccrunner84

Here is the output of GLXGEARS, before I used to get around 1300FPS, and I recall it said SSE not SSE2 in my GLXINFO also, that might have helped a tad  :Razz: 

bash-2.05b# glxgears

libGL warning: 3D driver claims to not support visual 0x24

libGL warning: 3D driver claims to not support visual 0x28

libGL warning: 3D driver claims to not support visual 0x2c

libGL warning: 3D driver claims to not support visual 0x30

Mesa: software DXTn compression/decompression available

7503 frames in 5.0 seconds = 1500.600 FPS

8348 frames in 5.0 seconds = 1669.600 FPS

8359 frames in 5.0 seconds = 1671.800 FPS

8358 frames in 5.0 seconds = 1671.600 FPS

8356 frames in 5.0 seconds = 1671.200 FPS

8346 frames in 5.0 seconds = 1669.200 FPS

----------

## ccrunner84

Is anyone trying this out on gentoo? Want to make sure its working for you all.

----------

## thedumbkid

I have a 7500 AIW!  :Smile: 

so I'll give it a try...

I was kinda pissed off that windows runs UT2004 much better than on linux

maybe this will help

what's s3tc btw?

----------

## ccrunner84

well s3tc just allows you to use high res textures with literally no performance hits, and if any you will gain some performance.. it's a great thing to have since us 7500 and below users can't use the binary drivers

----------

## thedumbkid

nice, that should help... I hope!

I turned off everything including detail texture and stuff under linux

or else it lags like mad!

under windows it's nice and smooth

um..

"Download the following tar file to your /HOMEFOLDER/Mesa/src/mesa directory"

so... where's the tar file?

so I couldn't compile just by typing "make" for that dxtn thingy

added -I/usr/X11R6/include to Makefile and it compiled w/o complaining afterwards

----------

## ccrunner84

hey there I updated the guide with the proposed patch to the bugged code, also added the link I forgot to add..  :Razz: 

----------

## MasterX

 *thedumbkid wrote:*   

> 
> 
> I turned off everything including detail texture and stuff under linux
> 
> 

 

How did you turn them off?

I have radeon 7500 and I do not see any problem with the performance of the video card. The only thing that I am missing is the TvOut. I am using Xfree 4.3.99.902.

----------

## thedumbkid

 *MasterX wrote:*   

> How did you turn them off?
> 
> I have radeon 7500 and I do not see any problem with the performance of the video card. The only thing that I am missing is the TvOut. I am using Xfree 4.3.99.902.

 I turn it off within UT2004...

performance on linux just sucks for me

I can play UT2004 w/ many things turned on (Windows) and it'd still run smooth without lag

I'm also using XFree 4.3.99.902

----------

## ccrunner84

well to my knowledge another downfall of the DRI drivers is there is no HyperZ which can really slow the card down.  Another big factor is the people that made the cards are directly making the drivers  :Sad:  They'll get better soon, with people who made this patch just coming up with these ideas and another mods to current things its just a matter of time  :Smile: 

----------

## thedumbkid

damn still having problem building  :Sad: 

um... where did you install Mesa to btw?

----------

## MasterX

 *ccrunner84 wrote:*   

> well to my knowledge another downfall of the DRI drivers is there is no HyperZ which can really slow the card down.  Another big factor is the people that made the cards are directly making the drivers  They'll get better soon, with people who made this patch just coming up with these ideas and another mods to current things its just a matter of time 

 

If I understood correctly, I must uninstall Xfree in order to install the drivers you talking about, right? I see that these drivers are from freedesktop.

----------

## Greywind

This has speed up my frame rate in NWN but now I have the shiny problem with nwn again.  I

I can live with that one for now, but the speed improvement of frame rates makes the game more playable.

glxgears gave me no improvements if not slowed me down from 1500 to 900 then up to 1400.  Kind of funny to watch the gears actually stop for a second then take off spining

Linux spongebob 2.6.5-rc2 #11 Sun Apr 4 22:44:55 EDT 2004 i686 AMD Athlon(tm) XP 1700+ AuthenticAMD GNU/Linux

----------

## Spock

Hi,

does this S3TC Patch works for other graphic cards too ? I have an ProSavage8 and on the via tech site i can see that s3tc works on this chip.

----------

## sdaffis

It would be really interesting to see what difference this makes for users of older Radeons. Forgive my laziness, but who wrote the s3tc patch?   :Smile: 

----------

## genstef

hi,

i would like to try this out for my radeon m6 but i think it is comparable to a 7000 and r100, does your howto then still work?

atm i get around 600fps and i dont think its the full potential of the card

would be nice if you could make an ebuild for this, because i dont like to install not uninstallable software.

Also i do not know if this will work for xorg as i dropped xfree recently from my computer.

thanks genstef

----------

## Hypnos

If you can integrate this patching process into an ebuild (i.e., xorg-x11) you will have my undying love ...

----------

## Spock

S3TC will only work if the driver itself is patched too. Thats why you need to download that r200 patch. 

Here you can grep the snapshot for s3tc:

http://vayne.fdns.net/files/libtxc_dxtn040524.tar.gz

----------

## Hypnos

Gratitude:

* Thanks to ccrunner84 for working this out

* Thanks to whoever maintains vayne.fdns.net for posting new, nearly-CVS compatible patches

Build:

* One day, the port of Xorg to autotools will be complete, and I will not have to make stupid soft links

* Also at that time, it won't take forever to build due to stupid deletions

* Beyond that insanity, the build was painless

Results:

* Quake 3 can't seem to find GL_S3_s3tc even though it's right there in glxinfo, but I still seem to get a small performance boost.

* Will try with UT2004 ....

EDIT:

UT2004 looks spectacular -- I might buy it.  Playable at max settings on my Radeon 7500 + P4 1.6GHz.

----------

## yardbird

Got it working on radeon IGP 340 M  :Smile: 

Grabbed latest Mesa and DRI CVS; the patch applied cleanly for the r200 driver but had some rejects for i8xx, so I just compiled the driver for my board. 

Glxinfo output:

```

name of display: :0.0

Mesa: software DXTn compression/decompression available

display: :0  screen: 0

direct rendering: Yes

server glx vendor string: SGI

server glx version string: 1.2

server glx extensions:

    GLX_ARB_multisample, GLX_EXT_visual_info, GLX_EXT_visual_rating,

    GLX_EXT_import_context, GLX_OML_swap_method, GLX_SGI_make_current_read,

    GLX_SGIS_multisample, GLX_SGIX_fbconfig

client glx vendor string: SGI

client glx version string: 1.4

client glx extensions:

    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_allocate_memory,

    GLX_MESA_swap_control, GLX_MESA_swap_frame_usage, GLX_OML_swap_method,

    GLX_OML_sync_control, GLX_SGI_make_current_read, GLX_SGI_swap_control,

    GLX_SGI_video_sync, GLX_SGIS_multisample, GLX_SGIX_fbconfig,

    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group

GLX extensions:

    GLX_ARB_get_proc_address, GLX_ARB_multisample, GLX_EXT_import_context,

    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_swap_control,

    GLX_MESA_swap_frame_usage, GLX_OML_swap_method, GLX_SGI_video_sync,

    GLX_SGIS_multisample, GLX_SGIX_fbconfig

OpenGL vendor string: Tungsten Graphics, Inc.

OpenGL renderer string: Mesa DRI Radeon 20030328 AGP 4x x86/MMX/SSE2 NO-TCL

OpenGL version string: 1.2 Mesa 6.1

OpenGL extensions:

    GL_ARB_imaging, GL_ARB_multisample, GL_ARB_multitexture,

    GL_ARB_texture_border_clamp, GL_ARB_texture_compression,

    GL_ARB_texture_env_add, GL_ARB_texture_env_combine,

    GL_ARB_texture_env_crossbar, GL_ARB_texture_env_dot3,

    GL_ARB_texture_mirrored_repeat, GL_ARB_transpose_matrix,

    GL_ARB_window_pos, GL_EXT_abgr, GL_EXT_bgra, GL_EXT_blend_color,

    GL_EXT_blend_logic_op, GL_EXT_blend_minmax, GL_EXT_blend_subtract,

    GL_EXT_clip_volume_hint, GL_EXT_compiled_vertex_array, GL_EXT_convolution,

    GL_EXT_copy_texture, GL_EXT_draw_range_elements, GL_EXT_histogram,

    GL_EXT_packed_pixels, GL_EXT_polygon_offset, GL_EXT_rescale_normal,

    GL_EXT_secondary_color, GL_EXT_separate_specular_color, GL_EXT_subtexture,

    GL_EXT_texture, GL_EXT_texture3D, GL_EXT_texture_compression_s3tc,

    GL_EXT_texture_edge_clamp, GL_EXT_texture_env_add,

    GL_EXT_texture_env_combine, GL_EXT_texture_env_dot3,

    GL_EXT_texture_filter_anisotropic, GL_EXT_texture_lod_bias,

    GL_EXT_texture_mirror_clamp, GL_EXT_texture_object,

    GL_EXT_texture_rectangle, GL_EXT_vertex_array, GL_APPLE_packed_pixels,

    GL_ATI_texture_env_combine3, GL_ATI_texture_mirror_once,

    GL_IBM_rasterpos_clip, GL_IBM_texture_mirrored_repeat,

    GL_MESA_ycbcr_texture, GL_MESA_window_pos, GL_NV_blend_square,

    GL_NV_light_max_exponent, GL_NV_texture_rectangle,

    GL_NV_texgen_reflection, GL_SGI_color_matrix, GL_SGI_color_table,

    GL_SGIS_generate_mipmap, GL_SGIS_texture_border_clamp,

    GL_SGIS_texture_edge_clamp, GL_SGIS_texture_lod, GL_S3_s3tc

glu version: 1.3

glu extensions:

    GLU_EXT_nurbs_tessellator, GLU_EXT_object_space_tess

   visual  x  bf lv rg d st colorbuffer ax dp st accumbuffer  ms  cav

 id dep cl sp sz l  ci b ro  r  g  b  a bf th cl  r  g  b  a ns b eat

----------------------------------------------------------------------

0x23 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x24 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow

0x25 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x26 16 tc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

0x27 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x28 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow

0x29 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x2a 16 tc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

0x2b 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x2c 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow

0x2d 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x2e 16 dc  0 16  0 r  .  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

0x2f 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0  0  0  0  0  0 0 None

0x30 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8  0  0  0  0  0 0 Slow

0x31 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  0 16 16 16  0  0 0 Slow

0x32 16 dc  0 16  0 r  y  .  5  6  5  0  0 16  8 16 16 16  0  0 0 Slow

```

This is on xorg 6.7.0. Now I'm gonna try ut2004  :Very Happy: 

In the meanwhile... Thumbs up!

EDIT: Hypnos, I guess you are talking about the linux version of ut2004. Did you do anything strange to make it run fast with your card? I'm asking because a friend of mine has a 7500 and his board performs more or less equally to mine under Windows. But with my IGP under linux I just can't say that ut2004 runs well. I think it is a driver maturity problem since IGP support is not stable in DRI yet.. But also I could be doing some horrible mistake..Last edited by yardbird on Thu Jun 17, 2004 12:14 pm; edited 1 time in total

----------

## Spock

Nice to see...

There is a new Patch out for Intel Graphic Cards:

http://vayne.fdns.net/files/mesa_r200_radeon_i830_txc_cvs040607.diff.gz

Savage Patch is in heavy development !!!  :Smile:  So people with ProSavage Chips can use the extension soon.

----------

## genstef

does the patch also work with r100?

because there is always r200 in the name ..

----------

## Eagle_

Hi,

I am having T41 ThinkPad with 7500 radeon (r200).

I had follow the guid as far as I understood (i am new in gentoo), and after i done: *Quote:*   

> make World >& world.log

  i found an error in my world.log: *Quote:*   

>  make[4]: *** No rule to make target `/X11R6/SourceForge/DRI-freedesktop/drm/shared/drm.h', needed by `drm.h'.  Stop.
> 
> make[4]: Leaving directory `/root/DRI-CVS/xc/xc/lib/GL/dri/drm'
> 
> make[3]: *** [includes] Error 2
> ...

 

What had i done wrong?

----------

## Eagle_

I forgut to say i am using kernel 2.6.7-gentoo-r6

After i had edited the line in host.def: *Quote:*   

> 
> 
> #define DRMSrcDir /X11R6/SourceForge/DRI-freedesktop/drm
> 
> to 
> ...

 

my problem was that when i done make World, it looked for the file drm.h in /usr/src/linux-2.6.7-gentoo-r6/drivers/char/drm/shared/

which i dont have, the file drm.h is under the folder .../drm/

----------

## Flamie

I'm not very fond of doing patches on the sourcecode myself so I was wondering if there is an ebuild for this patch?

another thing is that since it is a patent issue, wouldn't it be wise to include the patch but not as default?

USE="s3tc" could then enable the patch for those countries where the patent isn't valid or at least haven't been proven in court yet >_<

I suggest that you who wrote this guide, why not send it upwards to the xorg and xfree ebuild maintainers so that they could add it as a  local use flag ?

----------

## genstef

Yes, there is an ebuild, and the process is so much easier now with xorg-x11-6.8.0.

just 

```
emerge -va xorg-x11
```

then ctrl+Z after "done with patching"

go to the mesa src dir in the xorg sources(find -iname mesa in /var/tmp/portage/xorg..)

```
wget http://homepage.hispeed.ch/rscheidegger/dri_experimental/mesa_dri_txc_cvs040716.diff.gz

gunzip mesa_dri_txc_cvs040716.diff.gz

patch -p0 --dry-run< mesa_dri_txc_cvs040716.diff

patch -p0 < mesa_dri_txc_cvs040716.diff
```

After that you can use it. If you need the problematic parts also you can emerge them with this ebuild:

```
# Copyright 1999-2004 Gentoo Foundation

# Distributed under the terms of the GNU General Public License v2

# $Header: /var/cvsroot/gentoo-x86/x11-libs/libtxc_dxtn/libtxc_dxtn-040623.ebuild,v 1.13 2004/09/13 19:16:28 genstef Exp $

IUSE=""

MY_P=${PN}${PV}

S=${WORKDIR}/${PN}

DESCRIPTION="no"

SRC_URI="http://homepage.hispeed.ch/rscheidegger/dri_experimental/${MY_P}.tar.gz"

HOMEPAGE="http://homepage.hispeed.ch/rscheidegger/dri_experimental/s3tc_index.html"

DEPEND=""

SLOT=""

LICENSE="BSD"

KEYWORDS="~x86"

src_compile() {

    emake || die "emake failed"

}

src_install() {

    dolib.so libtxc_dxtn.so

}
```

ALso the driver now applies to far mor cards: intel integrated and r100/r200.

For more details see http://homepage.hispeed.ch/rscheidegger/dri_experimental/s3tc_index.html

----------

## Hypnos

Thanks, works well; unfortunately, Q3Demo still doesn't see the extension, but UT2004demo continues to look great.   (Radeon 7500)

----------

## genstef

If  you install the extra parts  with the ebuild, will q3demo work then?

----------

## Hypnos

 *genstef wrote:*   

> If  you install the extra parts  with the ebuild, will q3demo work then?

 

No, doesn't make a difference  :Sad: 

I tried a session with "LD_PRELOAD=/usr/lib/libtxc_dxtn.so" and I still get the following (note the bold text):

 *Quote:*   

> Q3 1.11 linux-i386 Dec  4 1999
> 
> ----- FS_Startup -----
> 
> Current search path:
> ...

 

One things I did find out is that EnablePageFlip makes a big difference in Quake performance.

```
Section "Device"

    Identifier  "ATI Radeon Mobility 7500"

    Driver      "radeon"

    Option "AGPMode" "4"

    Option "EnablePageFlip" "1"

   Option "AGPFastWrite" "1"

   Option "DynamicClocks" "1"

    #VideoRam    32768

    # Insert Clocks lines here if appropriate

EndSection

```

----------

## genstef

Does glxgears tell you, that s3tc is used?

----------

## Hypnos

 *genstef wrote:*   

> Does glxgears tell you, that s3tc is used?

 

Output:

```
Mesa: software DXTn compression/decompression available

6334 frames in 5.0 seconds = 1266.800 FPS

7017 frames in 5.0 seconds = 1403.400 FPS

6936 frames in 5.0 seconds = 1387.200 FPS

7290 frames in 5.0 seconds = 1458.000 FPS

7295 frames in 5.0 seconds = 1459.000 FPS

7296 frames in 5.0 seconds = 1459.200 FPS

7262 frames in 5.0 seconds = 1452.400 FPS

7297 frames in 5.0 seconds = 1459.400 FPS

7253 frames in 5.0 seconds = 1450.600 FPS

7298 frames in 5.0 seconds = 1459.600 FPS

7298 frames in 5.0 seconds = 1459.600 FPS

```

----------

## genstef

Sorry, I have no clue, I just thought this would speed up my performance.

But I have some errors and I do not know if they are related to this patch ..

mplayer:

```

Xlib:  extension "XFree86-VidModeExtension" missing on display ":0.0".

vo: X11 running at 1024x768 with depth 16 and 16 bpp (":0.0" => local display)

Xlib:  extension "XVideo" missing on display ":0.0".

Sorry, Xv not supported by this X11 version/driver

******** Try with  -vo x11  or  -vo sdl  *********

```

skype:

```
~ $ skype

Engine::init invoked. user is 

Sound device is not defined

Engine::init success

UI: Engine::Engine credentials loaded

SkyWindowBase::onlineStatusChanged setting pixmap

Xlib:  extension "SHAPE" missing on display ":0.0".

DialPad: DialPad

language selected: 5

Xlib:  extension "SHAPE" missing on display ":0.0".

Xlib:  extension "SHAPE" missing on display ":0.0".

Xlib:  extension "SHAPE" missing on display ":0.0".

Xlib:  extension "SHAPE" missing on display ":0.0".

Xlib:  extension "SHAPE" missing on display ":0.0".

Xlib:  extension "SHAPE" missing on display ":0.0".

Xlib:  extension "SHAPE" missing on display ":0.0".

```

I can use all the programms, but no 3d-game works glxgears shows normal rates but the gears do not spin slowly, but very fast so I cannot see them move.

Resizing in mplayer works no only with -zoom

This all was since the new xorg and the s3tc patch and I changed my xorg.conf ... I do not know where it comes from  :Sad: 

----------

## Hypnos

Looks like UT2004 runs w/o texture compression now, but it looks horrid.

Any update for Xor 6.8.2?   :Very Happy: 

----------

## mkrisch

i got s3tc working as follows.  emerge xorg as normal.  i'm using 6.8.2.

then, go read http://dri.sourceforge.net/cgi-bin/moin.cgi/Download and you'll see that you can just download the snapshot (http://dri.freedesktop.org/snapshots/).  for the radeon 7500, you want the radeon snapshot.

next make sure /usr/src/linux points to the correct kernel, and then install the snapshot.

s3tc is working fine with nwn.

----------

## Hypnos

Thank you, mkrisch!  UT2004 now plays normally (though the menus look very odd.)

Also, the new DRI snapshot is smoking!  glxgears has gone up from 1470 to 1593, and I can play Quake3 and UT2004 at max settings!  (Radeon 7500 Mobile, Pentium 4-M 1.6GHZ)

----------

## plonka2000

 *Hypnos wrote:*   

> Thank you, mkrisch!  UT2004 now plays normally (though the menus look very odd.)
> 
> Also, the new DRI snapshot is smoking!  glxgears has gone up from 1470 to 1593, and I can play Quake3 and UT2004 at max settings!  (Radeon 7500 Mobile, Pentium 4-M 1.6GHZ)

 

THATS MY T41 SETUP! Excellent! Will be trying that...

----------

