Upstream: 10 fixes taken from upstream's rewrite commits (stacked on #716) #767
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/fxceless--victory-fork!767
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-767"
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?
@coderanonymus on GitHub · 2026-11-25 06:52 UTC · original
coderanonymus:upstream-pieces→main· +16903 −1499 · 107 files · 160 commits · openStacked on #716, which is stacked on #653. This PR's own commits are the 11 after #716.
Rebased on main (
a26859f)Rebased with #653 and #716 onto
a26859f. The owner's two newest commits already do two of the pieces, so they're dropped here, together with the three commits that only supported them:a26859f, from #305);8dd30ab).A read-only review checked every remaining commit against the owner's two commits for duplicates and clashes, and found none. Heap constant buffers as raw views now meet the owner's byte-copy sync: every CBV record the sync mirrors becomes a buffer slot that
heap_buffersmakes and refreshes. Before, it was nulled. That's more correct, at a cost not yet measured.Clippy passes with and without
--all-featureson a clean build, Linux tests (274) pass, and so does the asset policy.Why
Upstream's maintainer landed large commits that re-implement parts of this fork's own work in upstream's way: title memory through a page table, FidelityFX, view copies, the shader pack. They can't be merged here. A read-only triage of each one still found specific fixes inside them that the fork lacks. This PR takes those pieces, each rewritten for the fork's design.
What
Each commit says which upstream commit it is "ported in part" from, keeps the upstream author, and has a Port notes paragraph.
Shaders
image_sample_d/_d_clon a cube):_clread its clamp but never applied it.s_min/s_maxnow set SCC from their compare (RDNA2: whether the first operand was chosen), not fromresult != 0.v_cmp_f/v_cmp_trulower to constants.v_movrel*) reach only what a proven upper bound on M0 allows (upstream'srange.rs). Programs that keep descriptor dwords or masks above a small indexed array are no longer refused.s_notof a ballot) is computed from its scalar op, not refused.image_gather4_lthrough a clamp-to-black-border sampler: a texel outside the view reads 0, as on the console. The fork clamped it to the edge texel, so meshlets at the screen edge culled against the wrong depth.GPU
Mine, from the stack's review
s_min/s_maxSCC andv_cmp_f/v_cmp_tru. Their checks now run.Left out
Two pieces were rejected after their repair round, and I didn't take them:
d71c388(a computed heap index landing on a texture slot). The port also sent constant buffer slots to a null view, so reads that work today would return zeros.a7fc47a. The code holds up, but it claimed a refusal it doesn't give. Getting this one right needs more work than one round.How it was made and reviewed
Ultracode workflow:
SHADER_HEAPSlock. The lock review found that the heap sync takesSHADER_HEAPSundersubmitted, then leaf locks only, so the order stays acyclic with #668. The two branches merge cleanly.Verification
Checked in a dedicated worktree with fresh target directories:
cargo clippy --workspace --all-targets --locked -- -D warnings, and the same with--all-features, forx86_64-pc-windows-msvc: clean.emit/lower.rsis under its 512 KiB). formats, core, pipeline and game pass.No game data used; the game isn't named in the tree.
🤖 Generated with Claude Code
`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 commit 01ae55a3ba04c39a0e8851cc00da16af7a49adbd)..in the not-yet-existing part of a path ad40d81e34The device-removed report matched a breadcrumb node to a submitted list by comparing `as_raw()` of the list with the node's `pCommandList`. On an RTX 4070 no node ever matched, even without the debug layer: every list was reported as `None`. With device-removed data on, each host list is now named ("victory host list <n>") when it is made, and a node is also matched by the name the runtime copied (`pCommandListDebugNameW`). The pointer is still compared first, against every interface pointer our live list answers with (its own, IUnknown, ID3D12Object, ID3D12DeviceChild, ID3D12CommandList). The node's pointer is only compared, never dereferenced: a node may name a list that is long released. With the debug layer on (`VICTORY_D3D12_DEBUG=1`) the nodes still do not match; that case is left open. Port notes: the fork's make_list keeps its lazy prelude (the list's prelude is made on first need), so only the id and the name are added after it; the new helpers sit after the fork's Chunk type, next to its Scratch, and the tests join the fork's host tests. The report's two pointer comparisons are the same code on the fork and are replaced as upstream does. (cherry picked from commit 65269650fca8b6c93e089374f3e4db677446ce5d) Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <[email protected]>A run on an RTX 4070 with the debug layer on showed why a list's name did not match a node: the runtime appends its own note to the name we gave, as in "victory host list 158 (debug layer indirect)". The name now matches exactly or followed by " (", and never as the start of another number ("victory host list 1580"). Both name fields of the node are read, as before. That makes the sentinel list and the matching by position of the previous commit unnecessary, so they are removed, together with the extra private data keys it set: lists are named with SetName again. The warning that logs the last node's pointer and names when no node matches a list stays. Tests: the name with the note matches in the wide and the ANSI field, a longer number and a name without the " (" do not; with the match for the exact name disabled or loosened to a prefix, the tests fail. Port notes: the sentinel list, the matching by position and the private data keys this commit removes upstream were never ported to the fork (see the port of 8a358e3), so only the match of the name followed by " (" and its tests are added. One assert of the new test is wrapped as rustfmt would. The fork's code now has the same additions and removals as upstream's three commits together. Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <[email protected]>s_min_{i32,u32} and s_max_{i32,u32} left no SCC of their own, so SCC fell to the generic `result != 0`. The RDNA2 ISA sets SCC to whether the first operand was chosen (the compare the select uses), so an s_cselect or s_cbranch_scc* after one went the wrong way, e.g. s_min_u32 0, 1 gave SCC 0 instead of 1. The compare now becomes the SCC. v_cmp_f_{f32,f16} and v_cmp_tru_{f32,f16} lowered to `fcmp false` and `fcmp true`, which remove the WARP device. They now give the constant false or true lane mask, as the integer v_cmp_f/v_cmp_t already do. (ported in part from upstream commit77053a0) Port notes: only these two items of77053a0; its discard-as-helper lowering, f16 rounding and MODE tracking, denormal flushes, med3/omod/ cndmask/cvt_flr/rpi changes and the host FMA probe are left out. The fork's float compare drops the FALSE/TRUE match arms that upstream keeps (they cannot be reached), and pred::FALSE is marked as not emitted, like ONE. Upstream's tests run on a GPU; the new lowering tests run natively: constant operands let the module clean-up fold the select, so a wave read on the side not taken leaves no wave operation in SFI0 (on the old lowering every case keeps it). Co-Authored-By: Claude Opus 5.5 <[email protected]>ir::build named every VGPR from a v_movrel*/v_swaprel_b32's encoded register up to the program's VGPR count as read (and written, for an indexed destination), whatever M0 can be. The lowering selects over all of them, so a shader that indexes a small register array through M0 and keeps descriptor words or lane masks in higher VGPRs was refused ("a descriptor's address or format read as data"), and its draw or dispatch dropped. An unbounded v_movreld also redefines every higher VGPR, which costs phis and select chains, and makes those VGPRs ordinary ones for unspill, so scalars parked there were not recovered. The new range module proves an upper bound on M0 at each relative move on the per-lane form: constants, s_mov/v_mov, an unguarded v_readfirstlane, unsigned min/and/max/med3, adds that cannot wrap, and phis whose incoming values are bounded on their edge, including by an unsigned v_cmp/s_cmp the edge's lanes passed (loop counters). It finds the bounds as an induction (assume each move reaches only its first register, widen until the assumption implies itself), then builds the IR again with ir::build_bounded, so each move names base..base+bound. Anything unproven keeps the full range. Bools::decides gives the value an atom has in every lane meeting an edge's facts. (ported in part from upstream commite0034c2) Port notes: range::build returns the program only. It is called from spill::build, the fork's one production entry (emit::translate and the app's translate tally both go through it), before user_data rewrites the spilled table loads; the callers structure the result as before, so neither changes. Upstream's check that the unbounded program structures is left out: the proof does not depend on it, and it would cost every program a structurisation. The bound also reaches the fork's unspill (both effects() calls in build_bounded); unspill's decisions are part of the assumed IR, so the induction covers them. ir::operand_reads (io.rs, own_bits.rs) keeps only registers the instruction reads, so it does not widen a bounded move again. Compares with neg/abs modifiers are not taken as bounds. lower_wave in emit/lower/tests.rs now builds through spill::build. The new lowering test, relative_moves_reach_only_what_their_clamped_index_can, adapts upstream's GPU test (v8-v11 indexed, descriptor words in v12-v15) and is refused without this change; upstream's three range unit tests come along. The GPU test and the valu_tests harness change are not ported. Co-Authored-By: Claude Opus 5.5 <[email protected]>@chatgpt-codex-connector[bot] on GitHub · 2026-11-25 06:52 UTC · original
Codex Review Summary: ❌ Failed
This comment shows the latest Codex review activity on this pull request.
We couldn’t complete this review. Comment
@codex reviewto try again.c15c1d4ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
@chatgpt-codex-connector[bot] on GitHub · 2026-11-25 06:52 UTC · original
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.