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

Open
opened 2026-11-24 00:49:13 +00:00 by Cattn · 0 comments
Cattn commented 2026-11-24 00:49:13 +00:00 (Migrated from github.com)
Contributor

Imported from ivall/xcl. Originally posted by Cattn on 2026-11-24T00:49:13Z.


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.

<!-- greyfinch-sync:ivall/xcl:issue:6572036006 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/issues/475). Originally posted by [Cattn](https://github.com/Cattn) on 2026-11-24T00:49:13Z. --- 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.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl#470
No description provided.