[Mesa-dev] [PATCH v2 0/12] Add support for BPTC texture compression

Neil Roberts neil at linux.intel.com
Wed Aug 6 09:27:45 PDT 2014


Here is a v2 of the BPTC texture compression series. The main
difference is that instead of going via DXT3 for the UNORM formats it
now always uses the custom naïve compressor for all formats. This
doesn't give very good-looking results but it is fast and doesn't add
any dependencies. There was some discussion about alternative
approaches on the list here:

http://lists.freedesktop.org/archives/mesa-dev/2014-July/064436.html

I didn't manage to get any consensus on whether this approach is the
right thing to do so I thought I would just post the patches and see
what happens.

The other changes are:

• The patches are rebased on top of Jason Ekstrand's texstore changes.
  This required some modification to format_info.py.

• Added a patch to make glGenerateMipmap work with the BPTC formats.

• Added a patch to make the meta implementation of glGetTexImage work
  with the two floating-point formats.

• Added the formats to some format query functions that were missed.
  (There are a lot of switches for formats spread around Mesa!)

• Fixed setting the alpha component to 1.0 when fetching from the RGB
  half-float formats.

• Fixed fetching the alpha component from sRGB formats.

• Fixed the quantization step for the half-float compressor.

• Fixed a typo causing a bug in the compressor for textures with a
  width that isn't a multiple of four.

The patches are also available on Github here:

https://github.com/bpeel/mesa/commits/wip/bptc

There are piglit tests for BPTC in a branch here:

https://github.com/bpeel/piglit/commits/wip/bptc

- Neil



More information about the mesa-dev mailing list