perf(gpu): free fragmented VRAM, promote L0 copies; feat(hle): Sony pads over raw HID #54

Closed
github-bot wants to merge 5 commits from gh-pr/54/head into gh-pr/54/base
Owner

@⁠hatefulpineapple on GitHub · 2026-11-29 19:20 UTC · original
hatefulpineapple:pr/memory-hid → main · +795 −23 · 7 files · 5 commits · closed without merging

GPU memory

  • Pool: best-fit placement (tightest hole, exact fit first) so holes join into
    whole blocks the reclaim tick returns; resting pieces no longer counted as
    room. Measured problem: 1.1–1.9 GB free inside blocks while 24,000 textures
    (2.4 GB) spilled to PC memory (RTX 4070 SUPER, docs/findings.md).
  • back_to_card: gate at the room line instead of a tenth of the budget below
    it — steady play never reached the old gate, so L0 copies never came back.
    Overshoot still bounded by line_for headroom, VICTORY_ROOM_REAL, 64 MB/look.
  • Merged with the block-size / PACK experiments already on main; their
    diagnostics and VICTORY_POOL_PACK kept.

Input

  • DS4 / DualSense / DualSense Edge over raw HID (VID 054C), USB + Bluetooth:
    report layouts, CRC and rumble per the kernel's hid-playstation driver.
    Touchpad click reads as View (the map). VICTORY_HID_PADS=0: XInput only.
  • No external emulator needed.

Proof

  • Pool logic 8/8, HID parser 11/11 (Windows + standalone macOS harness).
  • Release built and tested on the Windows target (RTX 5070 Ti).
  • Runtime A/B (20-min sessions, VICTORY_TEXTURES_BACK=0/1) to follow.
**@⁠hatefulpineapple** on GitHub · 2026-11-29 19:20 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/54) `hatefulpineapple:pr/memory-hid` → `main` · +795 −23 · 7 files · 5 commits · closed without merging ## GPU memory - Pool: best-fit placement (tightest hole, exact fit first) so holes join into whole blocks the reclaim tick returns; resting pieces no longer counted as room. Measured problem: 1.1–1.9 GB free inside blocks while 24,000 textures (2.4 GB) spilled to PC memory (RTX 4070 SUPER, docs/findings.md). - `back_to_card`: gate at the room line instead of a tenth of the budget below it — steady play never reached the old gate, so L0 copies never came back. Overshoot still bounded by `line_for` headroom, `VICTORY_ROOM_REAL`, 64 MB/look. - Merged with the block-size / PACK experiments already on main; their diagnostics and `VICTORY_POOL_PACK` kept. ## Input - DS4 / DualSense / DualSense Edge over raw HID (VID 054C), USB + Bluetooth: report layouts, CRC and rumble per the kernel's `hid-playstation` driver. Touchpad click reads as View (the map). `VICTORY_HID_PADS=0`: XInput only. - No external emulator needed. ## Proof - Pool logic 8/8, HID parser 11/11 (Windows + standalone macOS harness). - Release built and tested on the Windows target (RTX 5070 Ti). - Runtime A/B (20-min sessions, `VICTORY_TEXTURES_BACK=0/1`) to follow.
- pool: best-fit placement keeps big ranges whole and lets holes join
  into whole blocks the reclaim tick can return; resting pieces are no
  longer counted as room, so the queue stops crediting holes it cannot
  take yet
- back_to_card: gate at the room line, not a tenth of the budget below
  it, which steady play never reached (11.3 GB used of an 11.0 GB
  budget, 24,000 textures stuck in PC memory); the line's own headroom
  and VICTORY_ROOM_REAL still bound what comes back

Measured on RTX 4070 SUPER, 2026-11-28 (docs/findings.md). Pool logic
tests 8/8 and gate tests 2/2 run standalone; Windows-target clippy
clean on the changed code. D3D12 paths need the target machine.
DualShock 4, DualSense and DualSense Edge reach the title without an
external emulator: report layouts, button bits, Bluetooth CRC and
rumble reports follow the kernel's hid-playstation driver. Pads take
the XInput slots left free, one reader thread each; VICTORY_HID_PADS=0
keeps XInput only.

Parser and report tests 10/10 on Windows and standalone on macOS;
release built on the target machine. Gyro, touchpad and adaptive
triggers are not read.
Titles bind their map to View, as the PlayStation layout binds it to
the touchpad; the click was dropped, so the map never opened. Share
keeps View too. The PS home button stays dropped.

Parser tests 11/11 on Windows and standalone; release rebuilt on the
target machine.
A gamepad alone does not reset the Windows idle timer, so a pad-only
session slept mid-game. The title's window thread now holds
ES_SYSTEM_REQUIRED | ES_DISPLAY_REQUIRED for as long as it lives; the
process's end clears it. VICTORY_KEEP_AWAKE=0: as before.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 02:23:51 +00:00
github-bot closed this pull request 2026-11-30 02:23:51 +00:00
Author
Owner

@⁠readmet3xt-lab on GitHub · 2026-11-30 02:14 UTC · original

Superseded by #59. The GPU memory part was ported earlier with credit (best-fit holes, the back-to-card gate); the Sony pads came in from #59 in c399996. Closing.

**@⁠readmet3xt-lab** on GitHub · 2026-11-30 02:14 UTC · [original](https://github.com/readmet3xt-lab/foxhound/pull/54#issuecomment-7266825203) Superseded by #59. The GPU memory part was ported earlier with credit (best-fit holes, the back-to-card gate); the Sony pads came in from #59 in c399996. Closing.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.