Skip to content

[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

Closed
MamaLeVrai wants to merge 136 commits into
Marvisak:mainfrom
MamaLeVrai:bundle/world-stack
Closed

MamaLeVrai wants to merge 136 commits into
Marvisak:mainfrom
MamaLeVrai:bundle/world-stack

Conversation

@MamaLeVrai

@MamaLeVrai MamaLeVrai commented Nov 24, 2026 •

Copy link
Copy Markdown

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 main plus #1511, and the result is built and tested together.

For reviewers and for anyone verifying with an agent (Claude, Codex, a person): this is a [BUNDLE] PR. The re-verification commands are below, so one run covers all of it.

What is inside

PR Author Head Title
#1077 DuarttBR 873548f2d Shaders, GPU: root UAVs (stacked on #489)
#1175 Castyan bfe5d2dab Shaders: verify compute writes through a spilled root UAV
#523 spidercraft 001226617 Build: compile and test the workspace on Linux again
#530 AKA0GHOST 951ceb1eb GPU diagnostics: show one of the title's render targets in the window
#1040 gabrielcruzg3 08e4c8975 GPU: drop unsupported UAV/RT flags on typed host textures and guard RTV creation
#1406 ESAT586 87b42ecd1 GPU: fix NULL/UNKNOWN SRV/UAVs on promoted-typeless textures and MSAA/array/3D NULL RTV/DSVs
#1392 kunalkhude99 9687a1958 gpu: emit UAV barrier after a dropped compute dispatch
#1407 marquezinii a8557570a Shaders: lane masks holding lanes elsewhere, and mask joins, read as numbers
#1516 venglov 63be4e048 Shaders: zero missing typed-buffer components
#1388 wbkepler 9d84135fa GPU: honor command-list 64-bit memory waits without blocking submissions (#700)
#1189 geiyiliyabumo 370c61bff GPU: make fence signaling monotonic, clamp sampler enums, and add unit tests
#542 gingertonik 31a4692a1 Shaders: keep buffer offsets below 2 GiB (NVIDIA + vkd3d-proton world device loss)

Changes 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).

  1. Shaders, GPU: root UAVs (stacked on #489) #1077 on the stack: it pushes a root UAV's dynamic slot on 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 by list.keep_dynamic; draw.rs now calls list.keep_dynamic(heap, index, 1), the one-line change Impre-visible described. Three tests that other PRs of the stack add build a HostShader without Shaders, GPU: root UAVs (stacked on #489) #1077's new root_uavs field (shader.rs, root_view_tests.rs, lane_mask_tests.rs); each has the field.
  2. Shaders: zero missing typed-buffer components #1516: both it and Shaders: verify compute writes through a spilled root UAV #1175 add a test at the end of valu_tests.rs; both are kept.
  3. Shaders: keep buffer offsets below 2 GiB (NVIDIA + vkd3d-proton world device loss) #542 (offsets below 2 GiB): it bounds a scalar raw-view load with bound_raw_offset for 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::track takes 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 the HostShader literal lacks root_uavs.
  4. GPU: drop unsupported UAV/RT flags on typed host textures and guard RTV creation #1040: its test host_texture_drops_unsupported_uav_flag_for_b5g5r5a1 assumed that every adapter refuses a typed UAV on B5G5R5A1_UNORM; host_texture only drops what the adapter refuses, and an RX 6950 XT accepts it, so the test failed on main plus 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):

Check Result
cargo clippy --workspace --all-targets --locked -- -D warnings clean
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings clean
cargo test --workspace --locked 442 passed, 0 failed, 6 ignored (main: 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

git fetch https://github.com/MamaLeVrai/VIctory.git bundle/world-stack
git checkout FETCH_HEAD
cargo clippy --workspace --all-targets --locked -- -D warnings
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo test --workspace --locked

To confirm that no component PR moved since this was built, compare each Head above with gh 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

spidercraft and others added 30 commits November 24, 2026 02:17
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
`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>
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>
Copilot AI balanced review requested due to automatic review settings November 24, 2026 20:07

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

wbkepler and others added 5 commits November 24, 2026 21:36
…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>
@sinan-cmyk

Copy link
Copy Markdown

Offline shader counts on a retail dump

Result: +227 programs over #1402 (head 119b763), 0 lost. Head c3a1790, compared with #1402 at 119b763: 23,412 → 23,639 validated.

Failure on #1402 Gained
an interpolation with computed barycentrics 194
barycentrics read directly 32
a lane mask holding lanes elsewhere read as data 1

The runtime-side PRs (root UAVs, barriers, fences, typed-texture flags) change no offline count, as expected.

Method: victory translate --validate --list on shaders.rpf (1.0.2.1), dxil.dll 1.8.2502.11, compared program by program (25,889 programs). AI-assisted (Claude Code). No shader names or data are included, per the asset policy.

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>
@Marvisak

Copy link
Copy Markdown
Owner

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.

Copy link
Copy Markdown
Owner

Automated triage for the maintainers.

Needs rebase. This pull request conflicts with main (conflicting: README.md, apps/victory/src/translate.rs, crates/victory-gpu/src/capture.rs, crates/victory-gpu/src/descriptor/host.rs, crates/victory-gpu/src/draw.rs). It will be reviewed once it is rebased onto the current main.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.