Repository navigation
Conversation
…SLOT133-STANDIN-LEAK)
The 57-63 Vulkan objects reported at vkDestroyDevice (VUID-vkDestroyDevice-device-05137) after a slot 133
placement were the test's, not the runtime's. d3d12test::Ref had no assignment operator of its own, so
`placed = {};` (PR ProjectLeonida#1558's check_d16s8_refused_uav) copied a null pointer over the reference without
Release: the placed texture, and through its device reference the whole D3D12 device, outlived the test.
Ref now has a move assignment that releases what it held, a move constructor, and deleted copies (two Refs
on one reference release it twice). Nothing on main copies a Ref or assigns `{}` to one.
xbox_slot133_teardown places, through slot 133 on the Vulkan device behind the proxy, a 1280x720
format-118 depth target without UAV, a 256x256 RGBA8 texture, an RGBA8 render target and a buffer; drops
each with `= {}`, checks the proxy's reference count is back where it was, releases the device and reads
the validation error count only after vkDestroyDevice. With the old Ref it fails ("keeps 3 after
release"); with this one it passes, plain and with LEONIDA_VK_VALIDATION=1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Reviewed 573c918: the slot-133 teardown test and the D3D12 COM targets are MSVC/Windows-only, so they were not built or run here; its referenced symbols all check out against main's headers and the CMake registration matches the neighbouring xbox_gpu_label_test block. The header logic this PR changes is verified: a standalone arm64-Linux probe compiling Ref's special members verbatim (plus a sweep of all 46 files that include d3d12_test_shaders.h) shows Recommendation: Merge |
|
RTX 3090 / 621.40, validation on: clears the device-teardown leak in xbox_d16s8_refused_uav (main leaks 74 objects, with this PR 0). xbox_slot133_teardown is also clean. |
ProjectLeonida#1758 makes the same d3d12test::Ref change (move-only, `ref = {}` releases). Keep this pull request to the slot 133 teardown test, which depends on that change. AI-assisted (Claude Code).
= {}; slot 133 teardown test (RT-SLOT133-STANDIN-LEAK)|
Housekeeping: adrianmjim's #1758 makes the same |
Claimed in the coordination issue as: RT-SLOT133-STANDIN-LEAK (#1608)
Depends on: #1758
What and why
The finding in #1608 (and adrianmjim's run on #1558): after a slot 133 placement,
vkDestroyDevicereports 57-63 objects that were never destroyed (VUID-vkDestroyDevice-device-05137) underLEONIDA_VK_VALIDATION=1. The leak comes from the test helper, not the runtime.d3d12test::Refhad no assignment operator of its own, soplaced = {};copied a null pointer over the reference and never calledRelease. The placed texture kept its reference to the device proxy, and the whole D3D12 device was still alive atvkDestroyDevice. I took the runtime's slot 133 paths one at a time (provider refusal → host-address texture → committed stand-in) and none holds a reference after release.adrianmjim's #1758 (TEST-REF-MOVE-ONLY) makes the same
Refchange: move-only, andref = {}releases. It is equivalent to the change this pull request first carried, so that part has been reverted here (in a new commit; the history is unchanged), and theReffix is left to #1758. This pull request now only adds a regression test for slot 133 teardown.The new
xbox_slot133_teardowntest needs no game files. Through slot 133 on the Vulkan device behind the proxy, it places:It drops each one with
= {}and checks that the proxy's reference count is back where it was. Then it releases the device and reads the validation error count only aftervkDestroyDevice.Tested
NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11, MSVC, Ninja RelWithDebInfo. Branch with current
main(a73a57e) merged in.ref = {}releases (TEST-REF-MOVE-ONLY) #1758'sd3d12_test_shaders.h(head a8a56cb; it differs frommainonly inRef):xbox_slot133_teardownpasses plain and withLEONIDA_VK_VALIDATION=1, with no VUID reported.Reffix (this branch on its own): it fails, with VUID-vkDestroyDevice-device-05137 for the objects of the device that is still alive. So this pull request should merge after test: d3d12test::Ref owns its pointer alone: move only, andref = {}releases (TEST-REF-MOVE-ONLY) #1758.Refchange, the wholectestpassed (403/403) and d3d12_xs: make a D16S8 depth texture without UAV when the depth provider refuses it (RT-D16S8-UAV-NVIDIA-FALLBACK) #1558's test was clean under validation.check_no_game_data.pyon the changed files is clean. The game was not run.GPUs tested: NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11
AI-assisted: yes (Claude Code)
Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a)🤖 Generated with Claude Code