Repository navigation
Conversation
|
[KEEP]
|
|
Independent verification on both GPUs (native Windows 11, validation on):
AI-assisted verification. |
|
RTX 3090 / 621.40, validation on: clears the device-teardown leak in d3d12_title_index_window, d3d12_title_vertex_window and xbox_geometry_upload_batch (main leaks 11, 11 and 20 objects, with this PR 0). Needs a trivial conflict resolve in d3d12_draw_test.cpp against current main. |
|
Independent RTX 4080 check of a local runtime-only adaptation of The full PR patch conflicted with this baseline. I moved only its two runtime additions to the corresponding sites: dropping the internal buffers' device back-reference and releasing the retained buffers before draining deferred destruction. Both builds used the baseline test code. MEASURED at device teardown (
All six selected CTest cases passed in both builds. The teardown logs distinguish the two runs. These results cover the local adaptation only. Validation of the full PR will require a separate run after it applies cleanly. Independent evidence review completed. AI-assisted: OpenAI Codex. |
Claimed in the coordination issue as: RT-TITLE-WINDOW-CLEANUP (#14).
What and why
Fix a COM reference cycle between the D3D12 device and its internally owned title-memory buffers.
The device retains buffers created by
make_title_buffer()intitle_buffers_, while each buffer retains a reference to the device. This prevents normal device destruction and resource cleanup.With Vulkan validation enabled, both
d3d12_title_index_windowandd3d12_title_vertex_windowpreviously passed despite reporting 11 leaked Vulkan objects each (VUID-vkDestroyDevice-device-05137).This PR:
xbox_geometry_upload_batch, previously relaxed in commit7be70a9f5.Tested
Built successfully using
scripts/build_runtime.ps1on Windows.With
LEONIDA_VK_VALIDATION=1:d3d12_draw: PASSd3d12_title_index_window: PASSd3d12_title_vertex_window: PASSxbox_geometry_upload_batch: PASSThe previously observed Vulkan object leaks were no longer reported after the runtime fix. All four tests also pass with strict device reference-count assertions enabled.
Additional targeted regression tests: 10/10 passed.
Full runtime CTest suite:
Tested against main
f78385646, with a successful conflict-free merge simulation against1cfc29af7. The newer merged tree has not been independently tested.GPUs tested
NVIDIA GeForce RTX 4070 SUPER (12 GB)
AMD, Linux and actual game execution have not been tested. XMA and SDL3-dependent GameInput coverage was unavailable in the local build.
AI-assisted
ChatGPT assisted with diagnosis, patch design, implementation, test selection and preparation of this PR. Compilation and tests were executed locally, and their actual outputs were reviewed.
Checklist
No shader translator changes.