Skip to content

D3D12.X: a title texture's pages can be unmapped while submitted draws still sample it (#288) #475

Backlog

Description

@Cattn

From a static review (no builds or runs) of 2997c9a:

This follows up on #288. unmap_superseded enqueues tile removal on XCL's separate mapping queue. The existing fence wait orders later title submissions after mapping changes, so removal can still race with previously submitted draws that sample the texture. This is a GPU-ordering bug, and I found no indication of malicious code.

Defer the unmap until fences from the queues that used the texture confirm its last GPU use has completed.

https://github.com/ivall/xcl/blob/2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21/crates/xcl/src/hle/d3d12x/vram.rs#L505-L519
https://github.com/ivall/xcl/blob/2997c9aca6ebf4577fed34ebdb3cb0a77dd9ec21/crates/xcl/src/hle/d3d12x/vram.rs#L564-L576

Review by Claude Code (Claude Opus 5.5) with a gpt-6.2-sol audit subagent; I checked each point against the code.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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