Findings and what is left

Both transcoders are meant: ASTC made BC7 (this page) and BCn made ASTC (BCn without BCn), which share the fitter (bc7_encode.glsl). Every time is a GeForce GT 1030's, the one GPU any of this was measured on, on levels two games load (astc_dump=DIR) and on random blocks.

What was found

Each is a measurement that decided how the shaders are written. Most have their numbers where the thing is described; they are together here so that a change that goes against one is made knowing it.

Where the time is.

The fitter.

What was tried and left out.

How it is held. The shaders are written in what GLSL and C++ share, so each runs on the CPU (tests/glsl/glsl.hpp) and the GPU's bytes are held to that run, block for block. Every rewrite above was made against it: the same bytes, or a bound stated in a test. The arithmetic that stands in for a table is checked against the decoder's own rules over every input. Keep that: it is what let the fitter's inner loop, the quantizer and two passes be rewritten in a day each.

What is left

What the transcoders do not do yet, for whoever takes them further.

Measure on a phone. The BCn to ASTC build's first two passes keep no arrays, read no table and, for the layouts they write, run no floating point, because Adreno and Mali are said to be slow with each. None of it has been timed on either. Before anything below: the three passes' times on an Adreno 6xx and a Mali, with arrays and without (SNX_NO_ARRAYS), and with the colour encodings worked out and read from a table (the commit that removed the tables has them).

The third pass, the search, still has arrays. It is the fitter the BC7 encoder shares, and nearly all of the time of a level that is not mostly moved (88 of 90 ms).

Blocks that could be moved and are decoded. Every block the first pass moves costs a hundredth of one searched for, so each kind below is worth more than any tuning of the fitter.

Layouts the ASTC encoder does not write. Three and four partitions (BC7 modes 0 and 2 have three subsets and are searched for as one or two); two partitions with alpha (mode 7); two partitions with two planes; weight grids smaller than 4x4, which buy the ends more values; the blue contraction and the base and offset endpoint modes, which give ends near each other a bit more each. Each is a layout in AstcEncode's list and a row in AsPack.

Smaller things.


Made from docs/layers/gpu/astc.md at 69237645142c. GPL-3.0-or-later.