Skip to content

fix(vulkan): preserve guest mip levels in partial clears - #1084

Merged
hckrman101 merged 1 commit into
NotRexed:mainfrom
Trycky64:resubmit/vulkan-partial-clear-mip
Nov 9, 2026
Merged

hckrman101 merged 1 commit into
NotRexed:mainfrom
Trycky64:resubmit/vulkan-partial-clear-mip

Conversation

@Trycky64

@Trycky64 Trycky64 commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Update

Rebased this change onto origin/main at 8b2e1d3b895a5f890dcb886d904b62d6b38df2c7.

A partial clear resolves a guest mip to its physical image mip. The attachment view takes a guest mip and applies the skipped-level offset itself, so passing the already-resolved physical mip selected the wrong level. The partial-clear path now restores the guest mip before creating the view. Whole-level clears are unchanged. This change is independent of the buffer/image copy-span fix.

Validation

  • Windows targeted runner: the new mip-clear fixture and five related regression checks passed (6 passed, 0 failed).
  • Linux targeted runner: five checks passed (5 passed, 0 failed); the texture initialization barrier check passed separately with GCC because the runner's configured clang++ is unavailable. The new fixture passed with GCC AddressSanitizer and UndefinedBehaviorSanitizer.
  • Full Windows hookshot_vk.dll build passed: 276 seconds, zero compilation failures.
  • The full strict runner on this branch reported 116 passed, 7 failed, 12 skipped. A clean origin/main run reported 115 passed, 7 failed, 12 skipped. The same seven checks failed on both: nx2/test_nup_verify.py, nx2/test_nup_codec.py, nx2/test_mesh_first_types.py, nx2/test_nup_paths.py, tests/test_fps_overlay_order.py, tests/test_precompile_compute_guard.py, and tests/test_program_answer_domains.py. The added regression test passed; no additional failure was observed.

The fixture uses synthetic texture objects, instrumented view mapping, and Vulkan command spies. It does not execute a Vulkan driver. No real-GPU or in-game test was performed after the rebase.

This resubmission replaces PR #754, following the maintainer's request to rebase and reopen it. GitHub refused to reopen the closed original PR, so this contribution is submitted as a new independent PR.

@hckrman101
hckrman101 merged commit 7c8f753 into NotRexed:main Nov 9, 2026
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