d3d12: destroy raw-texture image views at device teardown #2184

Open
github-bot wants to merge 1 commit from github-bot/gh-2184 into main AGit
Owner

@⁠ammonium231 on GitHub · 2026-11-26 03:05 UTC · original
ammonium231:fix-raw-2d-imageview-leak → main · +10 −2 · 1 files · 1 commits · draft

set_raw_image_address never registered the title VA, so ~Resource did not forget the views and xbox_raw_2d_stripes and xbox_raw_2d_surface leaked 2 VkImageViews each (VUID-vkDestroyDevice-device-05137).

Claimed in the coordination issue as: RT-RAW-2D-IMAGEVIEW-LEAK

Depends on: none

Fixes: VUID-vkDestroyDevice-device-05137 in xbox_raw_2d_stripes and xbox_raw_2d_surface (no standalone issue).

What and why

set_raw_image_address overwrote image_address_ without note_image_address, so ~Resource skipped forget_image. It now registers the title VA the same way as place_at_title_address.

Tested

LEONIDA_VK_VALIDATION=1 after rebase onto 0b11d86bc: xbox_raw_2d_stripes and xbox_raw_2d_surface still 2 leaked VkImageViews to 0. Full ctest 472/475; xbox_present and d3d12_set_descriptor_heaps also fail on unpatched main; xmem_no_write_watch failed once under -j 4 and passed twice isolated.

GPUs tested: NVIDIA RTX 3090, driver 621.40, Windows 11

AI-assisted: yes

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed.
**@⁠ammonium231** on GitHub · 2026-11-26 03:05 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/2184) `ammonium231:fix-raw-2d-imageview-leak` → `main` · +10 −2 · 1 files · 1 commits · draft set_raw_image_address never registered the title VA, so ~Resource did not forget the views and xbox_raw_2d_stripes and xbox_raw_2d_surface leaked 2 VkImageViews each (VUID-vkDestroyDevice-device-05137). Claimed in the coordination issue as: RT-RAW-2D-IMAGEVIEW-LEAK Depends on: none Fixes: VUID-vkDestroyDevice-device-05137 in xbox_raw_2d_stripes and xbox_raw_2d_surface (no standalone issue). ### What and why set_raw_image_address overwrote image_address_ without note_image_address, so ~Resource skipped forget_image. It now registers the title VA the same way as place_at_title_address. ### Tested LEONIDA_VK_VALIDATION=1 after rebase onto 0b11d86bc: xbox_raw_2d_stripes and xbox_raw_2d_surface still 2 leaked VkImageViews to 0. Full ctest 472/475; xbox_present and d3d12_set_descriptor_heaps also fail on unpatched main; xmem_no_write_watch failed once under -j 4 and passed twice isolated. GPUs tested: NVIDIA RTX 3090, driver 621.40, Windows 11 AI-assisted: yes ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed.
set_raw_image_address never registered the title VA, so ~Resource did not forget the views and xbox_raw_2d_stripes and xbox_raw_2d_surface leaked 2 VkImageViews each (VUID-vkDestroyDevice-device-05137).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 10:21:36 +00:00
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/2184/head:github-bot/gh-2184'
git switch 'github-bot/gh-2184'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-2184'
git switch 'github-bot/gh-2184'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-2184'
git switch 'github-bot/gh-2184'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-2184'
git switch 'main'
git merge --squash 'github-bot/gh-2184'
git switch 'main'
git merge --ff-only 'github-bot/gh-2184'
git switch 'main'
git merge 'github-bot/gh-2184'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.