Skip to content

Port upstream correctness wave 5 (19 PRs: bounds/layout validation, diagnostics, loader/HLE fixes) - #5

Merged
devin-ai-integration[bot] merged 68 commits into
mainfrom
devin/correctness-wave-5
Nov 24, 2026
Merged

devin-ai-integration[bot] merged 68 commits into
mainfrom
devin/correctness-wave-5

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Wave 5 of the upstream port: 19 functional-correctness PRs from Marvisak/VIctory (+5977/−352, 28 files), focused on bounds/overflow validation, diagnostics, and correctness fixes across loader, HLE, GPU, and shader crates.

  • Loader/HLE: fix bounds/overflow bugs in tls.rs/stacks.rs and windows.rs (#1192, #1201); self-closing XML elements no longer claim the following text in runtime.rs (#1196); reject null out-pointers in QueryApiImpl (#1199); write decoded Opus samples through unaligned output buffers (#1214); grow DirectStorage BCPack intermediates as zlib inflates (#1238).
  • GPU: fix encoding/fallback/slice-panic bugs in shader_cache.rs (#1200); guard zero/overflowing stride in expand_rects (#1204); validate null args in create_deserializer (#1206); validate input layouts and aligned vertex offsets via a new InputLayout type in pipeline/host.rs (#1207); re-upload a host-copied texture once the title writes its memory (#1210); stop counting the pre-copy flush twice in copy timing (#1217); round a half exactly between two values to even (#1220).
  • Shaders: PSV0 and signatures laid out as the DXIL validator expects (#1208); fix GFX10 independent a16/g16 gradient dword packing (#1209); fix DXIL validator bugs (#1202); data-phis holding a lane-mask value resolve to undef instead of missing (#1227).
  • Diagnostics: report bound descriptor tables accurately in DRED breadcrumbs (#1233); stop inferring descriptor slots from fault addresses (#1236); VICTORY_GPU_TIMING and slow-list command reporting (#1227).

Merge notes: pr-1207's input_layout field replaces HEAD's names/inputs; pr-1227's lane-mask arm was translated onto our path-sensitive reachability machinery (upstream's Stop::Retry/read_phis is absent here); pr-1233's tests live in mod breadcrumb_tests beside the existing mod tests; wave-4's zeroed Stream init, host_blend, and clean_* helpers are kept. Follow-up fixes: rsrc2/address_map/descriptor_words fields in new tests, three clippy lints.

Verified locally: cargo fmt, cargo clippy clean; cargo test green except tests that require an SM 6.6 GPU (none on this VM — same class as the known environmental failures; they run on the GPU CI runner).

Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed

EatCodeSleep2 and others added 30 commits November 24, 2026 02:27
A texture that received a GPU copy or resolve kept the host contents for
good, so later title writes (streamed mips, for example) never reached the
host copy.

Record where the memory stood at the host copy: the write-watch asking for
watched memory, a content hash otherwise. Upload skips the texture only
while the memory is unchanged since then.

Fixes #758
- PSV0 gets one string per arbitrary semantic element instead of sharing
  one between elements with the same name.
- ISG1 and OSG1 sort elements by row only, so co-packed elements keep
  their order.
- Interpolation modes come from the console container's PSV0 when it has
  one, falling back to DXC's defaults.
Outside compute a lane mask has no number form, and two patterns made
programs fail with "a lane mask read as data" although no lane mask is
read as a number:

- A join of registers that hold a mask's dword on one edge and data on
  another (the compiler reuses them once the mask is dead; in mesh
  programs, s_cselect_b64 s[8:9], exec, 0 on one path and
  s_buffer_load_dword s9 on the other). The data phi now takes undef on
  the mask's edge.
- s_bcnt1_i32_b64 (b32 in wave32) of a mask whose count is dead and
  wgit update-ref -d CHERRY_PICK_HEADhose SCC ("some lane is set") picks a branch, as in
  s_xor_b64 s[12:13], vcc, exec; s_bcnt1_i32_b64 s12, s[12:13];
  s_cbranch_scc1. The lane pass now takes that SCC per lane, as for the
  mask operations themselves.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f32_to_half adds 0x1000 before dropping the low 13 mantissa bits, so a
value exactly halfway between two halves always rounds up: 1 + 2^-11
packs as 0x3c01 instead of 0x3c00. A rectangle's fourth corner computed
on such a value gets a half one ulp off. fuzeofficlal measured it in
native draws of the direct path on RTX 5090 and WARP (10 of 16 reference
pixels before, 16 of 16 after) and wrote the fix: the retained bit
decides halfway cases.

Co-Authored-By: fuzeofficlal <fuzeofficlal@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
chiragmadhuprasad and others added 23 commits November 24, 2026 23:47
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-gpu/src/descriptor/host.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-gpu/src/draw.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-gpu/src/host.rs
#	crates/victory-shader/src/emit/lower.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-gpu/src/texture.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-shader/src/emit/container.rs
#	crates/victory-shader/src/emit/mod.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-gpu/src/pipeline/host.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-gpu/src/root.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	crates/victory-hle/src/runtime.rs
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

Personed and others added 4 commits November 24, 2026 18:56
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…up, row-only sort)

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…nnot flake tests

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot merged commit e3b6072 into main Nov 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants