Skip to content

Loader, GPU: lazy NOP patching on #UD, BLAKE3 image caching, and same-list GPU placed copy forwarding (#1372, #1374) - #79

Merged
LAKSHYA-cmd-tech merged 1 commit into
integrate/gta6-world-and-shader-fixesfrom
fix/loader-ud-nop-and-gpu-same-list-forwarding
Nov 25, 2026
Merged

LAKSHYA-cmd-tech merged 1 commit into
integrate/gta6-world-and-shader-fixesfrom
fix/loader-ud-nop-and-gpu-same-list-forwarding

Conversation

@LAKSHYA-cmd-tech

Copy link
Copy Markdown
Owner

Summary

Integrates upstream PRs Marvisak#1372 and Marvisak#1374:

  • Loader (Loader: lazily NOP-patch clwb/monitorx on #UD, emulate rdpid, batch IAT protection, and content-hash cached DLLs Marvisak/VIctory#1372):
    • Lazily NOP-patches standalone clwb and monitorx instructions on #UD using canonical multi-byte NOPs (1..=15 bytes) with atomic exchange, flushed instruction cache, and restored page protections.
    • Emulates rdpid r64 on #UD, returning the logical processor number from Win32 GetCurrentProcessorNumberEx.
    • Batches VirtualProtect calls by 4 KiB page across import binding slot writes, reducing syscall frequency from 2x per slot to 2x per page.
    • Content-addresses prepared DLL images with dual BLAKE3 hashes and implements 0-byte stat hit cache checking.
  • GPU Placed Copy Forwarding (GPU: read same-list GPU writes in placed buffer-to-texture copies Marvisak/VIctory#1374):
    • Detects when every byte read by a placed CopyTextureRegion footprint or source_box was produced on the GPU earlier in the same command list without an intervening CPU write.
    • Sources placed texture copies directly from the GPU-written Shadow buffer, or rebases unaligned placed offsets on the GPU via temporary aligned shared buffers.
    • Forwards guest CopyBufferRegion and buffer CopyResource on the GPU when their source bytes come from an earlier GPU write in the same list.

Verification

  • cargo test -p victory-gpu -- --test-threads=1: 157 passed, 0 failed.
  • cargo test -p victory-loader -- --test-threads=1: 47 passed, 0 failed.
  • cargo test -p victory-shader -- --test-threads=1: 183 passed, 0 failed.
  • cargo test -p victory-hle -p victory-pipeline -- --test-threads=1: 128 passed, 0 failed.
  • cargo clippy -p victory-gpu -p victory-loader --all-targets -- -D warnings: 0 warnings.
  • cargo run -p xtask -- policy: 159 files compliant.

@coderabbitai

coderabbitai Bot commented Nov 25, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

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: a1a0c051-08b2-4413-a755-5fa7026ea68a

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • 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

@LAKSHYA-cmd-tech
LAKSHYA-cmd-tech merged commit 700fa33 into integrate/gta6-world-and-shader-fixes Nov 25, 2026
1 of 2 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.

1 participant