Measured against the BCn blocks decoded, which is what a GPU without BCn showed before, on three 512x512 photographs
and two 256x256 icons with alpha, made BCn by the test's own encoders and the BC7 one (snx-test-bcn-etc2-glsl
--image):
| BCn | colour, dB | alpha, dB | lost against the original picture, past what BCn lost |
|---|---|---|---|
| BC1 | 36.9 to 49.1 | exact | 0.1 to 1.4 dB |
| BC2, BC3 | 37.2 to 49.1 | 50.0 to 58.6 | 0.7 to 3.0 dB |
| BC4, BC5 | 46.5 to 63.6 | ||
| BC7 | 35.8 to 48.4 | 50.2 to 53.5 | 5.5 to 11 dB |
BC7 loses most: ETC2 RGBA8 holds less than BC7's partitions and 4 bit weights do, which is why BC2, BC3 and BC7 go to ASTC 4x4 where the GPU samples it (As ASTC).
Time, snx-test-astc-vulkan --bench-etc2 on a GT 1030 (the build with packed dot products), a 2048x2048 level, the
dispatch alone, encoded again as ETC2 or EAC, before and after the steps of What a texel costs:
| Blocks | before | now |
|---|---|---|
| random BC1 | 199 ms | 76 ms |
| random BC3 | 178 ms | 82 ms |
| random BC4 | 55 ms | 11 ms |
| random BC5 | 119 ms | 22 ms |
| random BC7 | 192 ms | 90 ms |
a Kodak crop made BC7 (--bench-etc2 FILE.rgba, 512x512 repeated) | 85 to 106 ms | 57 ms |
The same picture's blocks encoded again as ASTC 4x4 take 5 ms: most of them are moved, not searched for. Random blocks take every candidate; a game's blocks of one colour or one alpha stop earlier. On llvmpipe, before these steps: BC1 105 ms, BC3 95, BC4 35, BC5 65, BC7 117. The pipeline is compiled the first time a BCn texture loads (1.3 s on the GT 1030), and kept in the pipeline cache.
Made from docs/layers/gpu/bcn.md at 69237645142c. GPL-3.0-or-later.