[PR #2184] d3d12: destroy raw-texture image views at device teardown #2188

Open
opened 2026-11-26 21:20:20 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/2184
Author: @ammonium231
Created: 11/26/2026
Status: 🔄 Open

Base: main ← Head: fix-raw-2d-imageview-leak


📝 Commits (1)

  • ee0aa61 d3d12: destroy raw-texture image views at device teardown

📊 Changes

1 file changed (+10 additions, -2 deletions)

View changed files

📝 runtime/shims/d3d12_vulkan_device.cpp (+10 -2)

📄 Description

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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/2184 **Author:** [@ammonium231](https://github.com/ammonium231) **Created:** 11/26/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-raw-2d-imageview-leak` --- ### 📝 Commits (1) - [`ee0aa61`](https://github.com/ubiquitarianism/leonida/commit/ee0aa61a8249293c0e633deea2ac06cd73e5a911) d3d12: destroy raw-texture image views at device teardown ### 📊 Changes **1 file changed** (+10 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `runtime/shims/d3d12_vulkan_device.cpp` (+10 -2) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
starred/leonida#2188
No description provided.