bcpack: preserve all 32 indices in BC7 dictionary entry 0 #2007
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2007
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2007/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@raylitebull on GitHub · 2026-11-25 00:39 UTC · original
raylitebull:fix/bcpack-bc7-dict0→main· +16 −7 · 3 files · 1 commits · merged 2026-11-25 01:54 UTCFixes
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
@futurepro62 on GitHub · 2026-11-25 01:04 UTC · original · edited 2026-11-25 01:25 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
7881dbc(on its base6567c5f).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip gpu::recomp::lower_dxil::tests::f16_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f32_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::integer_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::f64_programs_on_the_gpu --skip gpu::recomp::lower_dxil::tests::const_and_null_mask_operands_agree_with_hlsl_on_the_gpu --skip gpu::dxil::fuzz_tests: 986 passed, 0 failed, 43 ignored. SKIPPED (no wave64):a_2d_or_3d_group_agrees_with_the_hlsl_path_on_the_gpu,a_per_lane_2d_or_3d_group_runs_on_the_gpu,coalesced_guarded_runs_agree_with_the_hlsl_path_on_the_gpu,cross_lane_reads_agree_with_the_hlsl_path_on_the_gpu,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware,the_wave64_lowering_agrees_with_the_hlsl_path_on_the_gpu.#[test]functions in the diff.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1: 996 passed, 0 failed, 45 ignored. SKIPPED:f16_programs_on_the_gpu(f16 arithmetic, wave32, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 arithmetic, wave64, per-lane form: refused (unsupported V_MUL_F16 (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave32, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f16_programs_on_the_gpu(f16 packed, wave64, per-lane form: refused (unsupported V_PK_MUL_F16: VOP3 modifiers (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave32, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),f32_programs_on_the_gpu(f32 conversions, wave64, per-lane form: refused (unsupported V_CVT_F16_F32 (its #1426 semantics differ from the console's))),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--skipleaves out tests that fail on main7994cd1too, not because of this PR. On NVIDIA:heap_window_out_of_memory_falls_back_to_the_switch_form(#1651), the fourgpu::recomp::lower_dxil::tests::*_programs_on_the_gputests andconst_and_null_mask_operands_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh, andgpu::dxil::fuzz_testsseeds 70, 545, 1019 and 1507 failCreateComputePipelineStatewithE_OUTOFMEMORYon this card (drivers 616.64 and 621.40). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6). The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
@Anon64 on GitHub · 2026-11-25 01:52 UTC · original
Regression run for this PR: head
7881dbc, based onmain80f4819. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s, back to back with themainrun.main
80f4819: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:
VCRUNTIME140.dllmemcpy, reads at0xc48ff0000–0xc492b0000. The process then hung, as onmainwithout #742. I see that crash onmaintoo, in about 2 of 25 runs here. In the two reruns of this head it did not come back, so I do not attribute it to this PR.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.
@raylitebull on GitHub · 2026-11-25 01:53 UTC · original
Thanks @Anon64 for running and sharing the 60 s
scripts/smoke.ps1pair on7881dbcvs80f4819(1619vs1588frames,0device removals,0crashes,24293MB vs25481MB peak commit) — added to the PR description! Thanks also to @futurepro62 for verifying exact head7881dbcacross NVIDIA RTX 5070 Ti (986/0/43) and AMD Radeon RDNA2 iGPU (996/0/45).@DavidM1911 on GitHub · 2026-11-25 03:51 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!