Skip to content

Validate repeated BC7 dictionary widths - #2665

Open
luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/bcpack-bc7-width-copies
Open

luckyteagirl wants to merge 1 commit into
xcl-dev:mainfrom
luckyteagirl:codex/bcpack-bc7-width-copies

Conversation

@luckyteagirl

Copy link
Copy Markdown
Contributor

BC7 dictionary entries 1–254 repeat their index widths before the indices. The table generator discarded the copy, so an input with inconsistent widths could overwrite the generated table and exit successfully. Entry 0 uses that position for its first index. Layout reference

What is in it

  • Check the repeated widths before writing the generated Rust table.
  • Add a synthetic CLI regression that accepts a valid table, then rejects a modified copy and verifies the prior output stays intact.

Tested

  • The focused test failed on main b49be183 because the generator accepted the mismatch.
  • python -B -m unittest discover -s scripts -p 'test_*.py': 26 passed, 0 failed, 0 skipped on Windows with Python 3.11.
  • Generated the table from the public VIctory blob 1e548501764588b06e2ed47aa7fed263cd797f3b with both versions and verified byte-identical output.
  • git diff --check passed.

Regression run

  • Not applicable. The change only validates generator input and leaves the generated Rust output for the canonical table unchanged.

Not tested

  • Rust or GPU tests and a retail title run.

AI use

  • Codex (GPT-6.2 Sol) inspected the layout, implemented the check and test, and ran the Python verification.

@oni-swr

oni-swr commented Nov 26, 2026

Copy link
Copy Markdown
Contributor

Independent native Windows CPU verification at d3d959a18c97d88fa9446fb49102daf79544059e against exact parent b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7.

Windows 11 Pro build 26200, Ryzen 7 5700X3D, Python 3.11.9. py -3.11 -B -m unittest discover -s scripts -p 'test_*.py' passed 26 tests at the head and 25 on the parent, with zero failures or skips.

In synthetic CLI controls, the parent accepted both repeated-width mismatches and rewrote the destination. The head rejected mismatches in both width-byte positions and preserved destination bytes and modification time in all four failure runs. A valid input produced byte-identical output at both revisions. Cargo, GPU and retail smoke were outside this run.

AI use: Codex (gpt-6.2-sol) wrote and ran the synthetic checks and drafted this report.

rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants