Repository navigation
Shaders: four fixes from other forks (mesh index edge flags, cube level log2, two-sampler branch, wave64 mask copies): 42 more shaders translate - #1112
Conversation
…ve them are no part of the index) A GFX10 primitive export holds three corners of ten bits: a 9-bit vertex index and its edge flag (bits 9, 19 and 29). The index was read with all ten bits, so a corner with its edge flag set named a vertex at 512 or past it, beyond the written ones, and the primitive was culled. From Marvisak/VIctory c0228d9 by tjthebigbearcat-hub (the index mask; its tests were not carried over), as also carried by DexNom/VIctory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…print once, and its minimum level DXIL's Log (op 23) is already base 2; it was multiplied by log2(e) once more, so the level such a sample picked was 1.44 times too coarse. The console's minimum level (`_cl`) was also dropped: sampleLevel has no clamp operand, so it is applied to the level. From DexNom/VIctory 921d8d3 (the cube level hunk). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… samples with both and selects A sampler descriptor built from constants on two edges of a branch (a root constant choosing wrap or clamp) was an untracked sampler, and the program did not translate. Each immediate sampler is a static binding of its own: the image is sampled with both and the result taken from the edge the console's sampler came from. 42 more of the title's shaders translate (286 -> 244 that do not). From DexNom/VIctory ddb7332 (the translator part; its integer-target blend part is fxceless#715). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the mask again From DexNom/VIctory 76749ce ("Recover voxel visibility shader when a wave64 mask is restored from scalar copies"). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tried this on an RTX 5080 (Series X profile, not S), on top of current main plus a few open PRs. Warm cache after the first run retranslated. In the cell scene at world+400 and +800 the picture looks the same as before as far as I can see: hair, faces and walls unchanged, nothing new broken. Frame time 104 ms vs 97 ms on the run before without it, but that's inside the 10 ms or so my runs wander by, so I wouldn't read anything into it. So no visible win on S-less X profile here, no regression either. Keeping it. |
|
A Series S data point from an RTX 5070 Ti (Ryzen 7 9800X3D, Windows 11 build 26200) where the hair did not change. I cherry-picked the four commits onto our own Series S stack (an older fork main plus several open PRs, #798 among them, and some local changes). The median frame in the first gameplay scene was 74 ms, about where our runs without them sit, and I saw no visible regression. The main character's hair still renders pale blond on this card with the four commits in. Since this is the same profile as your 3090 Ti test, the hair fix may depend on something else in your tree, or on timing. On our stack her skin and hair colour already varied between runs before this PR (lit or black, dark or blond), so this is weak evidence either way. I didn't count untranslated shaders before and after. |
…compare's mask without shared slots too The fxceless#854 test a_mask_parked_in_lanes_another_scalar_shares_comes_back_whole_with_shared_slots asserted the old limit (opaque without shared slots). fxceless#1112's Lanes::move_source follows the two s_mov_b32 copies back to the pair, which is the right answer; the expectation follows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
A data point from an RTX 3060 12 GB, and one test that fails when this meets #770. Machine: RTX 3060 12 GB, Ryzen 7 5700X, 32 GB, Windows 11, Series X profile. One test fails after the merge. Both #854 and the last commit here fix assert!(!opaque(&alone), "two scalar copies of the pair are the compare's mask");It is in In the game (10 minutes, prologue cell block and corridor, 11 switches): 179 ms a frame at 5,564 draws, against 174 ms at 4,944 draws on the same tree with main Warm-up count: |
…ption for lower.rs alone) lower.rs outgrew the common 512 KiB limit with the shader fixes taken in (PRs fxceless#1112, fxceless#215), so repository_passes_policy failed and the pre-commit hook refused any commit touching it. It now has a limit of its own, as the RX 7900 XTX fork gives it; every other file keeps 512 KiB (tested).
…integer views keeps its bits, unordered views of vertex programs are declared Ported by hand from the RX 7900 XTX fork's 9a6c829 (avatarmanz/VIctory-7900XTX), without its cube part (already here from PR fxceless#1112): - VIctory da82e44: normalized codes of up to 16 bits load as the float nearest their quotient, and their ends exactly; the host's division was one ulp off for some codes, and a material index truncated back from one was the code below. Tests on hardware and WARP: every 8- and 10-bit code, sampled 16-bit ones, and codes truncated back to themselves. - VIctory 4243a96: the table of strides marks typed buffer views of integer formats (VIEW_INTEGER, VIEW_SIGNED beside the stride, masked out with VIEW_STRIDE_BITS); their d16 accesses pass 16-bit integers, not halves (the face network keeps its halves in UINT views). - VIctory a1a2077: unordered views outside pixel and compute programs set the shader flag and feature bit DXC sets.
|
Thanks for the three reports.
AI-assisted (Claude Code, Claude Fable 5.2). |
…e), 4 KiB dirty tracking, gather segments, the black-face texture fixes, shadow and translator fixes from pull requests Measured in in-run on/off splits on an RTX 4070 (diagnostics builds, the same switches for every run): - VICTORY_CARD_HASH_WIDE=1|alt: the card's hashes of copies' pieces by a group of 64 threads a piece, alternating per submission: card -10 ms a frame (86.5 vs 96.5), world frames -5 ms. - VICTORY_GATHER_SEGMENTS=1|alt (after flipflop877 c69bff1): one clamp pass per segment once a list stops gathering: ~30 records a pass, neutral to slightly faster at equal draws. - VICTORY_DIRTY_4K=1|alt: refreshes copy only the written 4 KiB pages of a stale write-watched page: -45 % of those bytes; faster in loading, no world gain. Fixes: - Textures under a DirectStorage write or a landed plain read are made due again (VICTORY_PAGE_WRITES default 1|2|8): textures uploaded before their data landed kept zeros (black faces); VICTORY_HEAP_RECHECK_EVERY=<frames> keeps looking at uploaded textures after the schedule (after RyanCase94). - Pull requests #646 (builder dispatches count threads), #1002 (alpha-tested geometry casts cascade shadows), #1314, #1324, #589, #702, #1112 (mesh triangle corners masked 9 bits, cube-map levels, two-sampler branches, split 64-lane masks); upstream #3198 (textures without card room retried). - VICTORY_WAVE_WIDE_ONLY=<hashes>: listed refused programs may take the wave-wide form (after #823's a416e39; the water's colour, with dark patches still under investigation). - VICTORY_MERGE_RUNS_ALT, VICTORY_CLAMP_LEAN, VICTORY_CLAMP_WINDOW, VICTORY_OCCLUSION: measured, no gain; off. The shader translator changed: delete both shader caches before the first run.
… part 2) 9613092 alone does not build (its second deep-skips form call lacks the label 93db653 adds), so the fifth merge goes on to e4245f3, the commit it was meant to bring; nothing after it (fxceless#1320, fxceless#1321, fxceless#1353, fxceless#1336, fxceless#1324 of 13:05 are left for later). - 93db653: build fix for 9613092 (VICTORY_WAVE_WHY form label). - e4245f3: VICTORY_CARD_HASH_WIDE=alt (1 was already there; default still a thread a piece), VICTORY_GATHER_SEGMENTS and VICTORY_GATHER_DISPATCHES (off), VICTORY_DIRTY_4K (off), VICTORY_MERGE_RUNS_ALT (unset), VICTORY_HEAP_RECHECK_EVERY (0), VICTORY_WAVE_WIDE_ONLY (empty); VICTORY_PAGE_WRITES default now guards+slots+plain reads' textures (1|2|8; "guards" is the old one); host callbacks check due textures first; textures without card room asked again (upstream VIctory #3198); a released view heap forgets its title-memory run (fxceless#589); shader fixes: mesh corners masked 9 bits, two immediate samplers behind a uniform branch, sampleLevel log2 and _cl clamp, split wave64 mask moves (fxceless#1112, fxceless#702). Conflicts, our structure kept: HostList hunks moved to host/host_list.rs; image hunks to emit/image_buffer.rs; copy_stale takes both COLD_SKIP marks and DIRTY_4K pieces; Journal keeps cold_skip::Written plus the 4K map; translate_listed wraps translate_counted; MERGE_RUNS_ALT before our card_steps split. Duplicates kept once (ours): fxceless#1324 (HEAP_IDENTITY), fxceless#1002 (SHADER_CASCADE_EXACT), and fxceless#646: upstream's DispatchX thread counts (USER_DISPATCH_THREADS, same code 0x106) dropped for our port of fxceless#1292 (USER_THREAD_LIMIT, which also covers the paired 64-lane form). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ure fixes), cascade shadows, render-target snapshots, and switches for rays, memory and input Twenty-two commits, tested as fe2ede8 (cargo check of the workspace with diagnostics clean; victory-gpu --lib 356 passed, 0 failed) and built by Codex as fe2ede8-diagnostics. On by default, each with a way back: - the original's fifth merge up to e4245f3 with 93db653: VICTORY_PAGE_WRITES now also sends back to pending the textures written by slots and by plain reads (1|2|8; =guards is the default of before), textures without room on the card are asked for again (VIctory #3198), a released view heap forgets its run of title memory (fxceless#589), shader fixes (fxceless#1112, fxceless#702, mesh corners, samplers behind a uniform branch, sampleLevel); - fxceless#1002: exact cascade shadows on cards of 32 lanes (VICTORY_SHADER_CASCADE_EXACT=0 goes back); - fxceless#1371: render targets replayed from a copy taken at SetRenderTargets (VICTORY_RT_SNAPSHOT=0 goes back). Off by default: VICTORY_RT_SKIN_SKIP, VICTORY_RT_RESOLVE_SKIP, VICTORY_ACTIVATE_RAYS_SKIP, VICTORY_HAIR_VB_SKIP (with a census of such programs), VICTORY_ALT_FLIP (fxceless#1341), VICTORY_RAM_TRIM, VICTORY_WINDOW_REUSE (fxceless#1362), VICTORY_COLD_SKIP (fxceless#1358), the worker chain of fxceless#1290, VICTORY_KEYS_FILE, VICTORY_NULL_SAMPLES, and the merge's CARD_HASH_WIDE=alt, GATHER_SEGMENTS, GATHER_DISPATCHES, DIRTY_4K, MERGE_RUNS_ALT, HEAP_RECHECK_EVERY and WAVE_WIDE_ONLY. The profiler test walks only modules that never unload. Left out: diagnostics/translate-water-5dc3-6f22-2026-11-26.txt, a translation diagnostic of the original's run that lists offsets and instructions of two of the title's shaders. Measured by Codex on fe2ede8, the ten switches of Status, screenshots every second, one pair of sessions of 480 s, the same binary: in the opening's cafeteria two faces were drawn with their features with the new default, and one of them came out without features and the background washed out with VICTORY_PAGE_WRITES=guards, at different moments and poses; in the reverse pair a face came out almost all black with the new default (the guards session was stopped by the memory guard at 391 s), so these fixes are not the whole answer to black faces. Not measured for frame rate yet. Neither session crashed; frames of a second or more between 150 and 450 s: 49 (longest 5.7 s) with guards, 52 (6.8 s) with the default. A first session with a cold shader cache was ended at 388 s by the title itself after a frame of 21.5 s spent waiting for the runtime's remapping. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Four small translator fixes from other forks, brought onto main. Each is its own commit with the original author. All four are vendor-neutral.
exp primcorner is a 9-bit vertex index plus an edge flag above it (bits 9, 19, 29). We read 10 bits, so a corner with its edge flag set named a vertex ≥ 512. That's past the written ones, so the triangle was culled._clLog(op 23) is already base 2, and we multiplied by log2(e) again, so the level was 1.44× too coarse. The console's minimum level was also dropped:sampleLevelhas no clamp, so it's now applied to the level.I left out the integer-target blend part of ddb7332 (that's #715) and the tests of c0228d9.
Tested on an RTX 3090 Ti,
--console series-s. The tree wasd510ee4plus this branch, plus #798 and #1081 so the S profile renders the world. Warm cache, from boot into the prologue cell:cargo test -p victory-shader: 217 passed.Correction (same day): I first wrote here that Lucia's hair went from pale orange-blond to dark brown with this PR. That was wrong. Over 17 runs the hair colour follows something else:
So some pass that normally runs is skipped in those first runs and changes the hair. I'm looking for which one; it has nothing to do with this PR. The count of shaders that translate (286 → 244 that do not) is from the warm-up itself and stands.
AI-assisted (Claude Code; opened with Claude Opus 5.5, corrected with Claude Fable 5.2); runs and grabs on my machine; no game data.