Repository navigation
[BUNDLE] World-run stack from Impre-visible's report: 12 PRs (#1077 #1175 #523 #530 #1040 #1406 #1392 #1407 #1516 #1388 #1189 #542), stacked on #1511 - #1632
Conversation
Since the world bring-up, main no longer builds on Linux: victory-gpu names host_resource outside its cfg(windows), and victory-hle reaches Windows-only modules (xmem, files, lifecycle, the text entry dialog). This gates those uses only, as the smallest base for a native Linux runtime: - view_format and the D3D12 allocator hookup are Windows-only, like what they call. - XLaunchNewGame ends the title only on Windows; the text entry dialog answers "dismissed" elsewhere. - translate --validate / --pipelines refuse to start off Windows (no host DXIL validator or D3D12 there); translation itself runs. - Tests that parse the test binary as a PE image, or use Windows title paths, are ignored off Windows with the reason. Tested: Linux (CachyOS, rustc 1.98.1): cargo test --workspace passes (162 passed, 13 ignored). cargo check --target x86_64-pc-windows-msvc --all-targets gives the same diagnostics as before (none). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Pixel programs that use the I/J VGPRs as plain values (custom interpolation, math on the weights) failed with "barycentrics read directly". They are now channels y and z of an SV_Barycentrics input (SM 6.1+, the emitter targets 6.6) declared with the interpolation mode of their kind (perspective/linear, center/centroid/sample), one element per mode (semantic index 0 and 1), with the Barycentrics shader flag and SFI0 feature. GFX10 interpolates P0 + i (P1 - P0) + j (P2 - P0) with P0 the provoking vertex, which the host's barycentrics weight as vertex 0, so i = y and j = z. The VGPRs are loaded on first use as a value, so programs that only feed them to v_interp_* declare nothing new. A console signature's own SV_Barycentrics row (D3D name 23) is parsed and reused. Pull-model barycentrics stay unsupported. SV_Barycentrics is left unpacked (no row, packing location -1), like other non-packed system values: the DXIL validator refuses it in a row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
v_interp_p1/p2 (and the f16 forms) fed with an i or j that is not the loaded input VGPR now evaluate each half as the hardware does: P0 + i (P1 - P0) for the first, the old dst + j (P2 - P0) for the second, with the vertex values read by attributeAtVertex. That needs the element declared constant, so every other interpolation of the same attribute row is weighed from its vertices with SV_Barycentrics of its mode, and flat reads stay loadInput of the provoking vertex. v_interp_mov of P10 and P20 reads P1 - P0 and P2 - P0 the same way when the program also interpolates the attribute (so the hardware holds the deltas); alone it is still refused. The translate command's tally counts Interp::Weighted as interpolated. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
…us, and COM/DLL handle leaks
`VICTORY_SHOW_TARGET=<w>x<h>-f<format>` (e.g. `2560x1440-f28`) shows the last render target of that size and DXGI format each frame instead of the title's frame: it is copied 1:1 to the top left of the back buffer, and only when its format is the window's. Draws and dispatches still run as before; only what reaches the window changes. With the world's lit image black, this shows what its earlier passes did draw: on Grand Theft Auto VI, a 2560x1440 RGBA8 target of the geometry pass shows the scene's objects (packed surface data, so false colours). The target is the one `capture::note_target` last saw bound, so it needs a diagnostics build; without the variable nothing changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
image_sample_d_cl was refused by name, and behind it every program hit a cube sample with explicit gradients, refused as "a cube sample with ... gradients". Both now translate to sampleGrad: - A cube's gradients on GFX10 are of the face coordinates (s, t), four addresses rather than six, so the coordinates follow at 4. They become the direction's gradients through the face's linear part of cube_direction (u = 2s - 3, v = 2t - 3; the major axis does not move), in the new cube_gradient. - `_cl`: the level-of-detail clamp follows the coordinates and is passed as sampleGrad's clamp. translate --validate on shaders.rpf: vertex/pixel 12172 -> 12197 validated; both errors are gone from the list. Not yet compared against the console's sampling at runtime. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… on divergent s_barrier
lower.rs: keep the PR's lazy barycentric VGPR inputs next to main's `Reg::S(n)` arm for uninitialized SGPRs. mod.rs: the barycentric test helper passes the structure to resource::track, which now takes it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
DXIL allows at most two SV_Barycentrics input elements, one perspective
and one linear. A program reading both perspective center and centroid
I/J as values declared two perspective elements, which the validator
refuses ("There can only be up to two input attributes of
SV_Barycentrics with different perspective interpolation mode").
The second mode of the same kind is now an Unsupported reason rather
than a second element. Reusing the first element would hand centroid
reads center weights (or the reverse), which differ on edge pixels: a
silent wrong value. Before this PR such reads were refused anyway.
Test: center + centroid values are refused; centroid alone still
translates with one element.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AZ9pSB4ZoXYUifuXg8gm66
The ISA's special cases in its order: a NaN numerator or denominator comes back quieted, 0/0 and inf/inf give NaN, x/0 and inf/x a signed infinity, 0/x and x/inf a signed zero, otherwise |S0| with the quotient's sign. Worked on the f32 values of the f16 operands, which are exact.
The ISA's "exponent of S0 all ones -> overflow" check runs before the final |S0| case, so a NaN quotient with a finite, non-zero numerator and denominator gives sign | infinity, as measured on gfx1036 hardware. The zero, infinity and invalid checks still come first.
These write SCC, but their lowering gave no SCC value, so the generic "result is not zero" stood in. The ISA sets it otherwise: - s_min_i32/u32, s_max_i32/u32: SCC = 1 when src0 is the value chosen (src0 < src1 for min, src0 > src1 for max). - s_lshl1..4_add_u32: SCC = 1 when (src0 << n) + src1 overflows 32 bits, through bits shifted out of src0 or the add's carry. So s_min_u32(5, 3) left SCC = 1 (3 is not zero) where the hardware leaves 0, and s_lshl1_add_u32(1, 0xFFFFFFFE) left 0 where it leaves 1; an s_cselect or s_cbranch_scc after them took the wrong side.
The d16 forms of the typed buffer loads return each channel as 16 bits, two per VGPR, low half first; the decoder already sizes their data that way. The lowering only treated `buffer_` names as d16, so a tbuffer_load_format_d16_* went through the 32-bit path: the first VGPR got channel x as a 32-bit value (the f32 bits of 1.0 instead of the f16 pair (1.0, 2.0)) and the other channels were dropped. The format path now packs its channels for d16: integer formats keep their low 16 bits, the other formats become f16 (as the MUBUF d16 path converts them).
SDATA on s_atc_probe and s_atc_probe_buffer is a 7-bit immediate, the buffer resource is four dwords, and GLC/DLC are not operands of either.
buffer_gl0_inv and buffer_gl1_inv name a buffer but read no descriptor, so resource tracking refused them before lowering. Skip descriptor tracking for _inv buffer instructions and lower the pair to nothing, as the existing scalar cache instructions already are. Add a synthetic full-pipeline test.
…e a buffer view A descriptor fetched from the resource heap by index has no used-resource entry, so a scalar buffer load (s_buffer_load_dword*) through it was lowered through a 64 KiB constant buffer handle. When vector buffer loads read the same descriptor, the slot holds a buffer SRV (the title made it one), and reading it through a CBV handle is a descriptor of the wrong type, which D3D12 leaves undefined. Such loads now read the slot as a raw buffer, as table SRVs already do. A descriptor also written through (a UAV) and one only scalar loads read are unchanged. In the title's shaders.rpf this changes 38,829 scalar loads in about 1,900 of 26,084 programs; emit and validation counts are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
s_buffer_load_dword* through a table's UAV took the constant buffer path: a CBV handle at the heap index of a UAV. Reading through it removes the device (WARP: "The GPU device instance has been suspended"). Such a load now reads the UAV raw, as a raw SRV is read and as vector buffer accesses read a UAV. The test writes a value to the VALU tests' raw UAV, reads it back with a scalar buffer load and stores that; it removed the WARP device before this change and passes on the hardware GPU and WARP after. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sak#1511, verified together Merges Marvisak#1077 Marvisak#1175 Marvisak#523 Marvisak#530 Marvisak#1040 Marvisak#1406 Marvisak#1392 Marvisak#1407 Marvisak#1516 Marvisak#1388 Marvisak#1189 Marvisak#542 on top of the stack of Marvisak#1511 (Marvisak#1319, Marvisak#1402, Marvisak#1492, Marvisak#1504, Marvisak#1511, on main ffe310e), each head unchanged. Hand changes, each in its own commit or merge commit: the one-line draw.rs change and three HostShader literals that Marvisak#1077 needs on the stack, the test join of Marvisak#1516, Marvisak#542's bound applied to the stack's raw-view branch with its two test fixes, and Marvisak#1040's test asking the adapter. See the pull request text. cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features, is clean and cargo test --workspace --locked passes (442 passed, 6 ignored; main has 342 passed, 6 ignored). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…on old validators
PSV0 shared one string-table copy of a repeated semantic name (TEXCOORD0
and TEXCOORD1 pointing at the same "TEXCOORD"). DXC's PSV writer writes
one copy per element, and validators before 1.8 compare PSV0 byte for
byte, so any signature repeating a name was rejected there ("Pipeline
State Validation does not match"); 1.8 compares the strings and accepted
both. Checked against dxil.dll 1.7, 1.8 and 1.9.
Validator::version() reads IDxcVersionInfo; the compute-derivative test
skips dxil.dll validation when the validator predates 1.8, which rejects
dx.valver 1.8 outright. Translated shaders never go through dxil.dll.
Reported by @alexdeliu.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
….dll is older than validator 1.8" This reverts commit 119b763.
…tic names per element, skip on validators older than 1.8) The author's head now does what the bundle's own commit did (a validator version query and the skip below 1.8), and fixes the second failing test at its cause; the bundle's commit is reverted just before this merge. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ring The shader chain moved: Marvisak#306 is at its author's new head (e3067ae), and the bundle's own validator commit is reverted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…centrics The shader chain moved: Marvisak#306 is at its author's new head (e3067ae), and the bundle's own validator commit is reverted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…bustness The shader chain moved: Marvisak#306 is at its author's new head (e3067ae), and the bundle's own validator commit is reverted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Offline shader counts on a retail dumpResult: +227 programs over #1402 (head 119b763), 0 lost. Head c3a1790, compared with #1402 at 119b763: 23,412 → 23,639 validated.
The runtime-side PRs (root UAVs, barriers, fences, typed-texture flags) change no offline count, as expected. Method: |
The shader chain moved: Marvisak#306 is at its author's new head (e3067ae), and the bundle's own validator commit is reverted. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
5224aa5 to
8de76a2
Compare
|
Automated triage for the maintainers. Closing because this pull request re-packages other open pull requests. Each of those is reviewed on its own, so a bundle cannot be merged. If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution. |
|
Automated triage for the maintainers. Needs rebase. This pull request conflicts with Generated by Claude Code |
One PR in place of 12. The list of PRs that Impre-visible ran on top of #1511 on Linux with a GTX 1660 (their comment on #1511), built as one branch and checked: root UAVs (#1077, #1175, which carry #489 and #302 inside their own commits), the Linux build (#523), a render-target diagnostic (#530), typed-texture flag fixes (#1040, #1406), a UAV barrier after a dropped dispatch (#1392), lane masks read as numbers (#1407), typed-buffer components (#1516), 64-bit command-list waits (#1388), fence signaling (#1189) and offsets below 2 GiB (#542). In their runs the world loaded with 331 to 366 compute pipelines made, none refused by the host and no device removal. Every head is merged unchanged onto
mainplus #1511, and the result is built and tested together.What is inside
873548f2dbfe5d2dab001226617951ceb1eb08e4c897587b42ecd19687a1958a8557570a63be4e0489d84135fa370c61bff31a4692a1Changes made while bundling
No PR was edited. Everything below is a separate commit or the body of a merge commit; the first two items are what was needed for #1077 and #1175 to build on the stack at all (they merge without a conflict and do not compile, which a merge check does not show).
self.dynamic, which Shaders: scalar loads from a root view's address read its memory #1056 (in [BUNDLE] Lane-mask, scalar descriptor read and cube-sample shader fixes: #1057 #1073 #1074 #1084 #953 #1056 #1015 #1055 #563 #1004 #1319) replaced bylist.keep_dynamic;draw.rsnow callslist.keep_dynamic(heap, index, 1), the one-line change Impre-visible described. Three tests that other PRs of the stack add build aHostShaderwithout Shaders, GPU: root UAVs (stacked on #489) #1077's newroot_uavsfield (shader.rs,root_view_tests.rs,lane_mask_tests.rs); each has the field.valu_tests.rs; both are kept.bound_raw_offsetfor the SRV case it handles. The stack has one raw-view branch for an SRV range, a UAV range or a heap buffer (Shaders: scalar loads through a heap buffer that vector accesses use read a buffer view #1015, Shaders: scalar buffer loads from a UAV read it raw #1055), so the bound is applied to that branch, which keeps the stack's choice of view. Two things in Shaders: keep buffer offsets below 2 GiB (NVIDIA + vkd3d-proton world device loss) #542's own tests did not compile on the stack:resource::tracktakes the structured program as a fourth argument (the arity of 63 open PRs call resource::track with three arguments and break cargo test once merged (since 6638098) #801), and theHostShaderliteral lacksroot_uavs.host_texture_drops_unsupported_uav_flag_for_b5g5r5a1assumed that every adapter refuses a typed UAV on B5G5R5A1_UNORM;host_textureonly drops what the adapter refuses, and an RX 6950 XT accepts it, so the test failed onmainplus GPU: drop unsupported UAV/RT flags on typed host textures and guard RTV creation #1040 alone. It now asks the adapter (CheckFeatureSupport) and expects the flag kept or dropped accordingly, for B5G5R5A1 (UAV and render target) and B4G4R4A4 (render target).#302 and #489: #1077 is stacked on #489, itself on #302, and its branch carries their changes under other commit ids. This bundle therefore does not mark #302 and #489 as merged.
Left out, and why
Verification
Windows 11, RX 6950 XT, Rust 1.98.1 (the pinned toolchain):
cargo clippy --workspace --all-targets --locked -- -D warningscargo clippy --workspace --all-targets --all-features --locked -- -D warningscargo test --workspace --lockedmain: 342 passed, 6 ignored)The title was not run, so this says nothing about in-game effect. No game data is used or committed.
Re-verify in one go
To confirm that no component PR moved since this was built, compare each
Headabove withgh pr view <n> --repo Marvisak/VIctory --json headRefOid. If one differs, the branch needs a rebuild: merge the new head in the same order.If this lands
The component heads are in the history unchanged, so each PR's commits and authorship are kept and GitHub should mark them merged. Merging them one by one instead works too, with the exceptions noted above.
AI-assisted (Claude Code); no game data.
🤖 Generated with Claude Code