You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RR retain records a copy before it checks for ID3D12GraphicsCommandList2 #65
retain_locked (clean/rr_f/runtime/src/rr_runtime.cpp:3480) creates the transient copy resource and records CopyResource or CopyTextureRegion plus barriers into the game's list. Only after that does it query the list for ID3D12GraphicsCommandList2 (:3524), which it needs for the completion marker.
If the query fails, it skips the marker write and the rt.serial increment, and still returns WG_OK. Later release_transient_locked (:3538) calls defer_release(r, rt.serial). If the last frame serial has already completed, the copy is released at once, while the recorded copy is still pending on the list.
Evaluate rejects a list without List2 (:2416). Retain does not.
When it can happen
Very rarely. Command lists from the D3D12 runtime have answered the List2 query since Windows 10 1703. Only a third-party wrapper or interposer layer that exposes just the base interfaces would fail, and the caller would also have to release the transient before the list runs.
Found by reading the code. It has not been reproduced.
To do
Move the List2 query to the top of retain_locked.
If it fails, return WG_E_INVALID_PARAMETER before creating or recording anything.
Test
Wrap a WARP command list in a COM shim that refuses IID_ID3D12GraphicsCommandList2. Call retain and expect an error with live_resources unchanged. This needs a test seam, because set_device currently requires an RDNA 4 adapter (:148). Without that seam, a code check is enough for this reorder.
Related: #63 (also an early release of an object a recorded list may use).
Activity
RR runtime: retain checks for ID3D12GraphicsCommandList2 before it re…