Skip to content

fix(dxgi): stabilize FH4 factory hooks#1

Closed
FrontMage wants to merge 2 commits into
mainfrom
codex/fh4-dxgi-vtable-fix
Closed

fix(dxgi): stabilize FH4 factory hooks#1
FrontMage wants to merge 2 commits into
mainfrom
codex/fh4-dxgi-vtable-fix

Conversation

@FrontMage

Copy link
Copy Markdown
Collaborator

Summary

  • extend DXGI factory/swapchain vtable clones past the public interface size using readable vtable memory
  • route DXGI swapchain creation/present recording through exported D3D12 proxy hooks when available
  • allow present-frame seal checks to run from normal Present records instead of only captured present-frame assets

FH4 context

This addresses the FH4 crash path where system DXGI reached an indirect jump after our factory vtable clone only covered the public IDXGIFactory2 size. The patched clone now keeps additional readable slots while only replacing the public hook slots we own.

Verification

  • cmake --build build/cmake
  • cmake --build build/windows-cross
  • git diff --check -- . ':(exclude)build'
  • Deployed the rebuilt DLLs to the FH4 install and confirmed the game progressed past DXGI factory/swapchain patching with buffer assets being produced.

Notes

FH4 full buffer asset capture remains very slow because resource snapshots can write multiple GB during startup. That performance tuning is being handled separately from this hook stability fix.

@yuemingruoan yuemingruoan deleted the codex/fh4-dxgi-vtable-fix branch June 18, 2026 17:39
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.

2 participants