Build: AVX2 codegen and fat LTO for the CPU-bound layer #649
No reviewers
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/Belobug--VIctory-Belobug-AMD!649
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-649"
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?
@StarSparkleNova on GitHub · 2026-11-27 16:26 UTC · original
StarSparkleNova:perf/frame-time-pass→main· +14 −2 · 2 files · 1 commits · openRebased onto current main (the original branch was based on a commit no longer in main's history, so it showed the whole repo changed; now 2 files).
Build-only, no behaviour change:
Compile-verified on x86_64-pc-windows-gnu (default + --features diagnostics). Not runtime-tested (no Windows/RX 7900 hardware).
A descriptor held in VGPRs is used through a waterfall loop: each pass reads the first active lane's dwords with v_readfirstlane_b32, compares them with every lane's own (v_cmp_eq), runs the access with the lanes that match and repeats for the rest. Tracing stopped at the readfirstlane results ("a descriptor neither loaded nor built"). The tracer now follows the read lanes' dwords to where each lane gets its own: global_load_dword* from a table or heap at a per-lane address (an image descriptor's two x4 loads lined up), or a v_cndmask_b32 choice per lane between such sources (e.g. two s_load descriptors). Other sources fail naming them (LDS read, buffer load, phi, input, computed VGPRs). The loop's compares of those reads with their own dwords are recorded. Lowering gives the access each lane's heap index (its load address over the descriptor size, or a per-lane select of indices) with createHandleFromHeap's nonUniformIndex set, lowers the recorded readfirstlanes as the lane's own dword and their compares as true, so the loop runs once with all lanes. Wave32 and wave64 are tested. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm6642361b0) into shader/per-lane-phi a7e60cfac08e79c80) into shader/per-lane-phi e09dbb6daeffe310e) 578d459c34a803c87fa967c0340c96b4f27913a98a3d310c6ebe5f735d6aee1702e2(landing on threads, card steps 2) into local/copies ee188c1df0d4772b3d4254dc02ca79e248) into local/tests 338f42479ea79e248) into local/copies; a test of the bits against remapping 535a3835b174045e4' into local/upcopies cb72fc0a17e6f492d) into local/tests cd37859b39e6f492d) into local/tests 9713df6eccc651346' into local/upcopies 4f6bd62362572bd4c' into local/upcopies 47ae1737c28dd30ab: writes through one view of a page are seen at its other views 49c44f61d38dd30ab(every view of a page is guarded) ab71750898a26859f(the first room renders right) 925736dbd0`victory run GTA6.exe`, run from the game folder, gives an exe path with an empty parent, and that empty folder was mounted as G:. An empty path cannot be made absolute, so the root stayed empty and G:\x64\a.rpf became \x64\a.rpf: the root of the current drive. The title then found none of its files. An empty root is now the current directory, which is what an empty folder means everywhere else (`Path::new("").join("x")` is `x` in the current directory). Passing a path with a folder in it is unaffected. (cherry picked from commit01ae55a3ba)..in the not-yet-existing part of a path bb0a2428fcb69eab84) into night/cpu 2c79c5b7fef61ecf3b) into night/cpu 19be44dd6ff61ecf3b' into night/light be085e538518e57db8a98966866cdd799aad, romainhedouin); VICTORY_DECLARE_ONCE=0 for the old way b32fb9975d92d353f8, romainhedouin) ab86ef7f3f84ea9c12, romainhedouin) c96525dbb2449830f6' into local/next 57e55d069apLastBreadcrumbValue is the count of completed breadcrumbs, so history[done] is the first op that had not completed. The old "stopped at command {done} of {count} (op X)" read like one-based numbering and was mistaken for the last completed command (issue #22). Say the count, the last completed op and the zero-based index of the first uncompleted one explicitly, and skip the detail when the reported count is out of range. Refs #22DXIL wants one interpolation mode per signature row; the console packs a nointerpolation float beside an int or a system value (the front face) in one row, and our signatures declared the float linear: 48 pixel and mesh programs were rejected by the validator ("interpolation mode that differs from another element packed into the same row"). Float elements nothing decides (unread inputs, outputs) now take the mode the row's other elements agree on: same_mode_per_row from VIctory 13091f6e, ported by hand (the whole commit conflicts in 18 places with what local/next already took of it). All 48 now validate. Co-Authored-By: Claude Opus 5.5 <[email protected]>image_get_lod of a 2D array passed the slice as CalculateLOD's third coordinate, which DXIL wants undefined: three pixel programs (PS_DeferredTextured_AlphaClip, PS_MirrorReflectionDeferredTextured_ AlphaClip, PS_VfxVBuffer_AlphaClip) were refused by the validator ("out of bound coord must be undef"). The level does not depend on the slice, so the result is unchanged where a driver took the module. Co-Authored-By: Claude Opus 5.5 <[email protected]>Run port1-1: the title maps the five pieces of its 185 MB heap in another order than their addresses, so the heap was views of one section in a scattered order ("not one stretch of a section: Scattered") and nothing was placed. With VICTORY_PORT_CONSTANTS=1 xmem now gives the page numbers mapped into a 32-bit graphics reservation the slices at their offset in it, when the reservation is all one section and both slices are fresh (never mapped or written: no commit bit), which the title cannot observe. Co-Authored-By: Claude Opus 5.5 <[email protected]>CS_TraceShadowRays_FullAdaptive reuses SGPRs between saved lane masks and constant-buffer fields: a join of a mask and a number (lowered as the number it is) is cut with s_and_b32 / s_or_b32, which structurisation takes for lane masks, and the result is compared per lane as a number. Its ballot holds lanes outside EXEC, so the program was refused ("a lane mask holding lanes elsewhere read as data"). Such a read now takes the number the bit operations compute from their operands (constants, root constants, values lowered as numbers, such operations again; console lanes only, where the joined mask is the console's number). Only on a second try, as first halves of interpolations: with it on for every program, 69 compute programs that already translated came out changed (CS_RaytracingResolve, ...); now none does. `victory translate` makes the same second tries as runs (emit_with_retries). FullAdaptive now translates and validates. The test runs the joined register through both paths on the hardware device (WARP takes no declared wave size); it found that a join read only through such operations must be marked read, or its mask's edge brought 0. Co-Authored-By: Claude Opus 5.5 <[email protected]>Heaps are made without sharing across adapters, so the resources placed in them cannot ask for it: the buffers renderer port 1 places in the heap opened from the title's graphics memory (and every other heap opened from memory) were refused ("parameter incorrect", 1,326 to 3,576 a capture). With `--timing detailed`, a list that runs no shader but ours (the host's state preludes, copies of what the CPU sent up, the card copies' passes) has its commands summed under "... (lists of ours)". Co-Authored-By: Claude Opus 5.5 <[email protected]>c9c932ce9428969f0Frame-time pass: fast set_targets, skip-pipelines in release, AVX2/fat-LTOto Build: AVX2 codegen and fat LTO for the CPU-bound layerb675791f35toc16b9eb73cc16b9eb73cto83127786f5View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.