Skip to content

VIctory Windows Playability Package (Waves 6–9 + Upstream Sync) - #2

Merged
sahajiscoding merged 48 commits into
mainfrom
arena/d3857d4f-victory
Nov 24, 2026
Merged

sahajiscoding merged 48 commits into
mainfrom
arena/d3857d4f-victory

Conversation

@sahajiscoding

@sahajiscoding sahajiscoding commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

Summary

Full clean-room Windows playability upgrades for VIctory (victory.exe), strictly complying with docs/asset-policy.md (zero copyrighted title assets bundled).

Wave 9 — Complete Windows Playability Package

Earlier Waves Included

  • Upstream ffe310e sync + Waves 6, 7, 8A, 8B, 8C (#862, #865, #878, #881, #888, #889, #890, #891, #893, #901, #905, #907, #910, #915, #920, #924, #931, #932, #938, WGI 4-motor impulse triggers, victory doctor, Explorer drag-and-drop launch).

Verification

  • Windows CI run 45443840887 (commit be2dc01, windows-latest): 100% PASS (Clippy, Clippy, diagnostics build, Tests across all 11 crates + xtask asset policy).
  • .github/workflows/ci.yml, Cargo.lock, and .gitignore match upstream ffe310e with 0 diff.

sahajiscoding and others added 3 commits November 24, 2026 10:06
Waves 1-4:
- Shader translator: merged Es/Ls/Gs/Hs stages, RootType::Constants 64-bit VA pairs (CONST_VIEW_SPACE=2), 64-bit image_atomic_*, Wave64-on-Wave32 LDS adaptation, transitive phi liveness, host-wave lane ops, NGG geometry mesh path, VSH3 shader cache
- GPU runtime: waitable-timer frame pacing, host ID3D12QueryHeap & timestamp frequency, IDXGIOutput6 HDR + SetColorSpace1 + Blitter PSO + clamped CopyTextureRegion fallback, physical_epoch-gated texture hashing, coalesced watch guards, Shadow::copy_back scratch, indirect execution & descriptor heap scaling
- Formats: GFX10.3 HTILE/DCC/CMASK/FMASK metadata planes and layout support
- HLE: SAPI 5 speech synthesis, Freeverb DSP reverb, WinRT WGI 4-motor rumble, DirectStorage zero-staging streaming & 16 MiB scratch, APU Opus tests, display HDR mode resolution

Wave 5:
- victory-shader: ordered OLT|OGT for v_cmp_lg (Marvisak#706), denormal-as-zero legacy_mul (Marvisak#682), 16-bit VALU omod & v_cvt_{u16,i16}_f16 modifiers/saturation (Marvisak#668), v_interp_p1ll_f16 high-half preservation (Marvisak#683), LOD-clamped image_sample_*_cl & image_gather4_l (Marvisak#694), root-view structured buffer raw fallback (Marvisak#709), conversion-free tbuffer_store_format_* (Marvisak#707), cfg(windows) gate on constant_color (Marvisak#685)
- victory-gpu & formats: upload CPU-written textures before CopyResource/CopyTextureRegion (Marvisak#671), clear vertex-buffer slots on null views (Marvisak#681), command-list 64-bit memory wait sync (Marvisak#700), dynamic descriptor slot reclamation from executed lists (Marvisak#688), private MICRO doc-link fix (Marvisak#696), clippy::field_reassign_with_default fix (Marvisak#692)
- victory-hle, loader, formats, apps: 0x-prefixed TitleId & self-closing XML handling (Marvisak#715), xg null-out/bounds/checked-span validation (Marvisak#674), Media Foundation local-file URL policy on MFCreateFile/MFBeginCreateFile/MFCreateSourceReaderFromURL/MFCreateSinkWriterFromURL (Marvisak#663), checked PE patch offsets (Marvisak#670), zero-alloc streaming bcpack Workspace (Marvisak#703), in-repo capture/dump directory guards (Marvisak#679/Marvisak#664)

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Implement Waves 1-5: shader, GPU, formats, HLE, and loader improvements
…ctory

Reconciles ~100 upstream commits (d2a4bae..ffe310e) with Waves 1-5:
- Preserves upstream waterfall loops over per-lane descriptors/offsets,
  packed buffer formats, v_cvt_norm_{i16,u16}_f16, SV_StencilRef,
  PSV0 sample frequency, s_ttracedata_imm, v_cmp_class_f16, s_bitcmp0/1,
  worklist bitcode liveness, BCPack bucket lookup, Wine staging fill,
  null texture UAV dimensions, capture UNORM16/fmt89, HLE/loader fixes,
  and Windows CI workflow.
- Keeps Waves 1-5 additions including spill-table user-data tracking,
  streaming zero-alloc BCPack lanes, dynamic descriptor slot reclamation
  paired with safe drop-on-exhaustion, UAV read/write hazard tracking,
  UserDataBinding root-CBV fallback, wave-size targeting, extended
  image_sample_*_cl/_o forms, and float source-modifier support on
  v_cvt_{u16,i16}_f16.

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: f90208c8-a0b9-4c35-b693-00a31a75009c
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

sahajiscoding and others added 8 commits November 24, 2026 11:33
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…terfall_tests.rs

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…nding in lower.rs

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…st.rs

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
sahajiscoding and others added 6 commits November 24, 2026 12:06
…for full diagnostics

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…diagnostics

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…r base tracking, and lower.rs tests

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…UAV clears, same-list GPU copy hazard, oleaut32, s_bfe_u32

- victory-gpu/pipeline: disable BlendEnable on active *_UINT/*_SINT render targets across graphics and mesh PSOs (Marvisak#806), key host pipeline library on effective host state and deduplicate concurrent StorePipeline (Marvisak#780)
- victory-gpu/host: scan regions with VirtualQuery in copy_mapped and write_mapped fallbacks (Marvisak#783)
- victory-gpu/descriptor+draw: raise MIN_DYNAMIC to 1<<18 and trim fresh dynamic tables from first used entry (Marvisak#747)
- victory-gpu/list+descriptor+host: implement ClearUnorderedAccessViewUint and ClearUnorderedAccessViewFloat for resource-backed textures (Marvisak#771)
- victory-gpu/list+host: use tracked same-list GPU shadow buffers with 512-byte offset rebasing in placed buffer-to-texture CopyTextureRegion and GPU CopyBufferRegion (Marvisak#785)
- victory-hle/host: allow oleaut32.dll pass-through for vccorlib140.dll ordinals (Marvisak#811)
- victory-shader/valu_tests: add s_bfe_u32 coverage to bfe_signed_and_unsigned_match_rdna2 (Marvisak#803)

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…pstream ci.yml

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@sahajiscoding sahajiscoding changed the title Sync upstream Marvisak/VIctory (ffe310e) + Wave 6 fixes Sync upstream Marvisak/VIctory main (ffe310e) + Wave 6 GPU/HLE/Shader fixes Nov 24, 2026
@sahajiscoding
sahajiscoding marked this pull request as ready for review November 24, 2026 12:58
@codeant-ai

codeant-ai Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

CodeAnt  CodeAnt Review Status

✅  Review completed

Status Commit Started (UTC) Finished (UTC)
✅  #72f6b Incremental review completed be92214 Nov 24, 2026 · 16:05 16:18
✅  #98547 Incremental review completed 59bd403 Nov 24, 2026 · 15:03 15:16
✅  #4fb91 Incremental review completed 0381a58 Nov 24, 2026 · 13:58 14:12
✅  #893f1 Reviewed your PR da1c367 Nov 24, 2026 · 12:58 13:11

@codeant-ai

codeant-ai Bot commented Nov 24, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files label Nov 24, 2026
Comment on lines +657 to +658
return matches!(b, Term::Const(_)) && self.is_spill_hi(a, spill_hi)
|| matches!(a, Term::Const(_)) && self.is_spill_hi(b, spill_hi);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: s_and_b32 is accepted with any constant mask, even zero, so a load from a different high address can be mistaken for spill data and replaced with a root value.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/resource.rs
**Line:** 657:658
**Comment:**
	*Incorrect Condition Logic: `s_and_b32` is accepted with any constant mask, even zero, so a load from a different high address can be mistaken for spill data and replaced with a root value.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +1289 to +1292
if let Some((_, [a, Term::Const(_)])) = self.sop2(v, &["s_bfe_u32"]) {
t = a;
continue;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: s_bfe_u32 may keep only part of the expected high dword, but this removes the extraction as if it were unchanged, accepting and emitting a wrong address.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/resource.rs
**Line:** 1289:1292
**Comment:**
	*Incorrect Condition Logic: `s_bfe_u32` may keep only part of the expected high dword, but this removes the extraction as if it were unchanged, accepting and emitting a wrong address.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

}
visiting.push(v);
let ok = if let Some((_, [a, b])) = self.sop2(v, &["s_addc_u32"]) {
self.carried_inner(a, want, visiting) || self.carried_inner(b, want, visiting)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: An s_addc_u32 is accepted whenever either operand contains want; any other nonzero high-word term is discarded when lowering emits the root-relative address.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/resource.rs
**Line:** 1421:1421
**Comment:**
	*Incorrect Condition Logic: An `s_addc_u32` is accepted whenever either operand contains `want`; any other nonzero high-word term is discarded when lowering emits the root-relative address.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

}
let id = read_cstr(voice_id);
// SAFETY: live handle from `create`.
unsafe { (*handle.cast::<Synthesizer>()).voice_id = Some(id) };

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: set_custom_voice stores the requested ID, but synthesis never reads it, so every stream uses the system default even after this call succeeds.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Incomplete implementation

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-hle/src/modules/speech.rs
**Line:** 182:182
**Comment:**
	*Incomplete Implementation: `set_custom_voice` stores the requested ID, but synthesis never reads it, so every stream uses the system default even after this call succeeds.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

let k = (n * PAGE - within).min(data.len() - done);
view.bytes()[within..within + k].copy_from_slice(&data[done..done + k]);
let k = (n * PAGE - within).min(len - done);
fill(done, &mut view.bytes()[within..within + k])?;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: If fill errors after modifying a mapped run, ? exits without advancing PHYSICAL_EPOCH, so GPU staging can reuse stale texture contents.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Cache

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-hle/src/modules/xmem.rs
**Line:** 630:630
**Comment:**
	*Cache: If `fill` errors after modifying a mapped run, `?` exits without advancing `PHYSICAL_EPOCH`, so GPU staging can reuse stale texture contents.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +235 to +237
if g.protected.is_empty() {
HAS_GUARDS.store(false, Ordering::Release);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: open clears HAS_GUARDS before VirtualProtect makes the last block writable; a concurrent writing call skips the mutex, so its kernel write fails.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Race condition

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-gpu/src/watch.rs
**Line:** 235:237
**Comment:**
	*Race Condition: `open` clears `HAS_GUARDS` before `VirtualProtect` makes the last block writable; a concurrent `writing` call skips the mutex, so its kernel write fails.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

/// A GPU wait for a 64-bit memory value `(address, comparison, reference)`:
/// recorded on the list and awaited at submission time before the list's
/// host work runs, so cross-queue and CPU producers can satisfy it first.
extern "system" fn wait_value(this: This, address: u64, comparison: u32, reference: u64) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: The 32-bit wait slot uses this 64-bit callback, so adjacent high bits can change the comparison and make a wait proceed incorrectly or time out.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Api mismatch

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-gpu/src/list.rs
**Line:** 1531:1531
**Comment:**
	*Api Mismatch: The 32-bit wait slot uses this 64-bit callback, so adjacent high bits can change the comparison and make a wait proceed incorrectly or time out.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Comment on lines +682 to +684
if !self.root_uavs.is_empty() && graphics && !self.pixel {
self.flags |= flags::UAVS_AT_EVERY_STAGE;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: A constant-pair UAV is also a UAV binding, but this condition ignores const_uavs; non-pixel graphics shaders using one omit the feature flag declaring UAV use at that stage.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/emit/shader.rs
**Line:** 682:684
**Comment:**
	*Incorrect Condition Logic: A constant-pair UAV is also a UAV binding, but this condition ignores `const_uavs`; non-pixel graphics shaders using one omit the feature flag declaring UAV use at that stage.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

…ave, and core gaps

Shader (victory-shader):
- Marvisak#853: pair descriptor-size-only waterfall s_load_dword* with accessed load of the same (table, lane_offset) via Waterfall::sizes + unit & WARP tests
- Marvisak#852: key Lower::handles on (props.0, props.1) so image atomics after image_get_resinfo get an integer handle + unit test
- Marvisak#798: lower s_buffer_load* descriptor num_records reads to GetDimensions + unit test
- Marvisak#823: support SDWA WORD_0 + UNUSED_SEXT in write_half and reject reserved dst_unused==3 + unit & WARP tests
- Marvisak#830: preserve denormals and signaling NaNs in v_cmp_class_f32 via bitwise sign/abs + WARP test
- Marvisak#832: lower v_cmp_f/tru_f32/f16 to i1 constants without IEEE float compare + WARP test

GPU (victory-gpu):
- Marvisak#871: scan free runs straddling HostHeap::dynamic next cursor + unit test
- Marvisak#840: mirror 256-byte-aligned in-range CBV tables in place, guard padded size against shadow.left(), and refresh/transition View::Constant in readable()
- Marvisak#863: saturate indirect argument frame budget with InterlockedCompareExchange + WARP test
- Marvisak#843: preserve NaN payloads and round normal ties to even in f32_to_half + unit test
- Marvisak#782: fix place() initial alignment (1), null+nonzero sentinel, and checked u64 overflow + unit test
- Marvisak#797: widen unsupported packed 16-bit (85/86/115) RTV/UAV textures to R8G8B8A8_UNORM and match SRV/UAV/RTV view formats + WARP test
- Marvisak#796: harden OMSetRenderTargets (cap 8, null/zero/checked offset)
- Marvisak#837: validate allocate_upload alignment power-of-two before clamping to 16 and reserve fallibly + unit test
- Marvisak#848: implement ID3D12GraphicsCommandList::ClearState (slot 11) + WARP readback test
- Marvisak#835: implement ID3D12GraphicsCommandList::DiscardResource (slot 55) with state/flag/region checks + WARP test
- Marvisak#859: implement SetPredication (31), SetMarker (56), BeginEvent (57), EndEvent (58) + WARP readback test
- Marvisak#211: implement multi-plane PresentX compositing (0x48-byte Plane, premultiplied-alpha overlay Blitter up to 8 planes)
- Marvisak#817: include shader wave_size and host max_wave in compute PSO refusal diagnostics
- Marvisak#792: create missing VICTORY_CAPTURE directory automatically

HLE & Core (victory-hle, victory-core):
- xmem: lazy persistent per-Section backing view with lock-free AtomicU64 committed-page bitmap to eliminate per-request MapViewOfFile/UnmapViewOfFile TLB shootdowns during DirectStorage streaming + concurrent test
- Marvisak#845: ignore switched-off wireless receiver pads until non-rest input arrives so keyboard stand-in remains usable + unit test
- Marvisak#874: report held keyboard keys in press order for IGameInputReading::GetKeyState + unit test
- Marvisak#839: check CreateEventW null return and use bytewise unaligned writes in APU Opus output + unaligned test
- Marvisak#870: accept only canonical v{n} version directories in xgamesave::current() + unit test
- Marvisak#793: lexically normalize paths before ancestor walk and fold ./.. under Windows verbatim prefixes in policy.rs + unit test

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Comment on lines +685 to +687
if self.root_uavs.len() > 8 {
self.flags |= flags::USE_64_UAVS;
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: With nine or more constant-pair UAVs, this count ignores const_uavs; DXIL uses register u8 or higher without declaring the 64-UAV feature, which can fail validation or pipeline creation.

Assessment: 🟠 Major · 🔁 Occurrence: Rarely · 🏷️ Incomplete implementation

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/emit/shader.rs
**Line:** 685:687
**Comment:**
	*Incomplete Implementation: With nine or more constant-pair UAVs, this count ignores `const_uavs`; DXIL uses register `u8` or higher without declaring the 64-UAV feature, which can fail validation or pipeline creation.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Comment on lines +804 to +806
if x.base.is_some() && y.base.is_some() {
return Sum::dynamic(v);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: When a root-constant address is added to another dword in the same multiword constants block, both terms are classified as bases, so address loses its root and rejects the valid load.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/resource.rs
**Line:** 804:806
**Comment:**
	*Incorrect Condition Logic: When a root-constant address is added to another dword in the same multiword constants block, both terms are classified as bases, so `address` loses its root and rejects the valid load.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

sahajiscoding and others added 16 commits November 24, 2026 14:14
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…and restore ci.yml

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…e shader fixes

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…n_mark)

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…he, partial detiling, shader mask joins, and HLE/GPU/loader hardening

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
…k-join arm, restore CI workflow

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
fn resolve_hdr_mode(preference: u32, hdr: victory_gpu::HdrInfo) -> (u32, Option<HdrModeInfo>) {
// Preference 2 explicitly requests SDR; otherwise enable HDR10 whenever
// the host display reports HDR10 support (or `VICTORY_HDR=1`).
if preference == 2 || !hdr.supported {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: PreferRefreshRate (1) is treated like PreferHdr (0), so an HDR-capable display returns Enabled even when the caller prioritizes refresh rate.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Incorrect condition logic

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-hle/src/modules/display.rs
**Line:** 77:77
**Comment:**
	*Incorrect Condition Logic: `PreferRefreshRate` (`1`) is treated like `PreferHdr` (`0`), so an HDR-capable display returns Enabled even when the caller prioritizes refresh rate.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Comment on lines +543 to +548
HwStage::Gs => match ms_io(stage_data, u32_at(record, RECORD_LDS)?) {
Ok(StageIo::Ms(ms))
if ms.threads > 0 && ms.max_vertices > 0 && ms.max_primitives > 0 =>
{
StageIo::Ms(ms)
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggestion: When this parses an NGG Gs shader as StageIo::Ms, GPU resource lookup excludes Gs, leaving Translated.used empty; draws then skip processing its table descriptors.

Assessment: 🟠 Major · 🔁 Occurrence: Sometimes · 🏷️ Incomplete implementation

Use CodeAnt Skill Fix in Cursor Fix in VSCode Claude

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** crates/victory-shader/src/native.rs
**Line:** 543:548
**Comment:**
	*Incomplete Implementation: When this parses an NGG `Gs` shader as `StageIo::Ms`, GPU resource lookup excludes `Gs`, leaving `Translated.used` empty; draws then skip processing its table descriptors.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

sahajiscoding and others added 2 commits November 24, 2026 16:21
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
… xtask policy

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@sahajiscoding sahajiscoding changed the title Sync upstream Marvisak/VIctory main (ffe310e) + Wave 6 GPU/HLE/Shader fixes Full Windows playable VIctory build (Waves 6–8C: GPU, Shaders, HLE, Loader, Formats, Cache & Windows Launcher) Nov 24, 2026
sahajiscoding and others added 3 commits November 24, 2026 16:53
… & shader ops

- Prefer high-performance discrete GPU via IDXGIFactory6::EnumAdapterByGpuPreference
  and VICTORY_ADAPTER (index or name substring) in victory-gpu and victory-shader (Marvisak#208/Marvisak#1132)
- Cap shader-visible sampler heaps at D3D12's 2,048 architectural limit instead of
  failing heap creation (Marvisak#100/Marvisak#86)
- Fall back to the in-memory translated shader if shader-cache disk write fails (Marvisak#358)
- Add F11 / Alt+Enter borderless fullscreen toggle and clean WM_CLOSE handling to
  both title windows (lifecycle.rs) and VIctory's fallback window (host.rs); clamp
  fit_into() dimensions to >= 1 (Marvisak#451)
- Enhance PC keyboard+mouse fallback gamepad with Space/LShift/R/LCtrl aliases,
  LMB/RMB/MMB triggers, and RMB/F9 mouse camera look; support null-device
  cross-device previous/next reading walk (Marvisak#361)
- Fall back to a no-op display deferral when PowerSetRequest returns ERROR_NOT_SUPPORTED
- Clamp short virtual-drive '..' paths at the virtual drive root (Marvisak#182)
- Wake and cancel sleeping delayed callbacks immediately on XTaskQueueTerminate (Marvisak#132)
- Cache XMA IMDCT rotation sin/cos tables across subframes (Marvisak#172)
- Lower additional RDNA2 VALU instructions (v_mul_hi_{u,i}32_{u,i}24, v_mad_{u,i}32_{u,i}16,
  v_lerp_u8, v_sad_u{8,16,32}, v_cvt_pk_{u,i}16_{u,i}32, v_dot{2,4}_{i,u}32_{i,u}{16,8})
  with DXIL validation and conditional INT64 feature flagging (Marvisak#157)
- Add portable victory.toml lookup next to victory.exe, interactive [S] Setup wizard
  and [K] Controls guide in victory.exe, and scripts/build-windows.ps1 release packager

Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
Co-authored-by: arena-agent <297053741+arena-agent@users.noreply.github.com>
@sahajiscoding sahajiscoding changed the title Full Windows playable VIctory build (Waves 6–8C: GPU, Shaders, HLE, Loader, Formats, Cache & Windows Launcher) VIctory Windows Playability Package (Waves 6–9 + Upstream Sync) Nov 24, 2026
@sahajiscoding
sahajiscoding merged commit fb40a8f into main Nov 24, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL This PR changes 1000+ lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant