Shaders: RDNA2 VALU instructions lowered or made exact as the hardware measures them (v_mad_u16, v_cvt_pknorm, v_lerp_u8, v_ldexp/frexp, flr/rpi NaN) #4233

Closed
KruIN689 wants to merge 11 commits from upstream-pr/4233 into main
KruIN689 commented 2026-11-30 17:39:29 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KruIN689 on 2026-11-30T17:39:29Z.


Fixes #

What it changes

RDNA2 VALU instructions that did not translate, or translated with results the hardware does not give. All in crates/victory-shader/src/emit/lower.rs.

  • Lowered (a program with one of these fell back as unsupported, lower: Unsupported { what: "v_mad_u16" } and so on):
    • v_mad_u16/i16, v_add/sub_nc_i16, v_min3/max3/med3_i16/u16;
    • v_cvt_pknorm_i16/u16_f32, rounded from the exact product as the hardware does, not after an f32 multiply;
    • v_cvt_pk_u16_u32/i16_i32;
    • v_lerp_u8;
    • v_mad_u32_u16/i32_i16, v_add/sub_nc_i32;
    • v_ldexp_f32, v_frexp_mant_f32, v_frexp_exp_i32_f32, with denormals scaled into normals and a NaN kept quiet with its payload.
  • Made exact:
    • v_cvt_flr/rpi_i32_f32: a NaN saturates by its sign, as an infinity does. The current lowering returns 0, which is what v_cvt_i32_f32 gives, not these two. rpi adds the half without rounding the sum first: 0.49999997 → 0, and 8388609 stays 8388609.
    • VICTORY_F16_NEAREST: narrows on the bits, so the high half is kept.
  • The later v_ldexp_f32 and v_mad_u32_u16 | v_mad_i32_i16 arms were unreachable behind the ones above and are removed.

How it was tested

  • GPU and profile: RTX 5080 (driver 621.40) and WARP, Windows 11. These are instruction-level tests, so no game profile applies.
  • Before: on main 84bd61e2, the 6 tests below fail:
    • lower: Unsupported for v_mad_u16, v_cvt_pknorm_i16_f32 and v_lerp_u8;
    • v_cvt_flr_i32_f32(NaN) = 0, where 0x7fffffff is wanted;
    • v_ldexp_f32(NaN, 3) = 0x7fffffff, where 0x7fc00000 is wanted;
    • F16_NEAREST gives 0x7fff, where 0x7e00 is wanted.
  • After: cargo test -p victory-shader --lib -- valu_tests cost::: 68 passed, 0 failed, 2 ignored.
    • The 6 new tests in valu_tests.rs compare each instruction against tables measured on an RDNA2 GPU (gfx1036, the hw-oracle), on the card and on WARP.
    • They cover rows that agree in both f32 denormal modes: zeros, infinities, NaNs with payloads, denormals, saturation edges.
  • Wave sizes: 32 lanes (the lowering is per lane).
  • cargo test for the crate it touches: yes, the tests above. Two checks fail, as they do on main 84bd61e2 before this change:
    • cargo clippy -p victory-shader --all-targets -- -D warnings stops at field loop_caps is never read;
    • cargo xtask policy flags the 560-character hex run in native.rs's loose_metadata_reads_version_0x403 test.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: none found ("v_mad_u16", "v_lerp_u8", "pknorm", "v_ldexp", "frexp", "cvt_flr", "cvt_rpi", "F16_NEAREST", "med3_i16", "v_sad" all return nothing).

These come from our fork (Lyrnc/palmlight), where they have been in daily play since 2026-11-29.

AI use: Claude Code (Claude Opus 5.5) ported the lowerings onto today's main, ran the tests and wrote this text. The hardware tables were measured on an RDNA2 GPU. Posted with the account owner's approval. Label: [pr-fix].

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5570513384 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4233). Originally posted by [KruIN689](https://github.com/KruIN689) on 2026-11-30T17:39:29Z. --- Fixes # ## What it changes RDNA2 VALU instructions that did not translate, or translated with results the hardware does not give. All in `crates/victory-shader/src/emit/lower.rs`. - **Lowered** (a program with one of these fell back as unsupported, `lower: Unsupported { what: "v_mad_u16" }` and so on): - `v_mad_u16/i16`, `v_add/sub_nc_i16`, `v_min3/max3/med3_i16/u16`; - `v_cvt_pknorm_i16/u16_f32`, rounded from the exact product as the hardware does, not after an f32 multiply; - `v_cvt_pk_u16_u32/i16_i32`; - `v_lerp_u8`; - `v_mad_u32_u16/i32_i16`, `v_add/sub_nc_i32`; - `v_ldexp_f32`, `v_frexp_mant_f32`, `v_frexp_exp_i32_f32`, with denormals scaled into normals and a NaN kept quiet with its payload. - **Made exact:** - `v_cvt_flr/rpi_i32_f32`: a NaN saturates by its sign, as an infinity does. The current lowering returns 0, which is what `v_cvt_i32_f32` gives, not these two. `rpi` adds the half without rounding the sum first: 0.49999997 → 0, and 8388609 stays 8388609. - `VICTORY_F16_NEAREST`: narrows on the bits, so the high half is kept. - The later `v_ldexp_f32` and `v_mad_u32_u16 | v_mad_i32_i16` arms were unreachable behind the ones above and are removed. ## How it was tested - **GPU and profile:** RTX 5080 (driver 621.40) and WARP, Windows 11. These are instruction-level tests, so no game profile applies. - **Before:** on main 84bd61e2, the 6 tests below fail: - `lower: Unsupported` for `v_mad_u16`, `v_cvt_pknorm_i16_f32` and `v_lerp_u8`; - `v_cvt_flr_i32_f32(NaN) = 0`, where 0x7fffffff is wanted; - `v_ldexp_f32(NaN, 3) = 0x7fffffff`, where 0x7fc00000 is wanted; - `F16_NEAREST` gives 0x7fff, where 0x7e00 is wanted. - **After:** `cargo test -p victory-shader --lib -- valu_tests cost::`: 68 passed, 0 failed, 2 ignored. - The 6 new tests in `valu_tests.rs` compare each instruction against tables measured on an RDNA2 GPU (gfx1036, the hw-oracle), on the card and on WARP. - They cover rows that agree in both f32 denormal modes: zeros, infinities, NaNs with payloads, denormals, saturation edges. - **Wave sizes:** 32 lanes (the lowering is per lane). - **`cargo test` for the crate it touches:** yes, the tests above. Two checks fail, as they do on main 84bd61e2 before this change: - `cargo clippy -p victory-shader --all-targets -- -D warnings` stops at `field loop_caps is never read`; - `cargo xtask policy` flags the 560-character hex run in `native.rs`'s `loose_metadata_reads_version_0x403` test. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: none found ("v_mad_u16", "v_lerp_u8", "pknorm", "v_ldexp", "frexp", "cvt_flr", "cvt_rpi", "F16_NEAREST", "med3_i16", "v_sad" all return nothing). These come from our fork (Lyrnc/palmlight), where they have been in daily play since 2026-11-29. AI use: Claude Code (Claude Opus 5.5) ported the lowerings onto today's main, ran the tests and wrote this text. The hardware tables were measured on an RDNA2 GPU. Posted with the account owner's approval. Label: [pr-fix].
VibeCodeGuy commented 2026-11-30 22:28:41 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by VibeCodeGuy on 2026-11-30T22:28:41Z.


Offline corpus check (every shader container in a v1.0.2.1 dump: 25,699 unique programs), main e1251c31 against main + this PR at cb133452.

  • Newly failing: 0. Newly passing: 0.
  • DXIL output changed: 1664 programs (561 Cs, 554 Ms, 510 Ps, 39 Vs); 1652 of them pass the validator, the other 12 failed it on main too (oversized mesh outputs).
The 1664 changed programs by family
  • 72 × MSNC_VS_PedTransformSkinAlpha
  • 37 × MSNC_VS_MirrorReflectionPedTransformSkin
  • 37 × MSNC_VS_PedTransformSkinTransmissionAlpha
  • 37 × MSNC_VS_PedTransformSkin_Decals
  • 36 × MSNC_VS_PedTransformSkinAlpha_Decals
  • 36 × MSNC_VS_PedTransformSkinTransmission_Decals
  • 30 × MS_VS_Transform
  • 26 × PS_PedTextured_Eight_Alpha
  • 24 × PS_PedAlphaPrepass
  • 24 × PS_PedAlphaPrepass_Decals
  • 24 × PS_StudioPedTextured_Eight
  • 18 × MSNC_VS_MirrorReflectionTransformSkinD
  • 17 × MSNC_VS_MirrorReflectionTransformSkinDecalsD
  • 17 × MSNC_VS_TransformSkinD
  • 17 × VS_TransformSkin_VfxVBuffer_AlphaClip
  • 15 × MSNC_VS_PedTransformSkin
  • 14 × MS_VS_MirrorReflectionTransform
  • 14 × MS_VS_TransformEntityMask
  • 14 × MS_VS_TransformFire
  • 13 × MSNC_VS_MirrorReflectionTransformSkin
  • 13 × MSNC_VS_TransformSkin
  • 12 × MSNC_VS_PedTransformSkinD_Packed
  • 12 × MS_VS_TransformTerrainNormalTint
  • 11 × MS_VS_TransformAlphaPrepass
  • 11 × MS_VS_TransformTransmission
  • 10 × MSNC_VS_TransformSkinTransmission
  • 10 × MSNC_VS_TransformSkin_AlphaPrepass
  • 7 × MSNC_VS_PedTransformSkinFire
  • 7 × MSNC_VS_PedTransformSkinTransmissionFire
  • 6 × MS_VS_MirrorReflectionTransformD
  • 6 × MS_VS_MirrorReflectionTransformDecalsD
  • 6 × MS_VS_TransformD
  • 6 × PS_MirrorReflectionTexturedDeferredAlphaClipNC
  • 6 × PS_MirrorReflectionTexturedDeferred
  • 6 × PS_PropVehicleDeferred
  • 6 × PS_TexturedDeferredAlphaClipNC
  • 6 × PS_TexturedDeferred
  • 6 × PS_VehicleLiveryOffComplexDirtOffDeferred
  • 6 × PS_VehicleLiveryOffComplexDirtOffDetailMapsOffDeferred
  • 6 × PS_VehicleLiveryOffDetailMapsOffComplexDirtOffStickersOffFlakesOffDeferred
  • 6 × PS_VehicleLiveryOffDetailMapsOffDeferred
  • 6 × PS_VehicleLiveryOffOnlyDeferred
  • 6 × PS_VehicleLiveryOnDetailMapsOffDeferred
  • 6 × PS_VehicleVariationDeferred
  • 5 × VS_Transform_VfxVBuffer_AlphaClip
  • 5 × VS_Transform_VfxVBuffer
  • 3 × PS_PropVehicleDeferred_NoDeform
  • 3 × PS_TexturedDeferredNoDeformation
  • 3 × PS_VehicleLiveryOffComplexDirtOffDeferred_NoDeform
  • 3 × PS_VehicleLiveryOffComplexDirtOffDetailMapsOffDeferred_NoDeform
  • 3 × PS_VehicleLiveryOffDetailMapsOffComplexDirtOffStickersOffFlakesOffDeferred_NoDeform
  • 3 × PS_VehicleLiveryOffDetailMapsOffDeferred_NoDeform
  • 3 × PS_VehicleLiveryOffOnlyDeferred_NoDeform
  • 3 × PS_VehicleLiveryOnDetailMapsOffDeferred_NoDeform
  • 3 × PS_VehicleVariationDeferred_NoDeform
  • 3 × billboard_nobump:CS_RaytracingResolve
  • 3 × prop_batch:CS_RaytracingResolve
  • 3 × prop_batch_anisotropy:CS_RaytracingResolve
  • 3 × prop_batch_anisotropy_dirt:CS_RaytracingResolve
  • 3 × prop_batch_cutout_hbb:CS_RaytracingResolve
  • 3 × prop_batch_dirt:CS_RaytracingResolve
  • 3 × prop_batch_dirt_cutout:CS_RaytracingResolve
  • 3 × prop_batch_dirt_plus_normal:CS_RaytracingResolve
  • 3 × prop_batch_dirt_pxm:CS_RaytracingResolve
  • 3 × prop_batch_dirt_um_wind:CS_RaytracingResolve
  • 3 × prop_batch_doublesided_um_wind:CS_RaytracingResolve
  • 3 × prop_batch_lod:CS_RaytracingResolve
  • 3 × prop_batch_pxm:CS_RaytracingResolve
  • 3 × prop_batch_retroreflection:CS_RaytracingResolve
  • 3 × prop_batch_retroreflection_dirt:CS_RaytracingResolve
  • 3 × prop_batch_slod:CS_RaytracingResolve
  • 3 × prop_batch_slod_regiontint:CS_RaytracingResolve
  • 3 × prop_batch_slod_regiontint_cpv:CS_RaytracingResolve
  • 3 × prop_batch_standard_fabric:CS_RaytracingResolve
  • 3 × prop_batch_standard_fabric_dirt:CS_RaytracingResolve
  • 3 × prop_batch_um_wind:CS_RaytracingResolve
  • 3 × standard_emissive_layer_batch:CS_RaytracingResolve
  • 3 × standard_emissive_layer_batch_underwater:CS_RaytracingResolve
  • 3 × standard_emissive_layer_wind_batch:CS_RaytracingResolve
  • 3 × standard_vehicle_2lyr_licenseplate:CS_RaytracingResolve
  • 3 × trunk:CS_RaytracingResolve
  • 3 × trunk_um_wind:CS_RaytracingResolve
  • 3 × trunk_underwater:CS_RaytracingResolve
  • 3 × trunk_wind:CS_RaytracingResolve
  • 2 × MSNC_VS_TransformSkinTransmissionFire
  • 2 × MSNC_VS_TransformSkin_Fire
  • 2 × MSNC_VS_TransformSkin_Fire_AlphaPrepass
  • 2 × MSR_VS_MirrorReflectionTransformSkin
  • 2 × MSR_VS_TransformSkinTransmission
  • 2 × MSR_VS_TransformSkin_AlphaPrepass
  • 2 × MSR_VS_TransformSkin
  • 2 × MST_DS_Transform_AddWaterSurfaceDelta
  • 2 × MS_VS_MirrorReflectionTransformSkin
  • 2 × MS_VS_TransformSkinTransmission
  • 2 × MS_VS_TransformSkin_AlphaPrepass
  • 2 × MS_VS_TransformSkin
  • 2 × MS_VS_TransformSpatterAlphaPrepass
  • 2 × MS_VS_TransformTransmissionFire
  • 2 × MS_VS_TransformTransmissionSpatter
  • 2 × MS_VS_Transform_Fire
  • 2 × MS_VS_Transform_Fire_AlphaPrepass
  • 2 × PS_AlphaTransmissionSpatter
  • 2 × PS_AlphaTransmissionSpatter_Fire
  • 2 × PS_AlphaTransmission
  • 2 × PS_AlphaTransmission_Fire
  • 2 × grass_batch_floating_veg_tess:MSTS_VS_Transform_AddWaterSurfaceDelta
  • 2 × standard_emissive_animated_3lyr_inst:CS_RaytracingResolve
  • 2 × standard_emissive_animated_inst:CS_RaytracingResolve
  • 2 × standard_emissive_layer_inst:CS_RaytracingResolve
  • 2 × standard_emissive_layer_pxm_inst:CS_RaytracingResolve
  • 2 × standard_emissive_layer_wind_inst:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_clearcoat:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_decal:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_decal_prop:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_decal_secmo:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_emissive_brakedisc_inst:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_prop:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_prop_secmo:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_reflector:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_reflector_prop:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_secmo:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_signs:CS_RaytracingResolve
  • 2 × standard_vehicle_2lyr_wheel_inst:CS_RaytracingResolve
  • 2 × standard_vehicle_interior_2lyr:CS_RaytracingResolve
  • 2 × standard_vehicle_interior_2lyr_decal:CS_RaytracingResolve
  • 2 × standard_vehicle_wheel_2lyr:CS_RaytracingResolve
  • 2 × trunk_vehicle_clip:CS_RaytracingResolve
  • 1 × GpuParticleUpdate:CS_DrawBatch
  • 1 × MS_VS_TransformSpatter_Fire_AlphaPrepass
  • 1 × MS_VS_TransformTransmissionSpatterFire
  • 1 × PS_EntityFireResolveEmissive
  • 1 × PS_MIRROR_PBR_MATERIAL_ANISOTROPY
  • 1 × PS_MIRROR_PBR_MATERIAL_BLURTRANSMISSION
  • 1 × PS_MIRROR_PBR_MATERIAL_CLEARCOAT
  • 1 × PS_MIRROR_PBR_MATERIAL_CLEARCOAT_ANISOTROPY
  • 1 × PS_MIRROR_PBR_MATERIAL_CLEARCOAT_DIFFRACTION
  • 1 × PS_MIRROR_PBR_MATERIAL_CLEARCOAT_GLINTS
  • 1 × PS_MIRROR_PBR_MATERIAL_CLEARCOAT_IRIDESCENCE
  • 1 × PS_MIRROR_PBR_MATERIAL_CLEARCOAT_RADIAL_DIFFRACTION
  • 1 × PS_MIRROR_PBR_MATERIAL_DIFFRACTION
  • 1 × PS_MIRROR_PBR_MATERIAL_EMISSIVE
  • 1 × PS_MIRROR_PBR_MATERIAL_EMISSIVE_DIFFRACTION
  • 1 × PS_MIRROR_PBR_MATERIAL_EMISSIVE_RETROREFLECTION
  • 1 × PS_MIRROR_PBR_MATERIAL_EYE
  • 1 × PS_MIRROR_PBR_MATERIAL_EYE_RETROREFLECTION
  • 1 × PS_MIRROR_PBR_MATERIAL_GLINTS
  • 1 × PS_MIRROR_PBR_MATERIAL_HAIR
  • 1 × PS_MIRROR_PBR_MATERIAL_HAZE
  • 1 × PS_MIRROR_PBR_MATERIAL_IRIDESCENCE

How: victory translate <dump> --validate --list built for each side (release, cross-built with cargo-xwin, run under Wine), VICTORY_HOST_WAVE=32, plus the four shader-cache-key settings play starts with (VICTORY_EARLY_DEPTH=1, VICTORY_NAN_SCRUB=1, VICTORY_BVH_MISS=1, VICTORY_SAMPLED_MARKS=1). Validator: dxil.dll from DXC v1.9.2609. "Changed" compares translate's emitted hash of each module and its bindings. There was no GPU on this side, so no host pipelines were made and nothing was run on a card. On main the same run has 72 failures: 71 mesh programs over the 32 KiB output limit (the known shortcut in mesh_prologue) and CS_TraceShadowRays_FullAdaptive (#2993).

On main every program in this dump already translates (26,180 of 26,180), so none of the newly lowered instructions was holding a program of this title back. For this title the change is the programs above that come out different ("made exact"), among them many ped skin mesh and pixel programs.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7293899340 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4233#issuecomment-7293899340). Originally posted by [VibeCodeGuy](https://github.com/VibeCodeGuy) on 2026-11-30T22:28:41Z. --- **Offline corpus check** (every shader container in a v1.0.2.1 dump: 25,699 unique programs), `main` e1251c31 against `main` + this PR at cb133452. - Newly failing: **0**. Newly passing: **0**. - DXIL output changed: **1664** programs (561 Cs, 554 Ms, 510 Ps, 39 Vs); 1652 of them pass the validator, the other 12 failed it on `main` too (oversized mesh outputs). <details><summary>The 1664 changed programs by family</summary> - 72 × `MSNC_VS_PedTransformSkinAlpha` - 37 × `MSNC_VS_MirrorReflectionPedTransformSkin` - 37 × `MSNC_VS_PedTransformSkinTransmissionAlpha` - 37 × `MSNC_VS_PedTransformSkin_Decals` - 36 × `MSNC_VS_PedTransformSkinAlpha_Decals` - 36 × `MSNC_VS_PedTransformSkinTransmission_Decals` - 30 × `MS_VS_Transform` - 26 × `PS_PedTextured_Eight_Alpha` - 24 × `PS_PedAlphaPrepass` - 24 × `PS_PedAlphaPrepass_Decals` - 24 × `PS_StudioPedTextured_Eight` - 18 × `MSNC_VS_MirrorReflectionTransformSkinD` - 17 × `MSNC_VS_MirrorReflectionTransformSkinDecalsD` - 17 × `MSNC_VS_TransformSkinD` - 17 × `VS_TransformSkin_VfxVBuffer_AlphaClip` - 15 × `MSNC_VS_PedTransformSkin` - 14 × `MS_VS_MirrorReflectionTransform` - 14 × `MS_VS_TransformEntityMask` - 14 × `MS_VS_TransformFire` - 13 × `MSNC_VS_MirrorReflectionTransformSkin` - 13 × `MSNC_VS_TransformSkin` - 12 × `MSNC_VS_PedTransformSkinD_Packed` - 12 × `MS_VS_TransformTerrainNormalTint` - 11 × `MS_VS_TransformAlphaPrepass` - 11 × `MS_VS_TransformTransmission` - 10 × `MSNC_VS_TransformSkinTransmission` - 10 × `MSNC_VS_TransformSkin_AlphaPrepass` - 7 × `MSNC_VS_PedTransformSkinFire` - 7 × `MSNC_VS_PedTransformSkinTransmissionFire` - 6 × `MS_VS_MirrorReflectionTransformD` - 6 × `MS_VS_MirrorReflectionTransformDecalsD` - 6 × `MS_VS_TransformD` - 6 × `PS_MirrorReflectionTexturedDeferredAlphaClipNC` - 6 × `PS_MirrorReflectionTexturedDeferred` - 6 × `PS_PropVehicleDeferred` - 6 × `PS_TexturedDeferredAlphaClipNC` - 6 × `PS_TexturedDeferred` - 6 × `PS_VehicleLiveryOffComplexDirtOffDeferred` - 6 × `PS_VehicleLiveryOffComplexDirtOffDetailMapsOffDeferred` - 6 × `PS_VehicleLiveryOffDetailMapsOffComplexDirtOffStickersOffFlakesOffDeferred` - 6 × `PS_VehicleLiveryOffDetailMapsOffDeferred` - 6 × `PS_VehicleLiveryOffOnlyDeferred` - 6 × `PS_VehicleLiveryOnDetailMapsOffDeferred` - 6 × `PS_VehicleVariationDeferred` - 5 × `VS_Transform_VfxVBuffer_AlphaClip` - 5 × `VS_Transform_VfxVBuffer` - 3 × `PS_PropVehicleDeferred_NoDeform` - 3 × `PS_TexturedDeferredNoDeformation` - 3 × `PS_VehicleLiveryOffComplexDirtOffDeferred_NoDeform` - 3 × `PS_VehicleLiveryOffComplexDirtOffDetailMapsOffDeferred_NoDeform` - 3 × `PS_VehicleLiveryOffDetailMapsOffComplexDirtOffStickersOffFlakesOffDeferred_NoDeform` - 3 × `PS_VehicleLiveryOffDetailMapsOffDeferred_NoDeform` - 3 × `PS_VehicleLiveryOffOnlyDeferred_NoDeform` - 3 × `PS_VehicleLiveryOnDetailMapsOffDeferred_NoDeform` - 3 × `PS_VehicleVariationDeferred_NoDeform` - 3 × `billboard_nobump:CS_RaytracingResolve` - 3 × `prop_batch:CS_RaytracingResolve` - 3 × `prop_batch_anisotropy:CS_RaytracingResolve` - 3 × `prop_batch_anisotropy_dirt:CS_RaytracingResolve` - 3 × `prop_batch_cutout_hbb:CS_RaytracingResolve` - 3 × `prop_batch_dirt:CS_RaytracingResolve` - 3 × `prop_batch_dirt_cutout:CS_RaytracingResolve` - 3 × `prop_batch_dirt_plus_normal:CS_RaytracingResolve` - 3 × `prop_batch_dirt_pxm:CS_RaytracingResolve` - 3 × `prop_batch_dirt_um_wind:CS_RaytracingResolve` - 3 × `prop_batch_doublesided_um_wind:CS_RaytracingResolve` - 3 × `prop_batch_lod:CS_RaytracingResolve` - 3 × `prop_batch_pxm:CS_RaytracingResolve` - 3 × `prop_batch_retroreflection:CS_RaytracingResolve` - 3 × `prop_batch_retroreflection_dirt:CS_RaytracingResolve` - 3 × `prop_batch_slod:CS_RaytracingResolve` - 3 × `prop_batch_slod_regiontint:CS_RaytracingResolve` - 3 × `prop_batch_slod_regiontint_cpv:CS_RaytracingResolve` - 3 × `prop_batch_standard_fabric:CS_RaytracingResolve` - 3 × `prop_batch_standard_fabric_dirt:CS_RaytracingResolve` - 3 × `prop_batch_um_wind:CS_RaytracingResolve` - 3 × `standard_emissive_layer_batch:CS_RaytracingResolve` - 3 × `standard_emissive_layer_batch_underwater:CS_RaytracingResolve` - 3 × `standard_emissive_layer_wind_batch:CS_RaytracingResolve` - 3 × `standard_vehicle_2lyr_licenseplate:CS_RaytracingResolve` - 3 × `trunk:CS_RaytracingResolve` - 3 × `trunk_um_wind:CS_RaytracingResolve` - 3 × `trunk_underwater:CS_RaytracingResolve` - 3 × `trunk_wind:CS_RaytracingResolve` - 2 × `MSNC_VS_TransformSkinTransmissionFire` - 2 × `MSNC_VS_TransformSkin_Fire` - 2 × `MSNC_VS_TransformSkin_Fire_AlphaPrepass` - 2 × `MSR_VS_MirrorReflectionTransformSkin` - 2 × `MSR_VS_TransformSkinTransmission` - 2 × `MSR_VS_TransformSkin_AlphaPrepass` - 2 × `MSR_VS_TransformSkin` - 2 × `MST_DS_Transform_AddWaterSurfaceDelta` - 2 × `MS_VS_MirrorReflectionTransformSkin` - 2 × `MS_VS_TransformSkinTransmission` - 2 × `MS_VS_TransformSkin_AlphaPrepass` - 2 × `MS_VS_TransformSkin` - 2 × `MS_VS_TransformSpatterAlphaPrepass` - 2 × `MS_VS_TransformTransmissionFire` - 2 × `MS_VS_TransformTransmissionSpatter` - 2 × `MS_VS_Transform_Fire` - 2 × `MS_VS_Transform_Fire_AlphaPrepass` - 2 × `PS_AlphaTransmissionSpatter` - 2 × `PS_AlphaTransmissionSpatter_Fire` - 2 × `PS_AlphaTransmission` - 2 × `PS_AlphaTransmission_Fire` - 2 × `grass_batch_floating_veg_tess:MSTS_VS_Transform_AddWaterSurfaceDelta` - 2 × `standard_emissive_animated_3lyr_inst:CS_RaytracingResolve` - 2 × `standard_emissive_animated_inst:CS_RaytracingResolve` - 2 × `standard_emissive_layer_inst:CS_RaytracingResolve` - 2 × `standard_emissive_layer_pxm_inst:CS_RaytracingResolve` - 2 × `standard_emissive_layer_wind_inst:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_clearcoat:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_decal:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_decal_prop:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_decal_secmo:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_emissive_brakedisc_inst:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_prop:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_prop_secmo:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_reflector:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_reflector_prop:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_secmo:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_signs:CS_RaytracingResolve` - 2 × `standard_vehicle_2lyr_wheel_inst:CS_RaytracingResolve` - 2 × `standard_vehicle_interior_2lyr:CS_RaytracingResolve` - 2 × `standard_vehicle_interior_2lyr_decal:CS_RaytracingResolve` - 2 × `standard_vehicle_wheel_2lyr:CS_RaytracingResolve` - 2 × `trunk_vehicle_clip:CS_RaytracingResolve` - 1 × `GpuParticleUpdate:CS_DrawBatch` - 1 × `MS_VS_TransformSpatter_Fire_AlphaPrepass` - 1 × `MS_VS_TransformTransmissionSpatterFire` - 1 × `PS_EntityFireResolveEmissive` - 1 × `PS_MIRROR_PBR_MATERIAL_ANISOTROPY` - 1 × `PS_MIRROR_PBR_MATERIAL_BLURTRANSMISSION` - 1 × `PS_MIRROR_PBR_MATERIAL_CLEARCOAT` - 1 × `PS_MIRROR_PBR_MATERIAL_CLEARCOAT_ANISOTROPY` - 1 × `PS_MIRROR_PBR_MATERIAL_CLEARCOAT_DIFFRACTION` - 1 × `PS_MIRROR_PBR_MATERIAL_CLEARCOAT_GLINTS` - 1 × `PS_MIRROR_PBR_MATERIAL_CLEARCOAT_IRIDESCENCE` - 1 × `PS_MIRROR_PBR_MATERIAL_CLEARCOAT_RADIAL_DIFFRACTION` - 1 × `PS_MIRROR_PBR_MATERIAL_DIFFRACTION` - 1 × `PS_MIRROR_PBR_MATERIAL_EMISSIVE` - 1 × `PS_MIRROR_PBR_MATERIAL_EMISSIVE_DIFFRACTION` - 1 × `PS_MIRROR_PBR_MATERIAL_EMISSIVE_RETROREFLECTION` - 1 × `PS_MIRROR_PBR_MATERIAL_EYE` - 1 × `PS_MIRROR_PBR_MATERIAL_EYE_RETROREFLECTION` - 1 × `PS_MIRROR_PBR_MATERIAL_GLINTS` - 1 × `PS_MIRROR_PBR_MATERIAL_HAIR` - 1 × `PS_MIRROR_PBR_MATERIAL_HAZE` - 1 × `PS_MIRROR_PBR_MATERIAL_IRIDESCENCE` </details> How: `victory translate <dump> --validate --list` built for each side (release, cross-built with cargo-xwin, run under Wine), `VICTORY_HOST_WAVE=32`, plus the four shader-cache-key settings `play` starts with (`VICTORY_EARLY_DEPTH=1`, `VICTORY_NAN_SCRUB=1`, `VICTORY_BVH_MISS=1`, `VICTORY_SAMPLED_MARKS=1`). Validator: `dxil.dll` from DXC v1.9.2609. "Changed" compares translate's `emitted` hash of each module and its bindings. There was no GPU on this side, so no host pipelines were made and nothing was run on a card. On `main` the same run has 72 failures: 71 mesh programs over the 32 KiB output limit (the known shortcut in `mesh_prologue`) and `CS_TraceShadowRays_FullAdaptive` (#2993). On `main` every program in this dump already translates (26,180 of 26,180), so none of the newly lowered instructions was holding a program of this title back. For this title the change is the programs above that come out different ("made exact"), among them many ped skin mesh and pixel programs.
KruIN689 commented 2026-11-30 23:35:51 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KruIN689 on 2026-11-30T23:35:51Z.


@VibeCodeGuy thank you, that corpus run is exactly what this needed. 0 newly failing, and the 12 validator failures already on main, are reassuring.

You're right about the gains: for this title main already translates every program, so the lowered instructions add nothing here. They matter for other titles, or for programs this dump doesn't have. For this title, what the PR changes is the "made exact" part (NaN and rounding behaviour as the RDNA2 tables show). It reaches the 1,664 programs you list, ped skin, vehicles and CS_RaytracingResolve among them.

That is a picture change, so I'll check it in game rather than claim it: captured frames of peds close up, vehicles and RT reflections on main vs main + this PR (RTX 5080, same save). I'll post what I find here, including if anything looks worse. If you have a quick way to see which instructions those 1,664 programs share, that would narrow it down.

(Claude Code, for KruIN689.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7295308160 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4233#issuecomment-7295308160). Originally posted by [KruIN689](https://github.com/KruIN689) on 2026-11-30T23:35:51Z. --- @VibeCodeGuy thank you, that corpus run is exactly what this needed. 0 newly failing, and the 12 validator failures already on main, are reassuring. You're right about the gains: for this title main already translates every program, so the lowered instructions add nothing here. They matter for other titles, or for programs this dump doesn't have. For this title, what the PR changes is the "made exact" part (NaN and rounding behaviour as the RDNA2 tables show). It reaches the 1,664 programs you list, ped skin, vehicles and CS_RaytracingResolve among them. That is a picture change, so I'll check it in game rather than claim it: captured frames of peds close up, vehicles and RT reflections on main vs main + this PR (RTX 5080, same save). I'll post what I find here, including if anything looks worse. If you have a quick way to see which instructions those 1,664 programs share, that would narrow it down. (Claude Code, for KruIN689.)
KruIN689 commented 2026-12-01 00:46:18 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by KruIN689 on 2026-12-01T00:46:18Z.


In-game picture check, as promised. RTX 5080, Series X native 1440p, VICTORY_HW_RT=1, diagnostics builds. Frames captured at the same save, standing still. Main 7d93ee07 against this PR's head cb133452, which sits on 84bd61e2, so the two sides also differ by main's newer commits.

Result: no visible difference. The scene has the player in a dark, glossy car beside foliage and water, in sunlight. I compared the full frames and 2× crops of the car's body and door. The paint and its RT reflections, the chrome, the badges, the wheels, the sleeve and shirt pattern, the trees, the water and the shadows match. The only difference is the character's animation frame.

Limits:

  • One daytime scene. The ped skin seen is an arm and a profile behind glass, not a face close up.
  • No night scene, no fire, decals or mirror programs on screen, although your list includes those families.
  • Nothing measured per pixel: the animation differs, so a diff image would mostly show the character.

Together with your corpus run (0 newly failing, all 1,664 changed programs pass the validator), I see nothing against it. A face close-up and a night street would be the next places to look, if someone has a save there.

(Claude Code, for KruIN689.)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7296719167 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4233#issuecomment-7296719167). Originally posted by [KruIN689](https://github.com/KruIN689) on 2026-12-01T00:46:18Z. --- **In-game picture check, as promised.** RTX 5080, Series X native 1440p, `VICTORY_HW_RT=1`, diagnostics builds. Frames captured at the same save, standing still. Main `7d93ee07` against this PR's head `cb133452`, which sits on `84bd61e2`, so the two sides also differ by main's newer commits. **Result: no visible difference.** The scene has the player in a dark, glossy car beside foliage and water, in sunlight. I compared the full frames and 2× crops of the car's body and door. The paint and its RT reflections, the chrome, the badges, the wheels, the sleeve and shirt pattern, the trees, the water and the shadows match. The only difference is the character's animation frame. **Limits:** - One daytime scene. The ped skin seen is an arm and a profile behind glass, not a face close up. - No night scene, no fire, decals or mirror programs on screen, although your list includes those families. - Nothing measured per pixel: the animation differs, so a diff image would mostly show the character. Together with your corpus run (0 newly failing, all 1,664 changed programs pass the validator), I see nothing against it. A face close-up and a night street would be the next places to look, if someone has a save there. (Claude Code, for KruIN689.)
trustno1-coder commented 2026-12-01 18:45:08 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:45:08Z.


Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7321473356 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4233#issuecomment-7321473356). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-12-01T18:45:08Z. --- Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
trustno1-coder/VIctory-NVIDIA!4233
No description provided.