Skip to content

fix(vk): capture switches follow the on/off rule - #2651

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
mooki000:fix/capture-switch-values
Nov 12, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
mooki000:fix/capture-switch-values

Conversation

@mooki000

Copy link
Copy Markdown
Contributor

What this is for: make the two capture-buffer switches follow the documented on/off rule, and restore the existing switch check (current main CI). What is measured: the affected game-free check before and after, with GCC 16.2.1 and Clang 23.1.3 selected, plus one strict full-suite run, as recorded below. Not measured: a game run or Windows execution.

Cause

#2437 added two presence-only reads of RX_VK_CAPTURE_KEEP_OLD and one of RX_VK_CAP_BLOCKS in gpu/vk/vk_memory.cpp; setting them to 0 therefore enabled the alternatives, contrary to hookshot_env.h and the existing test_env_on.py rule.

The relevant failure in main's CI log is:

FAIL: on/off switches still read as set-means-on (set to 0 they are on): use env_on:
  RX_VK_CAPTURE_KEEP_OLD (gpu/vk/vk_memory.cpp:937, gpu/vk/vk_memory.cpp:960)
  RX_VK_CAP_BLOCKS (gpu/vk/vk_memory.cpp:995)

What changed

Use the existing env_on helper at those three sites and document the switches in docs/development.md; defaults, enabled behavior, allocation policy and the test remain unchanged.

How it was tested

Recorded on 2026-11-11, Linux kernel 7.2.15-1-omarchy, base de866017, head 8d7f7d47 (version and test records).

  • Untouched main a016b7a6: the affected check fails independently in both compiler environments with the diagnostic above; the branch passes independently in both (python -I -B tests/run_all.py --strict --jobs 1 tests/test_env_on.py records).
  • The unchanged check rejects the three original reads on main with both compilers; its C/C++/Python truth table passes on the branch, including unset, empty, 0, false, off and no (standalone records).
  • One full python -I -B tests/run_all.py --strict: 456 passed, 14 failed, 20 skipped in 139 s (linux, 32 at once), load 17.65 → 26.92 (complete suite output).
  • That run's remaining failures are: test_wayland_libdecor_hint.py, test_display_startup_failure.py, test_texel_buffer_ownership.py, test_audio_aux.py, test_audio_biquad.py, test_dlss_checks.py, test_framegen_preset.py, test_hdr_encode.py, test_linux_docker_packages.py, test_menu_i18n.py, test_mods_size_table.py, test_mouse_native.py, test_readback_part.py, test_rumble_menu.py (complete suite output). The companion fixture, PPA-parser, camera-handover and hint-catalog branches address their separate causes; feat(vk): FSR 3.1 on the chain keeps the game's native HDR highlights #2614 owns the HDR check and is not duplicated here.

Not tested / risks

The deliberate behavior change is for values that explicitly mean off; no Vulkan allocation or game run was performed, so allocation timing and hardware behavior are not measured.

Overlaps

The inspected same-file code changes merge cleanly; #2338 and #2618 add different documentation rows at the same insertion point, so those rows and this one must be retained together (recorded overlap hunks).

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra noreply@openai.com

Use env_on for the three presence-only reads introduced by NotRexed#2437. Zero, false, off and no now leave the capture alternatives disabled, as documented; defaults and enabled behavior stay unchanged.

Assisted-by: GPT-6 Astra
Co-Authored-By: GPT-6 Astra <noreply@openai.com>
@hckrman101
hckrman101 merged commit 1101a8e into NotRexed:main Nov 12, 2026
9 of 13 checks passed
NotRexed added a commit that referenced this pull request Nov 12, 2026
`test_hdr_encode` still fails on main: DLSS's `TemporalEngine` gained
two fields after `hdr` (#2574), and the check looked for the list ending
there. It now matches the fields it means, whatever follows them. The
rest of #2660 landed separately (#2651, #2652, #2654), so #2660 is
closed in favour of this.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
notquiteog added a commit to notquiteog/Hookshot that referenced this pull request Nov 12, 2026
…seeded, V-Sync Auto with DLSS Frame Gen, NotRexed#2746)

Upstream fixed most of what e3f076a fixed here (NotRexed#2648, NotRexed#2651, NotRexed#2652, NotRexed#2653, NotRexed#2654,
NotRexed#2661), so the conflicts are resolved to upstream's versions: its fixtures, its
menu_i18n.h, its mouse_native.c, and its dlss_checks.h with the two-pixel tolerance it
chose and tests. Kept from the fork: the fixtures' framegen_by_pick stand-in, and
vk_texture.cpp's typed min.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Joey-Magnus added a commit to Joey-Magnus/Hookshot that referenced this pull request Nov 12, 2026
- docs/development.md: main rewrote the RX_VK_VRAM_MB row (the budget in MiB, counted by
  blocks, NotRexed#2624; the integrated GPU's caps, NotRexed#2603) and added the RX_VK_CAPTURE_KEEP_OLD row
  above it (NotRexed#2651). Kept main's rows as they are and this branch's RX_VK_KEEP_RESAMPLED_MB
  row right after the budget's, as before.
- gpu/vk/vk_texture.cpp merged without a conflict. Main's changes to the eviction pass (the
  textures that go kept in a set, the 97% squeeze held off while the pool is down to its
  blocks made at the start, the integrated GPU's budget, the drawn write-back) leave the keep
  rules as they were: keep_resampled still comes before the compaction hold, its age line is
  still vram_compact::kReserveUnused (strict), its pre-pass still tests the flags before the
  overlap scans, and resampled is still cleared at both places released goes back to false.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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