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

Open
opened 2026-11-26 04:22:50 +00:00 by github-bot · 0 comments
Owner

@⁠Cattn on GitHub · 2026-11-24 00:49 UTC · original

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.

github.com/ivall/xcl@2997c9aca6/crates/xcl/src/hle/d3d12x/vram.rs (L505-L519)
github.com/ivall/xcl@2997c9aca6/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.

**@⁠Cattn** on GitHub · 2026-11-24 00:49 UTC · [original](https://github.com/xcl-dev/xcl/issues/475) 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:22:50 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.