fix: BC7 dictionary indexing, HDR NaN scrub, and thin-list bake ordering #293
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/293"
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 Androtim/MiniVI. Originally posted by Androtim on 2026-12-01T20:29:09Z.
Addresses Issue #276 priority item #2 (
#150visual artifacts: wrong/speckled BC7 textures, HDR NaN white spikes, and out-of-order decoration bakes).Summary of Changes
BC7 dictionary index alignment (
crates/victory-formats/src/bcpack.rs):widthsinTables::parseandRefTables::parse, matching native decoder indexing (instead of skipping oneu16and truncating to 31 slots).bc7_dictionary_indices_line_upunit test accordingly.Slaktarn700/SlaktarnVIcommit1afad58(GPL-3.0).HDR pixel output
NaN -> 0.0scrub (crates/victory-shader/src/emit/hdr.rs,bitcode.rs,lower_tests.rs):Lower::clamp_hdr(VICTORY_HDR_CLAMP, default-on) soNaNselects0.0instead ofHDR_MAX(+65024.0), eliminating white crystalline blowout spikes on shaded skin/surfaces while keeping[-65024, 65024]clamping.Module::select_true_floathelper andpixel_hdr_clamp_scrubs_nan_to_zerounit test.lobomfz/VIctory-xmem@245c4a7): does not apply here becausecrates/victory-shader/src/emit/lower.rs(raw_dwords) uses hardware-bounded D3D12rawBufferLoad.f32per 4-dword vector with noself.basedwhole-load clamp.Cross-list decoration-bake ordering barrier (
crates/victory-gpu/src/pipeline.rs,draw.rs,list/thin.rs):pipeline::shaders_anyanddraw::bake_pipelineto identify decoration-bake pipelines when bound.VICTORY_THIN=1binds a bake pipeline (VICTORY_THIN_BAKE:2default drains all other live recordings + self;1drains self chunks;0kill-switch disables),Front::boundflushes queued chunks, unparks anyVICTORY_THIN_GATE-held recordings viaRecording::caught_up(), and translates bake calls inline synchronously (Recording::translate_one) until unbound.LIVE(Weak<Recording>) and signaledcrate::queue::line_moved()only after droppingRecording::innersoLane::wakenever nests underRecording::inner(inverse ofLane::unfold->Recording::back).Slaktarn700/SlaktarnVIcommit1afad58(GPL-3.0), with unit testsbake_pipeline_drains_prior_recordings_and_translates_inlineandcaught_up_unparks_held_back_recording.Verification
cargo +1.98.1-x86_64-pc-windows-gnu xtask policy: PASS (318 files ok)--locked):victory-formats --lib bcpack::: 15 passed, 0 failed, 3 ignoredvictory-shader --lib pixel_hdr_clamp_scrubs_nan_to_zero: 1 passed, 0 failedvictory-gpu --lib list::thin::: 11 passed, 0 failedvictory-gpu --lib draw::: 11 passed, 0 failed, 1 ignoredclippy --workspace --locked --all-targets -- -D warnings(default and--features diagnostics): PASS (0 warnings)objdump -p: standard Windows DLLs onlyPaired 60s Plain
--releaseA/B Benchmark (1440p,-PlayParity -LowVram -DlssMode quality) vsorigin/main(40567147)origin/main(40567147)10.0 fps(100.25 ms)14.75 fps(67.85 ms)+4.75 fps(+47.5%)37.6 ms30.4 ms-7.2 ms13.95 ms12.35 ms-1.6 ms6379 / 6637 MB(over=0)6198 / 6668 MB(over=0)-181 MBroom=falseratio25.0%0.0%-25.0 pp76123755-38571363.0333.0-1030.0000bake draws translated inline per frame (VICTORY_THIN_BAKE=2): 0.8, waited 2.13 ms catching up prior lists,bakes=16,sources=226,failed=0).90s
--features diagnostics1440p Visual Checkcrashes=0,used_max=6164 MB(over=0 MB,room_false=0.0%),final_waiting=4007,bakes=8,sources=88,failed=0,pngs=24,lit=21/24,luma=98.19,near_black=0.05%,edge_energy=7.54,magenta=0.0%.frame-2345.png,frame-2389.png,frame-2425.png,frame-2433.png): crisp world/character geometry and foliage, no BC7 dictionary specks, no white NaN blowout spikes, and no decoration-bake noise.Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-01T20:39:53Z.
Architect & Strict-Gate Review (
fe068304, CI passing, zero newunsafe, lock-order safety verified:LIVEdropped beforecaught_up()andline_moved()called outsideRecording::inner, zero opt-inVICTORY_*toggles):Directly resolves
[USER PRIORITY]#7 (#150BC7 32-slot dictionary alignment, HDRNaN -> 0.0blowout scrub, and cross-list decoration-bake ordering barrier withVICTORY_THIN_BAKE=0kill-switch):--features diagnostics90s verifier gates PASSED:crashes = 0,VRAM = 6,164/6,670 MB(over = 0 MB,room_false = 0.0%),final_waiting = 4,007,mapped_rate = 3.56 ms/s,bakes = 8,failed = 0,luma = 98.19,near_black = 0.05%,edge_energy = 7.54,magenta = 0.0%; late in-world PNGs directly verified crisp and clean (detailed skin, clothing, wood, water, foliage, zero speckles/white blowouts).--release60s 1440p A/B vs40567147:10.0 -> 14.75 fps(+47.5%)37.6 -> 30.4 ms(-7.2 ms) /13.95 -> 12.35 ms(-1.6 ms)6,379 -> 6,198 MB(-181 MB,over = 0 MB,room_false 25.0% -> 0.0%),final_waiting 7,612 -> 3,755(-3,857), dropped draws1,363 -> 333(-1,030),0crashes.Squash-merging into
main(will tagv2026.12.01.03shipping both#291and#293oncemainCI passes cleanly).