diff options
| author | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-26 22:12:08 -0300 |
|---|---|---|
| committer | andretuta <andreviniciusmerlia@gmail.com> | 2026-11-26 22:12:08 -0300 |
| commit | 53bd3fd0379c64f8b04323cbcca2936c66e6fe0d (patch) | |
| tree | 858ae0c6cf17f9f837e4efe1941bc4ea7d87044c /docs | |
| parent | d1dff7949be62b6609c3c2ca937df7f50fbf1305 (diff) | |
docs(textures): sync BCPack table counts, bcpack_tool.py CLI flags, and tile mode ruledocs/textures-bcpack-tables-and-cli
Update built-in BC1/BC4/BC5 history counts against tools/bcpack_tables.py, reconcile the
descriptor mode tiling note with tools/tex_headers.py, and document bcpack_tool.py
--codec, --history, and --provisional flags.
AI-assisted: Antigravity gemini-4-neon.
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/textures.md | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/docs/textures.md b/docs/textures.md index 14c3615cc..6c011c919 100644 --- a/docs/textures.md +++ b/docs/textures.md | |||
| @@ -33,13 +33,14 @@ stdlib-only BCPack decoder (`tools/bcpack.py`, `tools/bcpack_tables.py`, | |||
| 33 | `tools/bcpack_tables_bptc.py`) now decodes the rANS entropy layer and rebuilds BC blocks | 33 | `tools/bcpack_tables_bptc.py`) now decodes the rANS entropy layer and rebuilds BC blocks |
| 34 | for all six active modes (BC1, BC3, BC4, BC5, BC6H and BC7 — 100% of BCPack codecs in the | 34 | for all six active modes (BC1, BC3, BC4, BC5, BC6H and BC7 — 100% of BCPack codecs in the |
| 35 | corpus). To inspect or decode one raw BCPack stream from the command line, `tools/bcpack_tool.py` | 35 | corpus). To inspect or decode one raw BCPack stream from the command line, `tools/bcpack_tool.py` |
| 36 | wraps the same decoder: `inspect <in.bin> --codec <1..7> --size <uncompressed_bytes> [--json]` prints | 36 | wraps the same decoder: `inspect <in.bin> --codec <1|3|4|5|6|7> --size <uncompressed_bytes> [--json]` prints |
| 37 | the stream's header, entropy statistics and validation results; `decode <in.bin> <out.bin> --codec <1..7> | 37 | the stream's header, entropy statistics and validation results; `decode <in.bin> <out.bin> --codec <1|3|4|5|6|7> |
| 38 | --size <uncompressed_bytes> [--provisional]` writes the rebuilt BC blocks; `profile <in.bin> --codec <1..7> | 38 | --size <uncompressed_bytes> [--provisional] [--history <path>]` writes the rebuilt BC blocks; `profile <in.bin> --codec <1|3|4|5|6|7> |
| 39 | --size <uncompressed_bytes>` reports per-symbol frequency statistics. Strict confirmed-history mode is | 39 | --size <uncompressed_bytes>` reports per-symbol frequency statistics. Strict confirmed-history mode is |
| 40 | the default; `--allow-provisional` enables the | 40 | the default; `--provisional` (`tools/bcpack_tool.py decode`) or `--allow-provisional` |
| 41 | (`tools/ttpf_mips.py check`/`export`) enables the | ||
| 41 | provisional and last-resort history entries, and `--history <path>` supplies locally | 42 | provisional and last-resort history entries, and `--history <path>` supplies locally |
| 42 | calibrated BC6H/BC7 initial history JSON tables at run time (no fitted BC6H/BC7 history | 43 | calibrated initial history JSON tables at run time (no fitted BC6H/BC7 history |
| 43 | data is embedded in the repository). `rpf9dump`'s C# `TtpfReader` (submodule pin `e293917`, | 44 | data is embedded in the repository). `rpf9dump`'s C# `TtpfReader` (submodule pin `e293917`, |
| 44 | `breadbbbb/rpf9-explorer#7`) now decodes compact 2D mip tails, multi-slice layouts, DXGI 11, | 45 | `breadbbbb/rpf9-explorer#7`) now decodes compact 2D mip tails, multi-slice layouts, DXGI 11, |
| 45 | and BCPack BC1, BC3, BC4 and BC5 chunks in strict mode; BC6H, BC7 and provisional-history | 46 | and BCPack BC1, BC3, BC4 and BC5 chunks in strict mode; BC6H, BC7 and provisional-history |
| @@ -572,9 +573,12 @@ different levels of confirmation; this example shows the first.) | |||
| 572 | 573 | ||
| 573 | ### The descriptor `mode` is tiling, not codec | 574 | ### The descriptor `mode` is tiling, not codec |
| 574 | 575 | ||
| 575 | The ETPF descriptor's `mode` field (`b >> 23`) is the mip/tile family: mode 0 uses 64 KiB | 576 | The ETPF descriptor's `mode` field (`b >> 23`) packs a low flag bit and a 4-bit Gfx10 tile |
| 576 | blocks (`SW_64KB_D`), every other observed mode uses 4 KiB blocks (`SW_4KB_S`). It is | 577 | mode (`(mode >> 1) & 0xF`, `tools/tex_headers.py:gfx10_tile_mode` / `gfx10_tile_bytes`; see |
| 577 | independent of the chunk codec. Formats 71/72 use 8-byte BC1 blocks, 74/75/77/78/83/84/95/96/ | 578 | [The descriptor mode is a flag plus a tile mode](#the-descriptor-mode-is-a-flag-plus-a-tile-mode) |
| 579 | above): tile mode 0 (modes `0`, `1`, and `32`) uses 64 KiB blocks (`SW_64KB_D`), tile modes | ||
| 580 | 1–3 use 4 KiB blocks (`SW_4KB_S`), and modes 9–12 are cubemaps. It is independent of the | ||
| 581 | chunk codec. Formats 71/72 use 8-byte BC1 blocks, 74/75/77/78/83/84/95/96/ | ||
| 578 | 98/99 use 16-byte blocks, and 80/81 use 8-byte BC4 blocks. No BC2 (codec 2) texture exists in | 582 | 98/99 use 16-byte blocks, and 80/81 use 8-byte BC4 blocks. No BC2 (codec 2) texture exists in |
| 579 | this install. | 583 | this install. |
| 580 | 584 | ||
| @@ -987,10 +991,10 @@ default BC1/BC3/BC4/BC5 rank/history tables (extendable or replaceable via `--hi | |||
| 987 | 991 | ||
| 988 | | Format | History source | Strict vs. provisional status | Notes | | 992 | | Format | History source | Strict vs. provisional status | Notes | |
| 989 | |---|---|---|---| | 993 | |---|---|---|---| |
| 990 | | BC1 | `tools/bcpack_tables.py` (+ optional `--history`) | 248 confirmed / 7 provisional | Entry 0 unreferenced; provisional entries (6, 9, 67, 68, 71, 74, 122) uncertain by ≤1 green step | | 994 | | BC1 | `tools/bcpack_tables.py` (+ optional `--history`) | 252 confirmed / 3 provisional | Entry 0 unreferenced; entries 9, 67, 68 and 74 confirmed; provisional entries (6, 71, 122) stay below the 99% confirmation bar | |
| 991 | | BC3 | `tools/bcpack_tables.py` (+ optional `--history`) | 0 confirmed / 35 provisional | All 256 colour-quadrant and 64 alpha-pair rank entries populated | | 995 | | BC3 | `tools/bcpack_tables.py` (+ optional `--history`) | 0 confirmed / 35 provisional | All 256 colour-quadrant and 64 alpha-pair rank entries populated | |
| 992 | | BC4 | `tools/bcpack_tables.py` (+ optional `--history`) | 0 confirmed / 55 provisional | 64 pair entries populated; UI pool chunks reference additional unfitted entries unless supplied via `--history` | | 996 | | BC4 | `tools/bcpack_tables.py` (+ optional `--history`) | 2 confirmed / 170 provisional | 64 pair entries populated; entries 52 and 190 confirmed; 172 total entries cover the UI pool BC4 chunks in provisional mode (unpopulated entries still require `--history`) | |
| 993 | | BC5 | `tools/bcpack_tables.py` (+ optional `--history`) | 3 confirmed / 211 provisional | 64 pair entries populated | | 997 | | BC5 | `tools/bcpack_tables.py` (+ optional `--history`) | 5 confirmed / 209 provisional | 64 pair entries populated; entries 105, 182, 183, 222 and 255 confirmed | |
| 994 | | BC6H | external `--history <path>` | Empty by default (`history=None`) | Self-contained chunks decode strictly; external JSON supplies class 1/2/3 entries | | 998 | | BC6H | external `--history <path>` | Empty by default (`history=None`) | Self-contained chunks decode strictly; external JSON supplies class 1/2/3 entries | |
| 995 | | BC7 | external `--history <path>` | Empty by default (`history=None`) | Self-contained chunks decode strictly; 286 signature ranks (10 inferred-only refused in strict mode); partial-depth endpoints (`>= 4` bits) mid-range filled in provisional mode | | 999 | | BC7 | external `--history <path>` | Empty by default (`history=None`) | Self-contained chunks decode strictly; 286 signature ranks (10 inferred-only refused in strict mode); partial-depth endpoints (`>= 4` bits) mid-range filled in provisional mode | |
| 996 | 1000 | ||