Repository navigation
Conversation
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour 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. |
RecompLive
pushed a commit
to RecompLive/victory-fork
that referenced
this pull request
Nov 25, 2026
Shaders: a signed 64-bit operand sign-extends its 32-bit literal
oceansde012
pushed a commit
to oceansde012/victory-gta6
that referenced
this pull request
Nov 25, 2026
Shaders: a signed 64-bit operand sign-extends its 32-bit literal (cherry picked from commit 1134418)
PiloteCode
added a commit
to PiloteCode/victory-fork
that referenced
this pull request
Nov 25, 2026
…witch, its lowerings of instructions the title does not run, and 16-bit results by MODE Ported from Marvisak/VIctory into emit/official.rs, a child module of the lowering; lower.rs and the instruction modules (valu, valu16, salu, buffer, interp, image, export) only call it (lower.rs: 129 bytes more, for the module and the round-mode state). On by default, `VICTORY_<NAME>=0` gives the translation as before (each is part of the shader cache key): - VICTORY_MESH_EDGE_FLAGS (#1718, c0228d9): a mesh primitive's corners are 9-bit indices, the edge flag above each (bits 9, 19, 29) no part of it. Ours took 10 bits, so a flagged corner named vertex 512+ and the triangle was culled as naming a vertex past the program's count. Every mesh program's DXIL (the mask constant). - VICTORY_NORM_ENDS (fxceless#169, 645391b): a normalized buffer format's ends load as exactly 1.0 and -1.0 whatever the host's division gives there (vertex fetch, typed-format loads of compute programs): 9,764 programs. - VICTORY_CUBE_GRAD_LEVEL (4f57f46; the same fix as 9ee9adf of fxceless#767, flagged by amdsh): a cube sample with gradients takes log2 of the longer gradient in texels (DXIL's Log is base 2, ours multiplied it by log2(e) again: 1.44 times the level, blurrier cube reads), at least the _cl clamp: 29 pixel programs. - VICTORY_SMINMAX_SCC (77053a0's scalar part): s_min/s_max set SCC to whether the first operand was chosen (RDNA2 ISA); ours set result != 0. - VICTORY_INTERP_F16_MODIFIERS (#1696, e29391f): v_interp_p2_f16 honours op_sel[3] (the high half), omod and clamp; only an instruction that has one of them translates differently (the title's have none). - VICTORY_DEAD_PHI_LATCHES (#1471, be3202d): an empty loop latch whose phis are all unread folds as an empty one does. - VICTORY_BRANCH_FALLTHROUGH (#1282, 1ed26e5): a conditional branch to the next instruction is a jump. As a branch it gave its block the same successor twice, and the join's phi the wrong value (the official test fails on ours without it, on WARP). Off by default: - VICTORY_OMOD_ZERO=1 (77053a0): an output multiplier reads a denormal operand as a zero of its sign and gives +0 for a zero product, as RDNA2 measured with IEEE mode off. Compilers fold every x2, x4, x0.5 into one: 12,276 programs would gain its eight instructions, for the sign of a zero. - 16-bit results by MODE (77053a0), under our VICTORY_F16_NEAREST=1: every f32 to f16 result of a VALU operation (v_cvt_f16_f32, v_fma_mixlo/hi_f16, packed and scalar f16 arithmetic, f16 interpolation) rounds as the console's MODE says where it is: toward zero after `s_setreg_imm32_b32 hwreg(HW_REG_MODE, 2, 2), 3` (the title writes it 6,694 times, around its 16-bit interpolation), to nearest even elsewhere; the switch covered 16-bit arithmetic only, at nearest even everywhere. Without switches (no program of the title runs them): s_quadmask_b32/b64 (#1443), v_cvt_off_f32_i4 (#1391), v_sad_u8/hi_u8/u16/u32 and v_msad_u8 (fxceless#162), v_mul_hi_u32_u24/i32_i24 (fxceless#156), tbuffer_load_format_d16_* packed two channels a VGPR (fxceless#169, c430b1d), a signed 64-bit operand's literal sign-extended (fxceless#447, 7d04943), v_cndmask_b32 on an inline constant mask or a mask the structurisation keeps among its other masks (#1221, 67c4f53; Structured::other exported), and v_cmp_f/tru as constants (`fcmp false/true` removed the WARP device; 77053a0). format_load and write_half became pub(super), for official.rs. Tests: the official ones of these (valu_tests on the hardware adapter and WARP: quad masks, cvt_off, tbuffer d16, normalized ends, i64 literals, branch to fallthrough), its instruction tests fxceless#1052, fxceless#1050 and fxceless#990 (they pass on ours unchanged), CPU models of the SAD, 24-bit high multiply and s_min/s_max SCC results, and the MODE rounding under VICTORY_F16_NEAREST. Census (CPU, against wave5's own): with every switch off, every program's DXIL is byte for byte as before; with the defaults, 10,711 programs change (Ms 8,765, Cs 1,077, Vs 840, Ps 29) and none is lost or gained (25,953 of 25,953 pass either way).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cached()currently propagatesCache::get_or_converterrors even when translation succeeded and only publishing the optional cache entry failed. This can discard usable shaders.Change
Retain the conversion result for the current request. Return successful in-memory translations even when writing or renaming the cache entry fails; do not retry a genuine translation failure. Cache hits and damaged-entry recovery remain unchanged. No cache key, format or shader semantics change.
Validation
Added two focused Rust regression tests for a blocked cache publication and a translator failure, each asserting one translation call. Native Rust/Windows and game tests have not been run. No measured performance or rendering claim. Based on a803c87. AI-assisted (ChatGPT).