Repository navigation
bcpack: preserve all 32 indices in BC7 dictionary entry 0 - #2007
Conversation
In bcpack-tables.bin, BC7 dictionary entry 0 stores all 32 signed i16 indices directly after its two width bytes, while entries 1..254 repeat the two width bytes before 31 i16 indices. Skipping a u16 on entry 0 dropped its leading index (2) and shifted its remaining indices left by one ([1, 0, ...] instead of [2, 1, 0, ...]). Keep the repeated-width skip only for entries 1..254, regenerate crates/xcl/src/hle/bcpack/tables.rs, and verify BC7[0] in tests.
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Regression run for this PR: head main this PR: No device removals or crashes; 101 % of main's frames, 95 % of its peak commit. An earlier run of this head in a batch crashed at 37.8 s with five threads in the texture-detile access violation of #1359 / #751: Not tested: the whole suite; whether the title decodes a BC7 dictionary entry 0 in these 60 s. Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
Thanks @Anon64 for running and sharing the 60 s |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Fixes
BC7dictionary entry0inscripts/gen_bcpack_victory_tables.pyandcrates/xcl/src/hle/bcpack/tables.rs: inbcpack-tables.bin, entry0stores all 32 signedi16indices directly after its two width bytes (bits: [4, 0]), whereas entries1..254repeat the two width bytes before 31i16indices. Skipping au16on entry0dropped its leading index (2) and left-shifted its remaining indices ([1, 0, ...]instead of[2, 1, 0, ...]).Part of #1833.
What is in it
scripts/gen_bcpack_victory_tables.py: read 32i16indices directly whenentry == 0, keeping ther.u16()repeated-width skip only forentry > 0.crates/xcl/src/hle/bcpack/tables.rs: regeneratedBC7[0](ix[0][1, 0, ...]->[2, 1, 0, ...]).crates/xcl/src/hle/bcpack/tests.rs: extendedbc7_dictionary_indices_line_upto assertBC7[0](ctrl == 0,bits == [4, 0],ix[0] == [2, 1, 0, ...],ix[1] == [0; 16]).Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), rebased cleanly onto6567c5f(7881dbc).cargo check --workspace --tests: passed.cargo test -p xcl --lib bcpack: 10 passed, 0 failed.7881dbc:@futurepro62: NVIDIA RTX 5070 Ti (986 passed, 0 failed, 43 ignored) and AMD Radeon RDNA2 iGPU (996 passed, 0 failed, 45 ignored).@Anon64: NVIDIA RTX 3060 60 sscripts/smoke.ps1pair vsmain80f4819(1619vs1588frames,0device removals,0crashes,24293vs25481MB peak commit).Regression run
60 s
scripts/smoke.ps1pair on exact head7881dbcvsmain80f4819(NVIDIA GeForce RTX 3060 12 GB, driver 581.80, Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s on a retail title), contributed by@Anon64:main
80f4819:this PR:
Not tested
0payload; Linux/Wine/vkd3d-proton.AI use