Repository navigation
Conversation
….14.1 - Add optional bcpack-gpu-sdk v0.14.1 dependency behind --features gpu-bcpack - Add opt-in worker offload in hle::bcpack::gpu gated by XCL_GPU_BCPACK=1 with BcPackDecodeBatch coalescing and clean fallback to xcl CPU bcpack - Upload xcl's existing runtime tables and verify all 12 valid vectors (+ 1 expected-err) plus batch isolation on Windows 11 + RTX 5080 (2 passed; 0 failed) - Verify default build without gpu-bcpack via cargo check -p xcl
Prime1997
left a comment
There was a problem hiding this comment.
Needs changes; retain as a draft. Source review of bfff51a7a3668c4057dc1f8efdf4fd0744142ea8 found a conditional failure in the advertised CPU fallback.
In crates/xcl/src/hle/bcpack/gpu.rs:108-155, valid batch items start with zero-filled output and status:0; the aggregate BcPackDecodeBatch return is discarded. In pinned SDK commit 727a214b5d68a23dc5e1df7f5efd00089ab42d39, the batch pre-wait occurs before item statuses become failures. If a retained incomplete fence's SetEventOnCompletion fails, the SDK catches the panic and returns-99. XCL can then accept untouched status0 items as successful zero output, bypassing CPU decoding.
Please treat a negative aggregate result as batch failure and initialize pending statuses to a failure sentinel. Add a controlled early-return test proving CPU fallback and original-input preservation. This is a narrow source-level failure sequence involving an already incomplete retained fence and another event-registration failure; I have not reproduced a driver fault or shown that normal healthy batches fail.
The worker .spawn(...).expect(...) also panics if worker creation fails rather than retaining CPU decoding. Return an unavailable worker and exercise that fallback explicitly.
I checked the pinned SDK's non-null-output contract: that route is synchronous, so this review makes no asynchronous output-buffer lifetime claim. The optional feature/dependency, embedded shaders and actual GPU decode were not built or executed. Those and CPU/GPU decode parity remain validation blockers.
AI use: Codex (GPT-6) reviewed XCL and pinned dependency source with an independent source cross-check; no runtime result is claimed. Optional temporary Discord for coordinating contributor work, testing and comparing results.
|
Linux/Wine confirmation, both vendors, on head
Caveat: AI use: Hermes agent (local Qwen-class) ran the tests and drafted this; I checked it before posting. |
|
Thank you @SlopTart for the cross-vendor Linux/Wine verification on both AMD RX 7900 XT (RADV) and NVIDIA GTX 1070 ( Marking this PR Ready for Review now that all 6 formats ( (Note: |
|
Thank you for the thorough review @Prime1997 — that was a real conditional bug if Fixed in
Verified on Windows 11 + NVIDIA GeForce RTX 5080:
|
Follow-up PR to #2586 targeting
nvidia-dev(af2cecc4).What is in it
bcpack-gpu-sdk v0.15.1dependency behind--features gpu-bcpackincrates/xcl/Cargo.toml.crates/xcl/src/hle/bcpack/gpu.rsgated at compile time (--features gpu-bcpack) and runtime (XCL_GPU_BCPACK=1, off by default), falling back tohle::bcpack::victory::decode.xcl's own built-in tables (bcpack_gpu_set_{bc1,bc6h,bc7}_tables) at worker startup instead of bundling any tables in the SDK.BcPackDecodeBatch(decode_batch_with), initializing allBcPackBatchItem::statusfields to-1, rejecting negative batch return codes (rc < 0, e.g.-99early return) across the whole batch so untouched buffers are never treated as valid zeros, and returningOption<&'static Sender<Job>>cleanly without.expect()if worker thread spawn fails.bcpack-gpu-sdk v0.15.1(src/ffi.rsresets allitem.status = -1beforecatch_unwind/wait_compute_cpu;tests/v14_batch_and_tex2d.rsaddsbcpack-rs#10BC1 lane-1 parity vector).Tested
96bc0a7b.cargo check -p xcl(default features): PASS (exit 0).cargo test -p xcl --features gpu-bcpack --release hle::bcpack::gpu:: -- --nocapture: 4 passed, 0 failed (gpu_bcpack_matches_xcl_cpu_all_vectors[12 valid vectors across BC1/3/4/5/6H/7 + 1 expected-err: 0 byte mismatches],gpu_bcpack_batch_all_valid_vectors_and_isolation[12 valid + 1 isolated err: 0 mismatches],batch_early_error_return_rejects_items_and_falls_back_to_cpu,unavailable_worker_falls_back_to_cpu_without_panicking).Regression run
Not run locally (
scripts/smoke.ps1on a retail title requires a maintainer/contributor smoke run ortest-onlylabel for CI).Not tested
cargo test --workspacesuite and live retail titlescripts/smoke.ps1regression run.scripts/smoke.ps1withXCL_GPU_BCPACK=1on a full game stream.AI use
gpu.rs), batch/worker fallback hardening, and fallback unit tests; test outputs were verified locally on RTX 5080.