d3d12: keep live SRVs intact during resource retirement #2671
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2679"
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?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T01:47:00Z.
Refs #2379. Corrects the opt-in descriptor rewrite introduced by #2579 and preserves the same-slot rebind behavior covered by #2468.
A live slot-18 view and each tracked descriptor copy hold the resource until explicit overwrite or heap teardown. The normal release path still waits for recording and queue holds. X2W_D3D12_RELEASE_RETIRED_VIEWS=1 now logs that the rewrite is disabled and enables the existing read-only retirement breakdown when base retirement and budgets are enabled.
The Windows Release fixture binds the original and copied descriptors after the last guest Release, including after the release fences and with a gated submission. It verifies nonzero GPU readback, overwrites the descriptors explicitly, checks retirement after discard or queue completion, and checks the recorded copy against its original texels. Coverage includes the legacy setting on and off plus a base-retirement-off control.
cmake --build --preset release --target startup_resource_retire_views startup_resource_retire startup_resource_retire_title startup_resource_retire_reasonsctest --preset release --no-tests=error -j 1 -R '^startup_resource_retire(_|$)' -Vpassed 26/26. No skips.python -B tests/docs_links_check.pychecked 512 links.The 20 GiB A/B in #2379 exercised the earlier experiment and remains a memory-pressure measurement. This change covers the checked descriptor and recording lifetimes. Independent code review is welcome.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-26T02:05:36Z.
239e727cintegrates main through #2649 and resolves the overlap in the retired-view helper. An explicit refused SRV still follows #2649’s null behavior. Retirement leaves a live slot untouched. Windows Release passed 31/31 without skips on WARP and RTX 4060 Laptop, including the resource-retirement, view-dimension, and existing diagnostics cases. Review and CI should use the updated head.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:16:36Z.
Review: COMMENTED
Review of head
3140649e(comment only).What I checked
retire_null_ready_views,retire_null_srv_desc,retire_views_stuck). Nothing else references them (git grepover src, tests, docs is clean).X2W_D3D12_RELEASE_RETIRED_VIEWS=1now only logs that it no longer clears descriptors and keeps the read-only budget breakdown. The normal release path and its queue/recording holds are untouched.tests/startup_resource_retire_views.cppbinds the original and copied descriptors after the last release, reads back GPU texels, overwrites explicitly, then checks retirement. CMake covers legacy-on, legacy-off and a base-retirement-off control (startup_resource_retire_views_noretire_*), warp and hardware.startup_resource_retire,_title,_reasonsare in the Win2025 selection.Commands run (Linux)
git diff --check origin/main...HEAD: cleanpython3 tests/docs_links_check.py: 523 links okpython3 tests/bidi_controls_check.py: okWin2025 WARP receipt follows separately.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:21:10Z.
Win2025 WARP receipt for head
3140649eafter updating with main.Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
3140649ef7128701ca6e8bebf99d007062749ac9:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_resource_retire_views -- -j 2):96.67s(configure4.77s)ctest --preset dev -R 'startup_resource_retire' --parallel 2 --no-tests=error --output-on-failure): 20/26 passed (2.17s:startup_resource_retire_warp_debug10.04s,startup_resource_retire_warp_debug00.32s,startup_resource_retire_off_warp0.28s,startup_resource_retire_hardware_debug10.04s,startup_resource_retire_hardware_debug00.15s,startup_resource_retire_off_hardware0.13s,startup_resource_retire_reasons_warp0.26s,startup_resource_retire_reasons_off_warp0.27s,startup_resource_retire_reasons_no_retire_warp0.09s,startup_resource_retire_reasons_hardware0.10s,startup_resource_retire_reasons_off_hardware0.08s,startup_resource_retire_reasons_no_retire_hardware0.07s,startup_resource_retire_title_warp_debug10.03s,startup_resource_retire_title_off_warp0.14s,startup_resource_retire_title_warp_debug00.25s,startup_resource_retire_title_hardware_debug10.04s,startup_resource_retire_title_hardware_debug00.13s,startup_resource_retire_title_off_hardware0.12s,startup_resource_retire_views_warp_debug10.04s,startup_resource_retire_views_warp_debug00.36s,startup_resource_retire_views_keep_warp0.28s,startup_resource_retire_views_noretire_warp0.12s,startup_resource_retire_views_hardware_debug00.13s,startup_resource_retire_views_hardware_debug10.04s,startup_resource_retire_views_keep_hardware0.11s,startup_resource_retire_views_noretire_hardware0.12s); skipped (capability, not a pass):startup_resource_retire_warp_debug1,startup_resource_retire_hardware_debug1,startup_resource_retire_title_warp_debug1,startup_resource_retire_title_hardware_debug1,startup_resource_retire_views_warp_debug1,startup_resource_retire_views_hardware_debug1/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_resource_retire_views -- -j 2):148.81s(configure3.93s)ctest --preset release -R 'startup_resource_retire' --parallel 2 --no-tests=error --output-on-failure): 20/26 passed (2.68s:startup_resource_retire_warp_debug10.03s,startup_resource_retire_off_warp0.33s,startup_resource_retire_warp_debug00.40s,startup_resource_retire_hardware_debug10.04s,startup_resource_retire_hardware_debug00.13s,startup_resource_retire_off_hardware0.14s,startup_resource_retire_reasons_warp0.29s,startup_resource_retire_reasons_no_retire_warp0.12s,startup_resource_retire_reasons_off_warp0.44s,startup_resource_retire_reasons_hardware0.11s,startup_resource_retire_reasons_off_hardware0.09s,startup_resource_retire_reasons_no_retire_hardware0.10s,startup_resource_retire_title_warp_debug10.04s,startup_resource_retire_title_off_warp0.22s,startup_resource_retire_title_warp_debug00.35s,startup_resource_retire_title_hardware_debug10.04s,startup_resource_retire_title_hardware_debug00.18s,startup_resource_retire_title_off_hardware0.11s,startup_resource_retire_views_warp_debug10.04s,startup_resource_retire_views_keep_warp0.38s,startup_resource_retire_views_warp_debug00.44s,startup_resource_retire_views_noretire_warp0.13s,startup_resource_retire_views_hardware_debug00.16s,startup_resource_retire_views_hardware_debug10.04s,startup_resource_retire_views_noretire_hardware0.13s,startup_resource_retire_views_keep_hardware0.20s); skipped (capability, not a pass):startup_resource_retire_warp_debug1,startup_resource_retire_hardware_debug1,startup_resource_retire_title_warp_debug1,startup_resource_retire_title_hardware_debug1,startup_resource_retire_views_warp_debug1,startup_resource_retire_views_hardware_debug1sccache: 93/136 hits; wall266.7sSix debug-layer cases skip (no debug layer on the VM); the other 20 pass in dev and release.
AI-assisted; commands listed were executed locally.