mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-26 21:30:53 +01:00
[PR #1100] [CLOSED] tests: verify placed attachment backing at submission (RT-PLACED-IMAGE-DEFER) #1137
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#1137
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/1100
Author: @Moriz82
Created: 11/24/2026
Status: ❌ Closed
Base:
main← Head:split/rt-placed-image-defer📝 Commits (1)
c92dc97tests: verify placed attachment backing at submission (RT-PLACED-IMAGE-DEFER)📊 Changes
1 file changed (+16 additions, -4 deletions)
View changed files
📝
runtime/test/d3d12_existing_heap_test.cpp(+16 -4)📄 Description
Rebased onto
5129be10. #984 brought deferred slot-133 backing and the first-use fixture into main. This PR now retains three assertions from the original split. All four retry callers must succeed, an equivalent committed image must already have backing, and closing the command list must leave allocation deferred until submission in the default mode. The original test report is below. Onc92dc976,d3d12_existing_heappassed 1/1 with deferred backing and 1/1 withLEONIDA_PLACED_IMAGE_DEFER=0under Wine 11.22 on an RTX 4070 (NVIDIA 620.73.04). Both runs cover the four retry callers, the committed control, the backing check after close, and the 128-pixel readback.Claimed in the coordination issue as: RT-PLACED-IMAGE-DEFER (claim).
Part of the split of #984 into small pull requests.
Depends on: none
Overlaps: #1079 resolves shader views of live placements by address. This change uses the existing slot-133 placement path on main. Streamed sources and shared BC backing are tracked separately.
What and why
Slot 133 allocated private Vulkan memory for every placed render target, depth/stencil target and storage texture, including attachments that only received a logical descriptor. On a device with a limited memory budget, unused attachments compete with active ones.
The image and its format and layout metadata still exist at creation. The runtime binds memory on the first command replay, shader view or CPU subresource copy that needs the image. Concurrent callers share one successful bind. A failed allocation or bind can be retried, and a failed bind releases its unused allocation. Set
LEONIDA_PLACED_IMAGE_DEFER=0for eager allocation.Tested
Release cross-build with clang-cl 23 and an xwin SDK. Commands use a configured build directory.
PROTON_WINEnames the Wine executable andWINEPREFIXselects the test prefix.Both targets built. The existing-heap test passed twice on the same binary. Each run used a 16 × 8 RGBA8 render target placed at a reserved, inaccessible address.
GPUs tested: NVIDIA GeForce RTX 4070 12 GB, driver 620.73.04, CachyOS kernel 7.3.5, Proton Experimental (Wine 11). Native Windows, AMD, Intel and a game boot were not tested on this child. The optional XMA decoder was omitted from the cross-build because its Rust target was unavailable.
AI-assisted: yes.
Checklist
3aa975421.python3 -I scripts/check_no_game_data.py.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.