mesa drivers and S3TC

mesa drivers and S3TC

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
oibaf
Posts: 2
Joined: 07 Dec 2010, 13:10

mesa drivers and S3TC

Post by oibaf »

Hi, wrt to the thread at the mesa-dev mailing lists some time ago, do you know it's possible to force S3TC within mesa driver setting the env variable:

Code: Select all

force_s3tc_enable=true
This could be set by the spring executable with a setenv call, thus avoiding the need to install libtxc_dxtn or forcing it with driconf. Of course this will not enable texture compression but only decompression, as the driconf trick. 0 A.D. game is already doing this:
http://trac.wildfiregames.com/wiki/CompressedTextures
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: mesa drivers and S3TC

Post by SpliFF »

yes, this has been discussed. from what I can tell that setting may actually be the outcome of the initial mesa-dev discussion and I believe our wiki and existing discussion threads include this information.

The setenv information is interesting but it might make distros like debian a little nervous since the whole point of the switch is to hand responsibility for any possible patent violation over to the end-user.
oibaf
Posts: 2
Joined: 07 Dec 2010, 13:10

Re: mesa drivers and S3TC

Post by oibaf »

SpliFF wrote:yes, this has been discussed. from what I can tell that setting may actually be the outcome of the initial mesa-dev discussion and I believe our wiki and existing discussion threads include this information.

The setenv information is interesting but it might make distros like debian a little nervous since the whole point of the switch is to hand responsibility for any possible patent violation over to the end-user.
The problem of using the setenv or the driconf is that you get an incomplete/broken S3TC extension, lacking compression support. Indeed it only supports decompression, which is not patented since it's managed directly inside graphic hardware and not mesa. It's disabled by default because applications which use S3TC compression would be broken, not because of patent problems.

The patent problem arise only when you install libtxc_dxtn.so which fully supports S3TC and this was the point of using an external library rather that having it in mesa.

So if your game only uses S3TC decompression you could integrate the setenv trick with no problem as is doing the 0 A.D. game.
Post Reply

Return to “Engine”