Formats: add a runnable BC5 record reconstruction shader example #2591

Open
github-bot wants to merge 2 commits from github-bot/gh-2591 into main AGit
Owner

@⁠Dathinel on GitHub · 2026-11-25 16:21 UTC · original
Dathinel:examples/bc5-records-hlsl → main · +228 −0 · 4 files · 2 commits · open

Adds a runnable Shader Model 6.6 reference for reconstructing two-channel BC5 blocks from decoded BCPack symbols. The example documents the raw buffer layout and reads endpoint and index predictors independently from history or the dictionary. It runs one stream serially. The runtime decoder is unchanged.

Tested on Windows with an RTX 3050 Laptop and WARP:

cargo test --locked -p victory-shader --features host --lib bc5_record_shader -- --ignored --nocapture

Both devices matched the CPU reference for four synthetic blocks. A separate differential run covered 131 blocks per device and detected swapped channels. Targeted Clippy and the asset policy passed. No throughput or game-level result is claimed.

AI-assisted implementation and review with Codex and Claude Code.

**@⁠Dathinel** on GitHub · 2026-11-25 16:21 UTC · [original](https://github.com/Marvisak/VIctory/pull/2591) `Dathinel:examples/bc5-records-hlsl` → `main` · +228 −0 · 4 files · 2 commits · open Adds a runnable Shader Model 6.6 reference for reconstructing two-channel BC5 blocks from decoded BCPack symbols. The example documents the raw buffer layout and reads endpoint and index predictors independently from history or the dictionary. It runs one stream serially. The runtime decoder is unchanged. Tested on Windows with an RTX 3050 Laptop and WARP: cargo test --locked -p victory-shader --features host --lib bc5_record_shader -- --ignored --nocapture Both devices matched the CPU reference for four synthetic blocks. A separate differential run covered 131 blocks per device and detected swapped channels. Targeted Clippy and the asset policy passed. No throughput or game-level result is claimed. AI-assisted implementation and review with Codex and Claude Code.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:09:53 +00:00
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:20 UTC · original

Automated triage for the maintainers.

Needs the maintainer's decision. This adds a hand-written SM 6.6 HLSL example (crates/victory-formats/examples/bc5/, shader, include and README) that rebuilds BC5 blocks from decoded BCPack symbols, plus an #[ignore]d test in emit/valu_tests.rs. That test runs dxc.exe from PATH and compares the result with constants the PR says were taken from bcpack::decode. The runtime decoder is unchanged, nothing in VIctory uses the shader, and CI never runs the test. CI (check) passes and it merges cleanly.

Two points go to the maintainer: whether he wants GPU reference examples that nothing uses in the repo, and the new test, which spawns an external compiler (same pattern as flow_tests.rs). If he does want it, the README should shrink to the binding layout (repo docs stay short).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 22:20 UTC · [original](https://github.com/Marvisak/VIctory/pull/2591#issuecomment-7176246442) <!-- victory-triage v1 head=29ac6a54765790754c77361c9450a9f06ad3615e verdict=needs-work at=2026-11-25T22:20:32Z --> Automated triage for the maintainers. **Needs the maintainer's decision.** This adds a hand-written SM 6.6 HLSL example (`crates/victory-formats/examples/bc5/`, shader, include and README) that rebuilds BC5 blocks from decoded BCPack symbols, plus an `#[ignore]`d test in `emit/valu_tests.rs`. That test runs `dxc.exe` from PATH and compares the result with constants the PR says were taken from `bcpack::decode`. The runtime decoder is unchanged, nothing in VIctory uses the shader, and CI never runs the test. CI (`check`) passes and it merges cleanly. Two points go to the maintainer: whether he wants GPU reference examples that nothing uses in the repo, and the new test, which spawns an external compiler (same pattern as `flow_tests.rs`). If he does want it, the README should shrink to the binding layout (repo docs stay short). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-26 01:48 UTC · original

Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head 29ac6a5 (on its base 67e8ae1).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), dxil.dll from Windows SDK 10.0.26100 (the loader's default), debug.
  • cargo build --workspace --locked, then cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 773 passed, 0 failed, 10 ignored.
  • No new #[test] functions in the diff.
  • --skip leaves out tests that fail on main 63bcca4 on this card too, not because of this PR: heap_direct_texture_reads_mark_their_heap_index ends the victory-shader test process with 0xc0000005 (#2571), so without the skip the rest of that crate never reports; dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views and the two stride_tests hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); gathers_at_a_level_match_the_hardware fails on lane 0 (#1744).

Not tested

  • AMD (the tests take the default adapter), a release build, the title (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-26 01:48 UTC · [original](https://github.com/Marvisak/VIctory/pull/2591#issuecomment-7180144987) Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head `29ac6a5` (on its base `67e8ae1`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 621.40, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.98.1 MSVC (pinned), `dxil.dll` from Windows SDK 10.0.26100 (the loader's default), debug. - `cargo build --workspace --locked`, then `cargo test --workspace --locked --no-fail-fast -- --test-threads=4 --skip emit::memory_tests::heap_direct_texture_reads_mark_their_heap_index --skip descriptor::host::tests::dynamic_slots_are_held_until_released --skip memory::tests::lists_share_a_table_and_copies_keep_their_views --skip emit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride --skip emit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros --skip emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: **773 passed, 0 failed, 10 ignored**. - No new `#[test]` functions in the diff. - `--skip` leaves out tests that fail on main `63bcca4` on this card too, not because of this PR: `heap_direct_texture_reads_mark_their_heap_index` ends the `victory-shader` test process with `0xc0000005` (#2571), so without the skip the rest of that crate never reports; `dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views` and the two `stride_tests` hit the 1,000,000-view heap cap of NVIDIA drivers (#1835, #2317); `gathers_at_a_level_match_the_hardware` fails on lane 0 (#1744). **Not tested** - AMD (the tests take the default adapter), a release build, the title (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2591/head:github-bot/gh-2591'
git switch 'github-bot/gh-2591'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2591'
git switch 'github-bot/gh-2591'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2591'
git switch 'github-bot/gh-2591'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2591'
git switch 'main'
git merge --squash 'github-bot/gh-2591'
git switch 'main'
git merge --ff-only 'github-bot/gh-2591'
git switch 'main'
git merge 'github-bot/gh-2591'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!2591
No description provided.