From eeb17cca7024972e5f79f5d711a3d7955ca7ad10 Mon Sep 17 00:00:00 2001 From: readmet3xt-lab <238408149+readmet3xt-lab@users.noreply.github.com> Date: Thu, 26 Nov 2026 15:46:08 +0530 Subject: [PATCH] Volumetric light on 32-lane hosts: widen its two tiled programs CS_TransmissionVolumetrics_Tiled and _Tiled_LocalLights (GTA VI 1.0.2.1) are wave64 programs in groups of 64 with an LDS read and write in one lane-branch region: no form but the widened one translates them for a 32-lane host, so on NVIDIA their dispatches were dropped and there was no volumetric light or fog. They join the two kernels the widened form is already chosen for by digest. On an RTX 4070 SUPER: the pack's untranslatable wave64 programs 26 -> 24, the opening and its first gameplay area run with the volumetric light and no device loss. Co-Authored-By: Claude Opus 5.5 --- crates/victory-shader/src/emit/mod.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crates/victory-shader/src/emit/mod.rs b/crates/victory-shader/src/emit/mod.rs index 9aeeaf5..5c191a7 100644 --- a/crates/victory-shader/src/emit/mod.rs +++ b/crates/victory-shader/src/emit/mod.rs @@ -542,11 +542,18 @@ pub fn emit( let wide_option = std::env::var_os("VICTORY_WAVE_WIDE"); // Both archived kernels use one logical wave per group and have // validated wave32 PSOs on RTX. Explicit policy wins. + // The volumetric light's two tiled programs (`CS_TransmissionVolumetrics_Tiled` + // and `_Tiled_LocalLights`, GTA VI 1.0.2.1) are of that shape too: groups of 64, + // an LDS read and write in one lane-branch region, so no other form translates + // them on 32-lane hosts and their dispatches were dropped (no volumetric light + // or fog on NVIDIA). Widened, they translate (4 and 7 branches taken wave-wide). let scene_kernel = matches!(native.io, crate::native::StageIo::Cs(cs) if cs.threads.iter().product::() == 64) && matches!( c.digest, [0x58, 0x1d, 0xab, 0x2c, 0xd8, 0xbc, 0xf2, 0x2e, 0x5c, 0x96, 0x4b, 0x98, 0xe9, 0x03, 0x48, 0xd1] | [0x24, 0x31, 0xbb, 0xe7, 0xdc, 0x15, 0x4a, 0xd7, 0x59, 0xd2, 0x0b, 0xc9, 0x54, 0x82, 0x9c, 0x1c] + | [0x24, 0x12, 0x6c, 0x14, 0xdc, 0x76, 0x19, 0xb0, 0x82, 0xef, 0x57, 0x12, 0x96, 0x03, 0x88, 0x90] + | [0x70, 0x99, 0xa5, 0x7f, 0xde, 0xd1, 0x42, 0x61, 0x3b, 0x44, 0xf4, 0x10, 0x46, 0x3d, 0x6b, 0xe6] ); let wide_on = wide_option.as_ref().map_or(scene_kernel, |v| v == "1"); // A single guest wave can iterate an active-lane loop until both host