fix(shader): reset dirty/e_written at fold branch leaders and restore self.cur in half_meet_at #3946

Open
github-bot wants to merge 1 commit from github-bot/gh-3946 into main AGit
Owner

@⁠qlfu on GitHub · 2026-11-30 12:36 UTC · original
qlfu:pr/fix-shader-fold-leaders-and-half-meet → main · +4 −0 · 2 files · 1 commits · open

Summary

Two targeted shader compiler correctness fixes:

  1. crates/victory-shader/src/fold.rs: at branch-target leaders, reset f.dirty = true and f.e_written = true after f.flush(). Previously, a fallthrough predecessor with dirty == false could cause s_cbranch_execz (!live) at a merge block to skip s_or_b32 EXEC_LO, e, e+1 when another incoming edge arrived with dirty == true or pending e_written.
  2. crates/victory-shader/src/emit/lower.rs: save and restore self.cur in half_meet_at around the tally block emission so callers invoking half_meet_at(block) with block != self.cur (if block == self.cur { self.cur = done; }) do not have self.cur overwritten.

Verification

  • cargo test -p victory-shader --lib --locked (466 passed, 0 failed on combined build; fold:: unit tests + cargo check -p victory-shader --all-targets --all-features --locked exit 0 on this branch).
  • Verified across 1,963 warmed GTA VI pipelines (0 failures).
**@⁠qlfu** on GitHub · 2026-11-30 12:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3946) `qlfu:pr/fix-shader-fold-leaders-and-half-meet` → `main` · +4 −0 · 2 files · 1 commits · open ## Summary Two targeted shader compiler correctness fixes: 1. `crates/victory-shader/src/fold.rs`: at branch-target `leaders`, reset `f.dirty = true` and `f.e_written = true` after `f.flush()`. Previously, a fallthrough predecessor with `dirty == false` could cause `s_cbranch_execz` (`!live`) at a merge block to skip `s_or_b32 EXEC_LO, e, e+1` when another incoming edge arrived with `dirty == true` or pending `e_written`. 2. `crates/victory-shader/src/emit/lower.rs`: save and restore `self.cur` in `half_meet_at` around the tally block emission so callers invoking `half_meet_at(block)` with `block != self.cur` (`if block == self.cur { self.cur = done; }`) do not have `self.cur` overwritten. ## Verification - `cargo test -p victory-shader --lib --locked` (466 passed, 0 failed on combined build; `fold::` unit tests + `cargo check -p victory-shader --all-targets --all-features --locked` exit 0 on this branch). - Verified across 1,963 warmed GTA VI pipelines (`0` failures).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 12:40:25 +00:00
Author
Owner

@⁠VibeCodeGuy on GitHub · 2026-11-30 22:48 UTC · original

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

  • Newly failing: 0. Newly passing: 0.
  • DXIL output changed: 123 programs (123 Cs); 123 of them pass the validator.
The 123 changed programs by family
  • 2 × sr_denoising:CS_TemporalResolveAlpha
  • 2 × sr_denoising:CS_TemporalResolveWater
  • 1 × GpuParticleCollision:CS_CollisionRaytraced
  • 1 × GpuParticleEmit:CS_EmitCounts_Dynamic_Edge
  • 1 × GpuParticleEmit:CS_Emit_Dynamic_Model_AttachMesh_Skinned
  • 1 × GpuParticleEmit:CS_Emit_Dynamic_Model_AttachMesh
  • 1 × GpuParticleEmit:CS_Emit_Dynamic_Model_EdgeHashGrid
  • 1 × GpuParticleEmit:CS_Emit_Dynamic_Model_Edge
  • 1 × GpuParticleEmit:CS_Emit_Dynamic_Model_Skinned
  • 1 × GpuParticleEmit:CS_Emit_Dynamic_Model
  • 1 × GpuParticleUpdate:CS_DrawBatch
  • 1 × GpuParticleUpdate:CS_UpdateAttachMeshParticles
  • 1 × GpuParticleUpdate:CS_UpdateParticles
  • 1 × GpuParticleUpdate:CS_UpdateSkinnedAttachMeshParticles
  • 1 × GpuParticleUpdate:CS_UpdateSkinnedAttachMeshTreeParticles
  • 1 × InstanceCulling:CS_Tree_BatchCullReflect
  • 1 × InstanceCulling:CS_Tree_BatchCull_ImposterOnly
  • 1 × InstanceCulling:CS_Tree_BatchCull_ValidateInstInv
  • 1 × InstanceCulling:CS_Tree_BatchCull_ValidateInst
  • 1 × InstanceCulling:CS_Tree_BatchCull
  • 1 × InstanceCulling:CS_Tree_BatchNoCull
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveDOFAware
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveDualOutputDOFAware
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveDualOutputWithLumaDOFAware
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveDualOutputWithLuma
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveDualOutput
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveWithLumaDOFAware
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolveWithLuma
  • 1 × TAA_Utilities:CS_SceneColorTemporalResolve
  • 1 × cascadeshadows_classify:CS_CalcRTClassificationListCounts
  • 1 × cascadeshadows_classify:CS_CalcRasterClassificationListCounts
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCBPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCB
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlpha
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesCBPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesCB
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascadesPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledCascades
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscAlphaPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscAlpha
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscCBPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscCB
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscHairAlphaPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscHairAlpha
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscHairPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscHair
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMiscPPPC
  • 1 × cascadeshadows_rendering:CS_ShadowRenderTiledMisc
  • 1 × firevbuffer:CS_EntityFireClassify
  • 1 × firevbuffer:CS_EntityFireReduceClassification_Scalarized
  • 1 × firevbuffer:CS_EntityFireResolve_Scalarized
  • 1 × firevbuffer_emissive:CS_EntityFireResolve_Scalarized
  • 1 × indirect_diffuse_lighting:CS_DeferredFallback_BVH
  • 1 × indirect_diffuse_lighting:CS_DeferredFallback_Fallback
  • 1 × indirect_diffuse_lighting:CS_DeferredFallback_Voxels
  • 1 × indirect_diffuse_lighting:CS_ResolveVBuffer_Voxels
  • 1 × indirect_light_probes:CS_IrradianceCache_IntegrateIrradianceSH
  • 1 × indirect_light_probes:CS_IrradianceCache_ShadeSecondary
  • 1 × indirect_light_probes:CS_IrradianceCache_Shade
  • 1 × lens_flares:CS_ScanMip0
  • 1 × lens_flares:CS_ScanMip1
  • 1 × lens_flares:CS_ScanMip2
  • 1 × lens_flares:CS_ScanMip3
  • 1 × ptx_prerender:ptfx_CS_PreRenderSprite
  • 1 × ptx_prerender:ptfx_CS_PreRenderTrail
  • 1 × scattering_transmittance_system:CS_GatherDensityAreaForReadBack
  • 1 × scattering_transmittance_system:CS_GatherDiffusion
  • 1 × scattering_transmittance_system:CS_Gather
  • 1 × scattering_transmittance_system:CS_Gather_Reference
  • 1 × scattering_transmittance_system:CS_SortRayTiles
  • 1 × shader_binning_utils:CS_GenerateShaderBinOffsets
  • 1 × shadowmask:CS_DenoiseShadowMaskPoissonDiscPacked
  • 1 × shadowmask:CS_DenoiseShadowMaskPoissonDisc
  • 1 × shadowmask:CS_GenerateShadowMasksHairOnly_SampleHairScreenSpace
  • 1 × shadowmask:CS_GenerateShadowMasks
  • 1 × shadowmask:CS_GenerateShadowMasks_HairOnly
  • 1 × shadowmask:CS_GenerateShadowMasks_Raytraced
  • 1 × shadowmask:CS_GenerateShadowMasks_SampleHairScreenSpace
  • 1 × shadowmask:CS_TraceShadowRays_Full
  • 1 × shadowmask:CS_TraceShadowRays_Fullres
  • 1 × shadowmask:CS_TraceShadowRays_ScreenSpaceOnlyFullRes
  • 1 × sr_denoising:CS_TemporalResolve1_Alpha
  • 1 × sr_denoising:CS_TemporalResolve1_Opaque_FrameStatistics
  • 1 × sr_denoising:CS_TemporalResolve1_Opaque
  • 1 × sr_denoising:CS_TemporalResolve1_Water
  • 1 × sr_denoising:CS_TemporalResolve2_Opaque_FrameStatistics
  • 1 × sr_denoising:CS_TemporalResolveOpaque2
  • 1 × sr_denoising:CS_TemporalResolveOpaque_FrameStatistics
  • 1 × sr_tracing:CS_DeferredFallbacksAlpha_SkyProbe
  • 1 × sr_tracing:CS_RayPrePass_Alpha
  • 1 × sr_tracing:CS_RayPrePass_Opaque_SSR
  • 1 × sr_tracing:CS_RayPrePass_Water_SSR
  • 1 × sr_tracing:CS_ResolveVolumetrics
  • 1 × sr_tracing:CS_Tiling_Generate_Opaque
  • 1 × vfx_proj_decal_trail:CS_BuildProjDecalTrailProjectionBoxInstances
  • 1 × vfx_proj_decal_trail:CS_BuildProjDecalTrailVertexBufferFromNodes
  • 1 × vfx_proj_decal_trail:CS_DefragHeap_ComputeRelocations
  • 1 × vfx_proj_decal_trail:CS_DefragHeap_Defrag
  • 1 × vfx_proj_decal_trail:CS_RelocateProjDecalTrailAlt
  • 1 × vfx_proj_decal_trail:CS_RelocateProjDecalTrailNodesAlt
  • 1 × vfx_proj_decal_trail:CS_SpawnLiquidTrail_SampleDecalRaycastTriangleTest
  • 1 × vfx_proj_decal_trail:CS_SpawnLiquidTrail_SampleDecalRaycastTriangleTest_Nodes
  • 1 × vfx_proj_decal_trail:CS_UpdateProjDecalTrailAttachment
  • 1 × vfx_proj_decal_trail:CS_UpdateProjDecalTrailAttachment_Nodes
  • 1 × vfx_proj_decal_trail:CS_UpdateProjDecalTrailMeshIndices
  • 1 × vfx_proj_decal_vbuffer:CS_ProjDecalReduceClassification_Scalarized
  • 1 × vfx_proj_decal_vbuffer:CS_ProjDecalResolve_Vectorized
  • 1 × vfx_triangleClip:CS_CollectTriangles_Meshlets
  • 1 × vfx_triangleClip:CS_CollectTriangles
  • 1 × vfx_triangleClip:CS_DefragHeap_ComputeRelocations
  • 1 × vfx_triangleClip:CS_DefragHeap_Defrag
  • 1 × vfx_triangleClip:CS_RelocateVfxStartIndexLocationAlt
  • 1 × water_compressed_simulation_rendertarget:CS_MinMax_Float_DualPlane_Parallel
  • 1 × water_compressed_simulation_rendertarget:CS_MinMax_Float_SinglePlane_Parallel
  • 1 × water_compressed_simulation_rendertarget:CS_MinMax_Int_SinglePlane_Parallel
  • 1 × water_shading:CS_TransmissionVolumetricsSubmerged
  • 1 × water_shading:CS_TransmissionVolumetrics_Tiled_LocalLights
  • 1 × water_shading:CS_TransmissionVolumetrics_Tiled
  • 1 × water_shading:CS_TransmissionVolumetrics_VolumePortalsOnly
  • 1 × water_shading:CS_TransmissionVolumetrics

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).

**@⁠VibeCodeGuy** on GitHub · 2026-11-30 22:48 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3946#issuecomment-7294324569) **Offline corpus check** (every shader container in a v1.0.2.1 dump: 25,699 unique programs), `main` e1251c31 against `main` + this PR at 3dd3d4de. - Newly failing: **0**. Newly passing: **0**. - DXIL output changed: **123** programs (123 Cs); 123 of them pass the validator. <details><summary>The 123 changed programs by family</summary> - 2 × `sr_denoising:CS_TemporalResolveAlpha` - 2 × `sr_denoising:CS_TemporalResolveWater` - 1 × `GpuParticleCollision:CS_CollisionRaytraced` - 1 × `GpuParticleEmit:CS_EmitCounts_Dynamic_Edge` - 1 × `GpuParticleEmit:CS_Emit_Dynamic_Model_AttachMesh_Skinned` - 1 × `GpuParticleEmit:CS_Emit_Dynamic_Model_AttachMesh` - 1 × `GpuParticleEmit:CS_Emit_Dynamic_Model_EdgeHashGrid` - 1 × `GpuParticleEmit:CS_Emit_Dynamic_Model_Edge` - 1 × `GpuParticleEmit:CS_Emit_Dynamic_Model_Skinned` - 1 × `GpuParticleEmit:CS_Emit_Dynamic_Model` - 1 × `GpuParticleUpdate:CS_DrawBatch` - 1 × `GpuParticleUpdate:CS_UpdateAttachMeshParticles` - 1 × `GpuParticleUpdate:CS_UpdateParticles` - 1 × `GpuParticleUpdate:CS_UpdateSkinnedAttachMeshParticles` - 1 × `GpuParticleUpdate:CS_UpdateSkinnedAttachMeshTreeParticles` - 1 × `InstanceCulling:CS_Tree_BatchCullReflect` - 1 × `InstanceCulling:CS_Tree_BatchCull_ImposterOnly` - 1 × `InstanceCulling:CS_Tree_BatchCull_ValidateInstInv` - 1 × `InstanceCulling:CS_Tree_BatchCull_ValidateInst` - 1 × `InstanceCulling:CS_Tree_BatchCull` - 1 × `InstanceCulling:CS_Tree_BatchNoCull` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveDOFAware` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveDualOutputDOFAware` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveDualOutputWithLumaDOFAware` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveDualOutputWithLuma` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveDualOutput` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveWithLumaDOFAware` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolveWithLuma` - 1 × `TAA_Utilities:CS_SceneColorTemporalResolve` - 1 × `cascadeshadows_classify:CS_CalcRTClassificationListCounts` - 1 × `cascadeshadows_classify:CS_CalcRasterClassificationListCounts` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCBPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaCB` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlphaPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesAlpha` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesCBPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesCB` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascadesPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledCascades` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscAlphaPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscAlpha` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscCBPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscCB` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscHairAlphaPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscHairAlpha` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscHairPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscHair` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMiscPPPC` - 1 × `cascadeshadows_rendering:CS_ShadowRenderTiledMisc` - 1 × `firevbuffer:CS_EntityFireClassify` - 1 × `firevbuffer:CS_EntityFireReduceClassification_Scalarized` - 1 × `firevbuffer:CS_EntityFireResolve_Scalarized` - 1 × `firevbuffer_emissive:CS_EntityFireResolve_Scalarized` - 1 × `indirect_diffuse_lighting:CS_DeferredFallback_BVH` - 1 × `indirect_diffuse_lighting:CS_DeferredFallback_Fallback` - 1 × `indirect_diffuse_lighting:CS_DeferredFallback_Voxels` - 1 × `indirect_diffuse_lighting:CS_ResolveVBuffer_Voxels` - 1 × `indirect_light_probes:CS_IrradianceCache_IntegrateIrradianceSH` - 1 × `indirect_light_probes:CS_IrradianceCache_ShadeSecondary` - 1 × `indirect_light_probes:CS_IrradianceCache_Shade` - 1 × `lens_flares:CS_ScanMip0` - 1 × `lens_flares:CS_ScanMip1` - 1 × `lens_flares:CS_ScanMip2` - 1 × `lens_flares:CS_ScanMip3` - 1 × `ptx_prerender:ptfx_CS_PreRenderSprite` - 1 × `ptx_prerender:ptfx_CS_PreRenderTrail` - 1 × `scattering_transmittance_system:CS_GatherDensityAreaForReadBack` - 1 × `scattering_transmittance_system:CS_GatherDiffusion` - 1 × `scattering_transmittance_system:CS_Gather` - 1 × `scattering_transmittance_system:CS_Gather_Reference` - 1 × `scattering_transmittance_system:CS_SortRayTiles` - 1 × `shader_binning_utils:CS_GenerateShaderBinOffsets` - 1 × `shadowmask:CS_DenoiseShadowMaskPoissonDiscPacked` - 1 × `shadowmask:CS_DenoiseShadowMaskPoissonDisc` - 1 × `shadowmask:CS_GenerateShadowMasksHairOnly_SampleHairScreenSpace` - 1 × `shadowmask:CS_GenerateShadowMasks` - 1 × `shadowmask:CS_GenerateShadowMasks_HairOnly` - 1 × `shadowmask:CS_GenerateShadowMasks_Raytraced` - 1 × `shadowmask:CS_GenerateShadowMasks_SampleHairScreenSpace` - 1 × `shadowmask:CS_TraceShadowRays_Full` - 1 × `shadowmask:CS_TraceShadowRays_Fullres` - 1 × `shadowmask:CS_TraceShadowRays_ScreenSpaceOnlyFullRes` - 1 × `sr_denoising:CS_TemporalResolve1_Alpha` - 1 × `sr_denoising:CS_TemporalResolve1_Opaque_FrameStatistics` - 1 × `sr_denoising:CS_TemporalResolve1_Opaque` - 1 × `sr_denoising:CS_TemporalResolve1_Water` - 1 × `sr_denoising:CS_TemporalResolve2_Opaque_FrameStatistics` - 1 × `sr_denoising:CS_TemporalResolveOpaque2` - 1 × `sr_denoising:CS_TemporalResolveOpaque_FrameStatistics` - 1 × `sr_tracing:CS_DeferredFallbacksAlpha_SkyProbe` - 1 × `sr_tracing:CS_RayPrePass_Alpha` - 1 × `sr_tracing:CS_RayPrePass_Opaque_SSR` - 1 × `sr_tracing:CS_RayPrePass_Water_SSR` - 1 × `sr_tracing:CS_ResolveVolumetrics` - 1 × `sr_tracing:CS_Tiling_Generate_Opaque` - 1 × `vfx_proj_decal_trail:CS_BuildProjDecalTrailProjectionBoxInstances` - 1 × `vfx_proj_decal_trail:CS_BuildProjDecalTrailVertexBufferFromNodes` - 1 × `vfx_proj_decal_trail:CS_DefragHeap_ComputeRelocations` - 1 × `vfx_proj_decal_trail:CS_DefragHeap_Defrag` - 1 × `vfx_proj_decal_trail:CS_RelocateProjDecalTrailAlt` - 1 × `vfx_proj_decal_trail:CS_RelocateProjDecalTrailNodesAlt` - 1 × `vfx_proj_decal_trail:CS_SpawnLiquidTrail_SampleDecalRaycastTriangleTest` - 1 × `vfx_proj_decal_trail:CS_SpawnLiquidTrail_SampleDecalRaycastTriangleTest_Nodes` - 1 × `vfx_proj_decal_trail:CS_UpdateProjDecalTrailAttachment` - 1 × `vfx_proj_decal_trail:CS_UpdateProjDecalTrailAttachment_Nodes` - 1 × `vfx_proj_decal_trail:CS_UpdateProjDecalTrailMeshIndices` - 1 × `vfx_proj_decal_vbuffer:CS_ProjDecalReduceClassification_Scalarized` - 1 × `vfx_proj_decal_vbuffer:CS_ProjDecalResolve_Vectorized` - 1 × `vfx_triangleClip:CS_CollectTriangles_Meshlets` - 1 × `vfx_triangleClip:CS_CollectTriangles` - 1 × `vfx_triangleClip:CS_DefragHeap_ComputeRelocations` - 1 × `vfx_triangleClip:CS_DefragHeap_Defrag` - 1 × `vfx_triangleClip:CS_RelocateVfxStartIndexLocationAlt` - 1 × `water_compressed_simulation_rendertarget:CS_MinMax_Float_DualPlane_Parallel` - 1 × `water_compressed_simulation_rendertarget:CS_MinMax_Float_SinglePlane_Parallel` - 1 × `water_compressed_simulation_rendertarget:CS_MinMax_Int_SinglePlane_Parallel` - 1 × `water_shading:CS_TransmissionVolumetricsSubmerged` - 1 × `water_shading:CS_TransmissionVolumetrics_Tiled_LocalLights` - 1 × `water_shading:CS_TransmissionVolumetrics_Tiled` - 1 × `water_shading:CS_TransmissionVolumetrics_VolumePortalsOnly` - 1 × `water_shading:CS_TransmissionVolumetrics` </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).
Author
Owner

@⁠mstrmoos on GitHub · 2026-12-01 09:29 UTC · original

The fold.rs half of this fails one of the shader crate's own tests, and CI hasn't caught it: the check job stops earlier, at an unrelated dead-code error in victory-loader (function unwind_copy is never used), before any test runs.

On main 5fabb46e with this PR's commit (3dd3d4de) on top, cargo test --locked -p victory-shader --lib:

test emit::folded_join_tests::a_folded_loop_header_reads_the_mask_join_on_its_back_edge ... FAILED
panicked at crates\victory-shader\src\emit\folded_join_tests.rs:169:5:
a loop header's mask join whose back edge brings a mask join only it reads
  • With only the two fold.rs lines taken back out (the half_meet_at change kept), it passes again.
  • Plain main passes it too.
  • So it comes from setting dirty/e_written at every branch leader. With that, the back edge of that loop no longer brings in a mask join that only the header reads.

I can't tell from here whether the test is pinning a shape that is now allowed to change, or whether the extra flush at every leader costs real work in loops. That might also be behind some of the 123 compute shaders that VibeCodeGuy's corpus run shows as changed. One option is to set them only at leaders that a jump reaches with a different dirty/e_written state from the fallthrough, the case the description names, rather than at all of them.

(The other failure in that crate, split_lds_wave32_read_after_read_barrier_coalescing_and_parity, already fails on main and is unrelated.)

RTX 5080, Windows 11, Rust 1.98.1. For now I've picked only the half_meet_at half into my build.

**@⁠mstrmoos** on GitHub · 2026-12-01 09:29 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/3946#issuecomment-7306784608) The `fold.rs` half of this fails one of the shader crate's own tests, and CI hasn't caught it: the `check` job stops earlier, at an unrelated dead-code error in `victory-loader` (`function unwind_copy is never used`), before any test runs. On `main` 5fabb46e with this PR's commit (3dd3d4de) on top, `cargo test --locked -p victory-shader --lib`: ``` test emit::folded_join_tests::a_folded_loop_header_reads_the_mask_join_on_its_back_edge ... FAILED panicked at crates\victory-shader\src\emit\folded_join_tests.rs:169:5: a loop header's mask join whose back edge brings a mask join only it reads ``` - With only the two `fold.rs` lines taken back out (the `half_meet_at` change kept), it passes again. - Plain `main` passes it too. - So it comes from setting `dirty`/`e_written` at every branch leader. With that, the back edge of that loop no longer brings in a mask join that only the header reads. I can't tell from here whether the test is pinning a shape that is now allowed to change, or whether the extra flush at every leader costs real work in loops. That might also be behind some of the 123 compute shaders that VibeCodeGuy's corpus run shows as changed. One option is to set them only at leaders that a jump reaches with a different `dirty`/`e_written` state from the fallthrough, the case the description names, rather than at all of them. (The other failure in that crate, `split_lds_wave32_read_after_read_barrier_coalescing_and_parity`, already fails on `main` and is unrelated.) RTX 5080, Windows 11, Rust 1.98.1. For now I've picked only the `half_meet_at` half into my build.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/3946/head:github-bot/gh-3946'
git switch 'github-bot/gh-3946'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3946'
git switch 'github-bot/gh-3946'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3946'
git switch 'github-bot/gh-3946'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3946'
git switch 'main'
git merge --squash 'github-bot/gh-3946'
git switch 'main'
git merge --ff-only 'github-bot/gh-3946'
git switch 'main'
git merge 'github-bot/gh-3946'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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