Repository navigation
Conversation
Contributor
|
[KEEP]
|
Contributor
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.