light patch #633
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#633
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@joyawth on GitHub · 2026-11-25 03:30 UTC · original
TITLE
World scene renders and is lit with a small lower.rs patch (RTX 4060, 8 GB); remaining: 2 untranslated compute shaders, 7 refused host pipelines, texture residency stall
BODY
Setup
Windows 11 x64, RTX 4060 (8 GB VRAM),
victory at
c96b4f2(depth bounds commit) + the patch belowTitle exe: game_scarlett_master.exe (Bink2Scarlett.dll, .rpf archives)
Run:
victory.exe run game_scarlett_master.exe --execute(release build)Summary
After pulling
c96b4f2the character and walls are no longer transparent. With the small patch below, 4 more pixel shaders translate and the opening world scene is lit (sun, haze, backlit character); before it was almost black and the host GPU was removed at the first world frame. Screenshots attached.Four pixel shaders failed with
a descriptor read only as data is not supported: e5b2121a02f4f741, 7d0f14ce44746d7e, 2fd01fca16993001, 6b6db9f1a526daeb.Disassembly of e5b2121a02f4f741: at 0x1c14 the shader does
s_load_dwordx8 s[20:27](an image descriptor picked with a dynamic index, param 288 + dynamic offset) and never samples it. It only decodes size fields by hand (width = dw1[30:31] | dw2[0:13]<<2, +1; height = dw2[14:27], +1; base level = dw3[12:15]), converts to float,v_rcp,* 264.0: a manual texture size query used to scale UVs. The samples (image_sample_lat 0x1c94) use other loads with other indices.In
descriptor_data(lower.rs, ~line 5600) there is no instruction using this load as an image and no twin load, souse_atis None and it returns "a descriptor read only as data". ThegetDimensionsreconstruction below it would work if a kind could be inferred. The patch (attached, ~15 lines):in the
use_atNone branch, after the existing special cases: ifcount == 8, setsize_only = trueand continue with(site, 0)instead of theErr;in the
match &ui.fieldsthat picks(props, image), add a first arm:_ if size_only => ((4 | u, 0x409), Some(4)).Caveat: it assumes a 2D texture; a slot that is not a 2D view would get wrong sizes. The patch was written with Claude's help from the disassembly and tested only on my PC (RTX 4060); it builds and runs fine there, but I have not checked other slots or GPUs.
Result (14 min run): untranslated shaders 6 -> 2, no device removed (before: removed at about 2.5 min at the first world frame with 2222 draws and a 2.4 s submission), 4837 draws/frame in the scene with ~368 dropped without a host pipeline, about 2 fps (frames dominated by ~1 s of "preparing": 140-300 MB of copies and 50-100 MB copied back per frame; the GPU is busy 20-300 ms).
Untranslated compute shaders:
ceb5eb68cd99cb07 (1.4 KB): a min-reduction downsample (4 image_load per thread, LDS min tree, one image_store), looks like a depth-pyramid pass. Fails at 0x38 ("a descriptor's address or format read as data"):
s_load_dwordx4 s[0:3]from a table entry then used as data ats_cmp_eq_u32 s2, 0.f133e35efed2a48a (169 KB, many SRVs and samplers): fails at 0x1eb4 (
s_and_b64 vcc, exec, s[40:41]+s_cbranch_vccz, an any() over a lane mask while exec is partial) after every WAVE64-RETRY form (early-outs, skips, local waves) is exhausted.Host pipelines refused by D3D12 (
Paramètre incorrect. (0x80070057)), almost certainlyWaveSize(64)on a 32-lane NVIDIA GPU (lower.rs: "A host whose waves are at most 32 lanes (NVIDIA) refuses WaveSize(64)"):compute: 2da4beb386509b77, 369cbe906ea72764, 2cc4c197ee29e291, 02384a60fda6f2d0, 5dc3b25986622949, 6f225b641c5b0708
mesh f5e50eb2108c425b with pixel ce3f0432a08f1d35
VICTORY_WAVE_WIDE=1changes nothing on this GPU (same refusals).Over the 14 min run: 23739 textures uploaded (6351 MB), about 14000 waiting, and the counter stops moving ("textures picked by index: the card has no room for more; they wait"). On an 8 GB card some textures (for example the back of the character's jacket) stay at low quality. I understand
room()stops at 90% of the system's budget on purpose.Other warnings seen
a pipeline creation method that is not implemented: the title goes without this pipeline(29 times)a texture picked by index changed after its upload with nothing to tell of it: uploaded again(252 times)host view heap capped at N; views past it read a null slota shader takes the address of a buffer view that is not there: it reads 0a dispatch without a host pipeline droppedI can run the diagnostics build and test patches if useful. I did not include any game files here, only hashes, offsets and instruction names.
size_only_texture.patch
@ArturoWolff on GitHub · 2026-11-25 04:31 UTC · original
The attached patch says the size-only lookup assumes a 2D texture, but it emits a 3D texture handle. I checked this independently of the screenshot: on
310c6ebI applied your attachment, lowered the syntheticWATERFALL_SIZE_ONLY_WAVE32input from #81 on Linux, and disassembled the emitted DXIL with Microsoftdxc -dumpbin. The handle passed togetDimensionswas annotatedTexture3D<4xF32>(kind 4). Changing just((4 | u, 0x409), Some(4))to((2 | u, 0x409), Some(2))in thesize_onlyarm and repeating the same test yieldedTexture2D<4xF32>(kind 2).PR #81 already takes the 2D approach on a narrower fallback: it excludes known non-SRV ranges. I'd compare against that rather than stack both patches. This verifies the emitted type, not the actual type of every title slot or what lit the room. If you rerun the visual A/B, keeping the save and other switches fixed and ensuring each variant rebuilds those shader entries would make it much easier to interpret.
AI disclosure: Hermes Agent ran the synthetic shader comparison and wrote this comment on ArturoWolff’s behalf.