Tests: expand bcpack_parity integration tests for block sizes, errors, and decode validation #2229
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2239"
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?
Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T11:01:31Z.
Summary
Expands
crates/xcl/tests/bcpack_parity.rswith integration test invariants covering block sizes, error handling, and decoding validation:block_sizemode mappings: BC1 and BC4 (8 bytes), BC3, BC5, BC6H, and BC7 (16 bytes), andNonefor unsupported modes (0, 2, 8, 9, 10, 255).can_decode(mode)parity withblock_size(mode).is_some()across all 256 modes (0..=255u8).Errorvariants (Unsupported,OutputSize,Decode),.kind()string mappings ("unsupported","output size","decode"),Displayformatting, and value equality.decodeparameter validation: rejection of unsupported modes withError::Unsupported, rejection of zero or non-block-aligned output lengths withError::OutputSize, and graceful rejection of empty inputs withError::Decode(_).Error::Decode(_)safely across all supported modes without panicking.Tested
crates/xcl/tests/bcpack_parity.rsintegration suite additions.python -m pytest scripts/passing 25/25 in 0.45s).scripts/pr_check.py --local.Not tested
crates/xcl/tests/files are integration tests and non-runtime code).AI use
Imported from ivall/xcl. Originally posted by heditrigui on 2026-11-25T11:09:00Z.
Note: CI Build and test failure is due to the two pre-existing unit test breakages on upstream main (
erouted_disk_entries_follow_the_direct_translator and pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa), documented in #2242. All cpack_parity additions in this PR compiled and passed cleanly.
upstream-sync referenced this pull request2026-11-25 14:08:43 +00:00
Imported from ivall/xcl. Originally posted by jennydeth on 2026-11-25T14:45:36Z.
NVIDIA / Windows run.
Setup: RTX 3060 12 GB (32-lane waves, driver 32.0.16.2101), Ryzen 5 5600X, 32 GB RAM, Windows 11 build 26300, Rust 1.100.0, DXC 1.9.2609.5, debug build. Head
78bea20.Result: cargo test --workspace -- --test-threads=4: 1254 passed, 0 failed, 46 ignored. tests/bcpack_parity.rs: 5 passed. SKIPPED: 18 GPU tests for no wave64 (expected on this card) and the usual per-lane / heap-window / driver-cache skips.
Not tested: the XCL_SAMPLE_BCPACK retail comparison (variable not set).
AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
Imported from ivall/xcl. Originally posted by nnonno91 on 2026-11-25T15:17:48Z.
Independent Windows test of
78bea207bb1d728043c068b1c6e7f16bb7437f76. All four new synthetic integration tests and the six existing decoder unit tests passed.Tested
cargo test --locked -p xcl --test bcpack_parity -- --skip retail_chunks_match_the_reference --nocapture --test-threads=1: 4 passed, 0 failed, 0 ignored, 1 filtered out. This ran all new block-size, error and malformed-input assertions, with the optional retail comparison explicitly excluded.cargo test --locked -p xcl --lib hle::bcpack::tests -- --nocapture --test-threads=1: 6 passed, 0 failed, 0 ignored, and no logged skips. This also exercised the bundled synthetic decoder fixtures.Not tested
Retail chunks against a reference decoder, parent revision, or the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) ran the tests, verified the results, and wrote this report.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T16:42:08Z.
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!
Imported from ivall/xcl. Originally posted by raylitebull on 2026-11-25T18:28:37Z.
Code review on
78bea20(crates/xcl/tests/bcpack_parity.rs): clean unit/integration coverage for block sizes, mode roundtrips, and invalid stream handling, and CI is green.Remaining before merge: Dual-vendor (AMD + NVIDIA) verification running
--test bcpack_parityon78bea20(--libalone does not execute integration test targets).Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-25T18:58:27Z.
Verification on NVIDIA RTX 5070 Ti (Windows 11), head
78bea207bb1d728043c068b1c6e7f16bb7437f76:--test bcpack_paritypassesTested
78bea207bb1d728043c068b1c6e7f16bb7437f76(git rev-parse HEADof a clean detached worktree, no local changes, built as is, not merged withmain). The PR was open and the head unchanged when I started and again before writing this.cargo test --release --locked -p xcl --test bcpack_parity -j 8 -- --nocapture --test-threads=1: 5 passed, 0 failed, 0 ignored (0 filtered out). Tests:decode_input_and_output_size_validation,decode_malformed_and_truncated_streams_fail_safely,error_display_and_kind_invariants,mode_block_sizes_and_support_invariants,retail_chunks_match_the_reference.XCL_SAMPLE_BCPACKwas not set, soretail_chunks_match_the_referencereturns early and is counted as passed without comparing any chunk.cargo test --release --locked -p xcl --lib hle::bcpack::tests -j 8 -- --nocapture --test-threads=1: 6 passed, 0 failed, 0 ignored.git status --shortwas empty afterwards.Not tested
XCL_SAMPLE_BCPACK),cargo test --workspace, a debug build, the parent revision, the retail game andxcl-smoke.Run and written with Claude Code (Claude Fable 5.2 and Claude Sonnet 5.5).
upstream-sync referenced this pull request2026-11-25 22:05:21 +00:00
Imported from ivall/xcl. Originally posted by throny on 2026-11-29T00:12:06Z.
merge-check claim
head:
78bea207bbImported from ivall/xcl. Originally posted by throny on 2026-11-29T00:29:44Z.
merge-check
base:
b10cc4c6head:
78bea207bbmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2611 passed, 0 failed, 49 ignored on the merge result with main
b10cc4c6(27 SKIPPED lines). I did not runb10cc4c6alone; the tree of #2049 in the same batch (a script-only change) gave 2607 passed, 0 failed, 49 ignored.review: no blocking finding; tests only, all hunks read. The new tests need no game data and no XCL_SAMPLE_* variable (only the existing retail test reads one and still returns when it is unset), and they are deterministic (a fixed-seed generator). The expected error texts match main's. Minor: they largely repeat lib tests main already has. The AMD run asked for in the thread is not needed for a CPU-only test target.
performance: none (tests only).
verdict: safe to merge
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-30T00:40:47Z.
NVIDIA and AMD full-suite run, to go with the reports above by jennydeth, throny, tiagonleal, since none of them covers AMD. Tested exact head
78bea207(on its base1a0bbe3).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace --no-fail-fast -- --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::recomp::lower_dxil::tests::mask_ff0_and_flbit_agree_with_hlsl_on_the_gpu --skip gpu::recomp::lower_dxil::tests::bridged_dpp_agrees_with_hlsl_on_the_gpu --skip hle::d3d12x::bind::tests::two_pass_binds_set_the_shared_view_heap --skip gpu::dxil::fuzz_tests: 1242 passed, 0 failed, 44 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.mode_block_sizes_and_support_invariants,error_display_and_kind_invariants,decode_input_and_output_size_validation,decode_malformed_and_truncated_streams_fail_safely.XCL_ADAPTER=radeon),cargo test --workspace --no-fail-fast -- --test-threads=4 --skip gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1 --skip two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs: 1253 passed, 0 failed, 46 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 main53e85fb1too, 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,const_and_null_mask_operands_agree_with_hlsl_on_the_gpuandmask_ff0_and_flbit_agree_with_hlsl_on_the_gpu(follow-up on #1651) fail becauserunner::skip_testturns their skips into failures underXCL_REQUIRE_GPU=mesh,bridged_dpp_agrees_with_hlsl_on_the_gpu(no wave64 on this card) andtwo_pass_binds_set_the_shared_view_heap(heap windows are opt-in,XCL_HEAP_WINDOWS=1) fail the same way;gpu::dxil::fuzz_testsstays skipped as in earlier runs (seeds 70, 545, 1019 and 1507 failedCreateComputePipelineStatewithE_OUTOFMEMORYon this card; they passed on this main's baseline). On AMD:fuzz_validate_and_gpu_1fails on seed 540 (res[833]0x7 vs CPU 0x6).two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobsfails on main too, since #2959 (#3441). (Edited: this line first named the wrong merge.) The AMD run does not setXCL_REQUIRE_GPU.Not tested
AI use
Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T00:53:27Z.
merge-check
base:
53e85fb1head:
78bea207bbmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2792 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in
--test gpu_two_pass_cache_e2e, which is why 5 failing tests give 6 failures). All five fail the same way on base53e85fb1alone (2788 passed, 6 failed, 49 ignored there), so none of them comes from this PR. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused.review: testing only: +100/-0 in
crates/xcl/tests/bcpack_parity.rs, no production code, no new dependency, nothing outside that file; every hunk read. The expectations matchcrates/xcl/src/hle/bcpack/mod.rson this base: 8-byte blocks for BC1/BC4 and 16 for BC3/BC5/BC6H/BC7,can_decodeisblock_size(..).is_some(), the threeErrorkinds and their Display strings, anddecode's order (unsupported mode before the output-size check). The four new tests need noXCL_SAMPLE_BCPACKand all pass here (tests/bcpack_parity.rs: 5 passed, 0 failed). Minor, not blocking: thecan_decodeparity loop restates the definition, so it can only catch a future divergence, and the negative cases overlap the lib testsonly_published_modes_decode,truncated_and_empty_streams_failandjunk_streams_do_not_panic. No duplicate: no group on #1607 holds this PR; #1381/#1438/#1785 (group D54) changebcpack::decode's allocation path rather than these invariants, and #1181 touches this file only for SKIPPED reporting.performance: none: tests only, nothing in the runtime changes.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build, CPU-only test target. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.
Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T01:21:58Z.
merge-check
base:
53e85fb1head:
78bea207bbmerge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2792 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in
--test gpu_two_pass_cache_e2e, which is why 5 failing tests give 6 failures). All five fail the same way on base53e85fb1alone (2788 passed, 6 failed, 49 ignored there), so none of them comes from this PR. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused.review: testing only: +100/-0 in
crates/xcl/tests/bcpack_parity.rs, no production code, no new dependency, nothing outside that file; every hunk read. The expectations matchcrates/xcl/src/hle/bcpack/mod.rson this base: 8-byte blocks for BC1/BC4 and 16 for BC3/BC5/BC6H/BC7,can_decodeisblock_size(..).is_some(), the threeErrorkinds and their Display strings, anddecode's order (unsupported mode before the output-size check). The four new tests need noXCL_SAMPLE_BCPACKand all pass here (tests/bcpack_parity.rs: 5 passed, 0 failed). Minor, not blocking: thecan_decodeparity loop restates the definition, so it can only catch a future divergence, and the negative cases overlap the lib testsonly_published_modes_decode,truncated_and_empty_streams_failandjunk_streams_do_not_panic. No duplicate: no group on #1607 holds this PR; #1381/#1438/#1785 (group D54) changebcpack::decode's allocation path rather than these invariants, and #1181 touches this file only for SKIPPED reporting.performance: none: tests only, nothing in the runtime changes.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build, CPU-only test target. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T07:39:29Z.
Triage (#1607) – head
78bea20No open PR adds the same tests. Much of this restates the unit tests already in
hle/bcpack/tests.rs(only_published_modes_decode,truncated_and_empty_streams_fail,junk_streams_do_not_panic). The new parts are the exactblock_sizevalues,Error::kind/Displaystrings and the per-mode bad output sizes. These are unit-level checks; they would fit better inbcpack/tests.rsthan intests/bcpack_parity.rs, whose header says the file does nothing withoutXCL_SAMPLE_BCPACK.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.