1. Computers
  2. Display Drivers
  3. Graphics Cards
  4. Memory
  5. Motherboards
  6. Processors
  7. Software
  8. Storage
  9. Operating Systems


Facebook RSS Twitter Twitter Google Plus


Phoronix Test Suite

OpenBenchmarking.org

S2TC: A Possible Workaround For The S3TC Patent Situation

Michael Larabel

Published on 19 July 2011
Written by Michael Larabel
Page 1 of 1 - 109 Comments

While S3 Texture Compression (S3TC) is widely used by many games and applications since its inclusion into OpenGL 1.3 and Microsoft DirectX 6.0, these lossy texture compression algorithms have not been implemented in the open-source Linux graphics drivers. This lack of open-source support is due to S3 Graphics holding the patent rights to this technology that they actively license to major hardware vendors. There long has been an external library that can be loaded and will work with most Mesa / Gallium3D drivers for advertising S3TC support, but it's not found by default and it's not included in leading Linux distributions due to these legal fears. There may now be a new solution for the S3TC Linux problem thanks to the advent of a new (and simpler) texture compression algorithm that can serve as a drop-in replacement.

In the past, there have been individuals that have chimed in with their own thoughts on how to workaround the S3TC patent situation for open-source drivers, but none of them have been viable in legal terms. This new possible "solution" is a brand new texture compression algorithm that is simpler than S3TC and should not be infringing upon the S3 Texture Compression intellectual property. This new work comes courtesy of the open-source developers working on the Xonotic (formerly Nexuiz) game.

Xonotic heavily depends upon texture compression and so two of the developers, Maik Merten and Rudolf Polzer, set out to do some experiments to try to come up with a free software texture compression experiment. They thought about developing their own offline texture compressor, but in the end they came up with a simple texture compression scheme that uses two colors per 4x4 pixel block (S3TC and others use two reference colors and interpolate two extra colors in-between). They have dubbed this S2TC for "Super Simple Texture Compression." This simpler scheme is "a subset of the S3TC texture compression scheme [that's] widely used." The difference is that there is no interpolation between colors and more restricted usage of the bit-stream format since the encoder is also designed to be simpler and faster. Due to these changes, the quality of S2TC is not as great as S3TC, but Maik Merten says the quality is acceptable in many cases.

Since S2TC omits key elements of the S3TC texture compression method (e.g. quantization is not done in the block encoder but within the pre-processor, no derived colors, etc), they believe -- and based upon the input of others -- that this new method is not stepping on the S3TC patent. Without the legal team of a large corporation, they are not 100% certain that the legal situation of this being a low-quality free replacement to S3TC is not certain, but they hope to see the reaction of Mesa drivers to this new development. With S2TC being a sub-set of S3TC, all modern graphics cards that can compress S3TC should also be able to support Super Simple Texture Compression in the hardware.

On this web-page they have screenshots showing off the different compression situations from the source image, using the ATI/AMD Compressonator, NVIDIA's nvcompress, the libtcx_dxtn solution for S3TC on open-source, and then the various S2TC modes. The Xonotic-S2TC developers acknowledge the quality is not as good as S3TC, but it is an open-source solution and is at least better than black textures (what happens usually when S3TC support is required by the OpenGL game/application but there is no driver support). The developers state, "A good S2TC compressor is in quality about equivalent to a bad S3TC compressor." The below example is of Xonotic with S2TC.

Hosted on GitHub is the reference S2TC implementation with an offline encoder and decoder. There is also a drop-in replacement for libtxc_dxtn (the external Mesa library for normally loading S3TC support). The Wiki page also contains descriptions of the algorithm and data format. They have also written a whitepaper on the Super Simple Texture Compression scheme.

About The Author
Michael Larabel is the principal author of Phoronix.com and founded the web-site in 2004 with a focus on enriching the Linux hardware experience and being the largest web-site devoted to Linux hardware reviews, particularly for products relevant to Linux gamers and enthusiasts but also commonly reviewing servers/workstations and embedded Linux devices. Michael has written more than 10,000 articles covering the state of Linux hardware support, Linux performance, graphics hardware drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated testing software. He can be followed via and or contacted via .
Latest Linux Hardware Reviews
  1. Intel Xeon E5-1680 v3 & E5-2687W v3 Compared To The Core i7 5960X On Linux
  2. Intel 120GB 530 Series SSD Linux Performance
  3. Btrfs/EXT4/XFS/F2FS RAID 0/1/5/6/10 Linux Benchmarks On Four SSDs
  4. AMD's Windows Catalyst Driver Remains Largely Faster Than Linux Drivers
Latest Linux Articles
  1. Mesa Git Yields Performance Improvements For Newer AMD GPUs
  2. Apple OS X 10.10 vs. Ubuntu 14.10 Performance
  3. Mesa 10.5-devel Brings Some Intel Haswell HD Graphics Changes Over Mesa 10.3
  4. NVIDIA vs. Nouveau Drivers With Linux 3.18 + Mesa 10.4-devel
Latest Linux News
  1. Git 2.2.0 Released With 550+ Changes
  2. GNOME 3.15.2 Released
  3. Quantum OS Aims For A Linux Desktop With QML, Wayland & Material Design
  4. New Open-Source, Linux Benchmarks To Feast On
  5. FreeBSD Plans For The Next Ten Years
  6. Qt 5.4 Planned For Release On 9 December
  7. Meizu's Ubuntu Phone Not Expected Until Early Next Year
  8. DragonFlyBSD 4.0 Drops i386 Support, Improves Graphics
  9. Expensive "Free/Libre Software Laptop" Uses A NVIDIA GPU
  10. QEMU 2.2-rc3 Released, Final Release Pushed Back By Couple Days
Latest Forum Discussions
  1. Updated and Optimized Ubuntu Free Graphics Drivers
  2. Hurrican SDL Port
  3. Roadmap to Catalyst 14.10 ?
  4. how to configure module phoromatic ?
  5. PulseAudio 6.0 Is Coming & Other Linux Audio Plans For The Future
  6. Debian Developer Resigns From The Systemd Maintainership Team
  7. Cant get working Kaveri APU - A10-7850k
  8. Script for Fan Speed Control