fix(gpu,shader): fix compute NaN blotches, DLSS depth/present ghosting, and neutral fallback textures #402
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/402"
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-03T17:36:18Z.
Summary
Fixes three real-world visual defects reported from 4K RTX 4060 Ti 8 GB gameplay (
v2026.12.03.07):Pixelated dark lighting / shadow / reflection blotches (RT-SW):
VICTORY_NAN_SCRUB(1= float-aware + safe bit patterns preserving0xFFFFFFFFinteger masks,2= scrub all 32-bitimage_storeas float),VICTORY_NAN_SCRUB_INF,VICTORY_NAN_SCRUB_STORE_INF, andVICTORY_NAN_EXACTacross computetextureStore.f32(image_store) and pixel colour exports invictory-shader(crates/victory-shader/src/emit/hdr.rs,lower.rs). (apps/victory/src/play.rsalready enabledVICTORY_NAN_SCRUB=1, which was previously unimplemented invictory-shader.)VICTORY_NAN_SCRUB*andVICTORY_NAN_EXACTkeys toTRANSLATOR_ENV_KEYSand bumpsSHADER_CACHE_VERSIONfrom2to3incrates/victory-gpu/src/shader_cache.rsto invalidate older cached compute DXIL entries.VICTORY_AMBIENT_RT=<least>[,<most>[,<level>]]incrates/victory-gpu/src/ambient.rs(expanding root constants17 -> 18forfloat least;somax(was, found * least)bounds missing/starved SW-RT diffuse areas while keepingbuilder_runs()untouched whenVICTORY_AMBIENT_RTis unset).DLSS Super Resolution temporal ghosting & Streamline errors (
crates/victory-gpu/src/streamline.rs):camera.planes_in_order()insiderecord()beforecamera.constants(...), fixing inverted depth planes (camera_near=10000.0, camera_far=0.15causing an infinite projection fallback inplan::projection).VICTORY_STREAMLINE_PRESENT(present_hook) to ON when DLSS SR runs without Frame Generation (=0disables), eliminatingStreamline presentCommon() was not observederrors and enabling per-present retired resource cleanup and VRAM budget tracking.DLSS_ULTRA_QUALITYfromrecord()getOptimalSettingsprobing to eliminateDLSSContext 'getOptimalSettings' returns invalid size (0 x 0)warnings, and setscamera.reset = trueon resolution/mode changes or> 2skipped-frame gaps (menus/loads).Neon-green unuploaded / evicted vehicle textures (
crates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/resource.rs):neutral_forinstead of null(0,0,0,0)(which YCbCr/BC5 shaders decode as neon green) inunmake(),make_at_inner(), andmirror()wheneverwaits_gray(&view)applies.neutral_of/neutral_forto 1D, 2D, 3D, and Cube textures (resource::default_view_kind), adds[0x80, 0x80, 0x80, 0xff]opaque cutout stand-ins (VICTORY_STANDIN_OPAQUE=0disables), and excludes integer, depth, float-data, and signed normal formats (integer_format,gray_fits,waits_gray).check_shown_early()(VICTORY_SHOW_UPLOADED=1) from flipping neutral slots to unuploaded pooled textures onUploadWait::GiveUp, releasingNEW_PENDINGownership for the texture pass.Upstream GPL-3.0-or-later attributions:
voidopcode/vilocity,felicienradio/cold-project-vi,Aki-Developer(01f6f31),ReTerryDavis/ReVIctory,lobomfz/VIctory-xmem(#37), andAleksesipenko/VIctory-RTX.Rig Specs Tested On
1.98.1-x86_64-pc-windows-gnutoolchain.Run Settings & Profile
fix/visuals-ghosting-and-pixelated-lighting@eb7d35bcargo clippy --workspace --all-targets --locked -- -D warnings(passed)cargo clippy --workspace --all-targets --all-features --locked -- -D warnings(passed)cargo xtask policy+cargo xtask policy --staged(353 files ok/9 files ok)cargo test --locked -p xtask(8 passed; 0 failed)cargo test -p victory-gpu --locked -- --test-threads=1(868 passed; 0 failed; 39 ignored)victory-shaderGPU/unit tests (image_store_nan_scrub_modes_work_on_gpu,a_packed_word_is_stored_bit_for_bit,clamp:6 passed; 0 failed; 418 filtered out)victory,victory-formats,victory-core,victory-hle,victory-pe,victory-pipeline,victory-game,victory-loader --liball passed)Imported from Androtim/MiniVI. Originally posted by Androtim on 2026-12-03T18:04:03Z.
Triage (
eb7d35ba, CIcheckPASS):VICTORY_NAN_SCRUBinvictory-shader(already enabled byplay.rs), DLSScamera.planes_in_order()+ default-onVICTORY_STREAMLINE_PRESENT, and default-onneutral_forstand-in textures stopping neon-green unuploaded vehicles — are high-impact and clean.triage: needs workfor one policy violation + cross-PR conflict:VICTORY_AMBIENT_RT=<least>[,<most>[,<level>]]incrates/victory-gpu/src/ambient.rsis a new opt-in toggle (only=0kill-switches for default-on replacements are allowed) AND itsWORDS 17 -> 18expansion directly collides with#401'schroma_scrubWORDS = 18inambient.rs.VICTORY_AMBIENT_RTfrom this PR (or make any verified fix default-on with a=0kill-switch after coordinatingambient.rswith#401).SHADER_CACHE_VERSION2 -> 3inshader_cache.rsoverlaps#381(will need clean bump if#381lands first). After resolvingVICTORY_AMBIENT_RT, proceed to Gate 2 Audit (#282) + Gate 3 plain---releaseA/B +--features diagnosticsvisual PNGs.