tooling: report individual texture descriptors #469

Merged
venetanji merged 1 commit from upstream-pr/475 into main 2026-11-22 05:54:22 +00:00
venetanji commented 2026-11-22 05:49:33 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by venetanji on 2026-11-22T05:49:33Z.


Change

Add --descriptor INDEX to tools/texture_descriptors.py so a user can inspect a zero-based entry returned by --lookup-key. The JSON reports width, height, numeric DXGI format, mip-marker byte and the logical offset of the first 4 KiB page. The reader checks the archive and descriptor bounds and reads the selected 16-byte record after reading the headers.

python -B tools/texture_descriptors.py --descriptor 257 archive.ttpf

Builds on the bounded inventory in #266. Refs #458 for the archive-entry selection workflow.

Verification

Tested commit 80a4acb90d5024fe2482416f1e26e4071d37cef6, based on upstream 25a00a731b181919e9364220ae1abe38914bfd01, on x86-64 Linux with Python 3.12.12.

python -B tests/resource_ranges_check.py -v
python -B tests/resource_root_check.py
python -B tests/awc_metadata_check.py
python -B tests/bcpack_check.py
python -B tests/docs_links_check.py
python -B tests/bidi_controls_check.py
git diff HEAD^ HEAD --check

All passed, including 19 resource-range cases. With the unmodified tool, python -B tests/resource_ranges_check.py ResourceChecks.test_texture_descriptor_detail_command -v failed because the CLI exited 2 with unrecognized arguments: --descriptor 257. The new CLI reports the expected 12-by-44 descriptor and rejects out-of-range indices. The read-scope fixture permits only header and selected-record reads, forces short reads, and rejects a logical page beyond the archive.

GitHub Actions passed all four jobs. The resource_range_controls CTest passed on windows-2025 in dev (1.19 s) and /O2 (1.48 s). CI run

Evidence and follow-up

The tests use the repository's source-built RDS5 and ETPF fixture. The change and additions use the repository's MIT license. The README links to the command and its output fields in the experiment notes. The marker is reported as a raw byte. Mip residency and texture export require separate checks.

AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6539021751 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/475). Originally posted by [venetanji](https://github.com/venetanji) on 2026-11-22T05:49:33Z. --- ## Change Add `--descriptor INDEX` to `tools/texture_descriptors.py` so a user can inspect a zero-based entry returned by `--lookup-key`. The JSON reports width, height, numeric DXGI format, mip-marker byte and the logical offset of the first 4 KiB page. The reader checks the archive and descriptor bounds and reads the selected 16-byte record after reading the headers. ```sh python -B tools/texture_descriptors.py --descriptor 257 archive.ttpf ``` Builds on the bounded inventory in #266. Refs #458 for the archive-entry selection workflow. ## Verification Tested commit `80a4acb90d5024fe2482416f1e26e4071d37cef6`, based on upstream `25a00a731b181919e9364220ae1abe38914bfd01`, on x86-64 Linux with Python 3.12.12. ```sh python -B tests/resource_ranges_check.py -v python -B tests/resource_root_check.py python -B tests/awc_metadata_check.py python -B tests/bcpack_check.py python -B tests/docs_links_check.py python -B tests/bidi_controls_check.py git diff HEAD^ HEAD --check ``` All passed, including 19 resource-range cases. With the unmodified tool, `python -B tests/resource_ranges_check.py ResourceChecks.test_texture_descriptor_detail_command -v` failed because the CLI exited 2 with `unrecognized arguments: --descriptor 257`. The new CLI reports the expected 12-by-44 descriptor and rejects out-of-range indices. The read-scope fixture permits only header and selected-record reads, forces short reads, and rejects a logical page beyond the archive. GitHub Actions passed all four jobs. The `resource_range_controls` CTest passed on `windows-2025` in dev (1.19 s) and /O2 (1.48 s). [CI run](https://github.com/R0Y00/Xbox2Windows/actions/runs/44991054808) ## Evidence and follow-up The tests use the repository's source-built RDS5 and ETPF fixture. The change and additions use the repository's MIT license. The README links to the command and its output fields in the experiment notes. The marker is reported as a raw byte. Mip residency and texture export require separate checks. AI-assisted.
upstream-sync closed this pull request 2026-11-24 06:43:14 +00:00
chatgpt-codex-connector[bot commented 2026-11-24 06:48:25 +00:00 (Migrated from github.com)

Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-22T05:49:49Z.


Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T05:52:00.699874Z 80a4acb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7074971780 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/pull/475#issuecomment-7074971780). Originally posted by [chatgpt-codex-connector[bot]](https://github.com/chatgpt-codex-connector%5Bbot%5D) on 2026-11-22T05:49:49Z. --- <!-- codex-pull-request-review-summary --> <!-- codex-review-state:v1 {"code_review":{"commit_sha":"80a4acb90d5024fe2482416f1e26e4071d37cef6","has_any_findings":false,"has_unresolved_findings":false,"status":"completed"},"security_review":{"commit_sha":null,"has_any_findings":null,"has_unresolved_findings":null,"status":null}} --> <details> <summary><strong>Codex Review Summary</strong>: ✅ Completed</summary> This comment shows the latest Codex review activity on this pull request. | Review | Status | Commit | Review trigger | | --- | --- | --- | --- | | 📝 **Code Review** | ✅ **Completed** <relative-time datetime="2026-11-22T05:52:00.699874Z">2026-11-22T05:52:00.699874Z</relative-time> | `80a4acb` | PR opened | <details> <summary>ℹ️ About Codex in GitHub</summary> <br/> [Your team has set up Codex to review pull requests in this repo](https://chatgpt.com/codex/cloud/settings/general). Reviews are triggered when you - Open a pull request for review - Mark a draft as ready - Comment "@codex review" or "@codex security review". Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. </details> </details>
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows!469
No description provided.