Refresh CPU-backed shader inputs between fenced submissions #1103
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1110"
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-24T01:10:10Z.
Refs #874, #870.
cpu_srv::refreshupdates an existing upload range for a stable shader-resource view. The caller serializes updates and submits, holds the CPU input stable during the copy, and supplies the fence point covering prior GPU readers. Unreadable input and an unfinished fence preserve the live data. The fixture uses the sameR16_UINTview for both compute dispatches.On Windows build 26200, RTX 4060 Laptop driver 32.0.16.1656 and WARP 10.0.26100.9818 passed all four Release tests with the D3D12 debug layer enabled, zero warnings, zero errors and zero skips. The second readback changes from
1398 2467to8765 fe01after refresh. Skipping the refresh preserves the original pair. Rejections include an incomplete fence, a write extending beyond the endpoint, an overflowing offset and an unreadable source.This PR covers the source-built shader input and its CPU/GPU handoff. Diagnostic runtime integration is tracked in #870.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-24T02:15:43Z.
Review: COMMENTED
Reviewed at
9f23be2b232f96c9e48edb90c4cb9b97fb47bcdf.cpu_srv::refreshinsrc/cpu_srv_upload.hvalidates inputs, buffer dimension, overflow-safe bounds (bytes > desc.Width - destination_offset),D3D12_HEAP_TYPE_UPLOAD, and fence completion (UINT64_MAX->DXGI_ERROR_DEVICE_REMOVED,done < previous_value->DXGI_ERROR_WAS_STILL_DRAWING). Staging viaReadProcessMemorybeforeMap/memcpy/Unmapensures an unreadable source page fails without altering the upload buffer (minor note: per-call heap allocation +ReadProcessMemoryis great for safety here, though worth keeping in mind if ever used on a hot path).check_cpu_srv_refreshintests/descriptor_window_submissions.cppcovers both refresh and--cpu-srv-staleplus the negative cases.python3 -B tests/docs_links_check.py(15 files, 246 links),python3 -B tests/bidi_controls_check.py(929 files),python3 -B tests/gpu_report_format_check.py(10 tests), andpython3 -B tests/xgameruntime_table_check.py— all passed.gh pr checks 1110shows all 4 Windows/Linux checks passed (publish skipped); Windows MSVC/WARP/hardware execution is covered by CI.Imported from R0Y00/Xbox2Windows. Originally posted by Toons29 on 2026-11-24T02:02:55Z.
Tested
9f23be2bon an AMD Radeon RX 9070 (RDNA 4,1002:7550), driver32.0.32029.2010, Windows 11 build 26300,devpreset, debug layer unavailable: passAll 4 pass with no skips.
cpu_srv_refreshreads00001398,00002467after fence 1 and00008765,0000fe01after fence 2 on both the RX 9070 and in-box WARP.cpu_srv_stalekeeps00001398,00002467after fence 2 on both, as expected.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T12:28:58Z.
Resolved the CMake conflict at
4ca3c951by retaining the CPU SRV and startup sampler shader registrations. Windows Release: 12/12 CPU SRV refresh/stale, descriptor-window, and startup sampler cases passed on RTX and WARP, with no skips.