Skip to content

D3D12.X: a command list is forgotten after the runtime frees it, so a new list at its address can lose its state #2690

Backlog

Description

@SergeAx

real::cl_release (hle/d3d12x/real.rs) drops what XCL keeps by a PC command list's address (list_x::on_release with alloc_pool::forget_list, bind::forget, dred::forget_list) only after the runtime's final Release has freed the list. A list made on another thread in between can get the same address and lose its own entries: its bind state (pipeline, allocator, unified-memory blocks), its allocator and last submit in alloc_pool, and its DRED marks.

title_list::release does the same with a longer window (#1453 removes that one), and so does pso_release for pipelines (#2422).

Found on

  • NVIDIA GeForce RTX 5080, driver 621.14; Windows 10 22H2 (19045.6466), Agility SDK 1.620.2; main b49be183, debug

Measured

Plan
As in res_release and #2422: on the last reference (AddRef says 2), cl_release forgets the list before the runtime's final Release. When two last-but-one releases happen at once, both miss being the last, and the list is forgotten after its release, as before. That test becomes the regression test.

AI use: found with Claude Code (Claude Opus 5.5), which ran the measurements above and wrote this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions