Repository navigation
Backlog
Description
claim: XSEmu's Resizable-BAR upload buffers (GPU_UPLOAD heaps for XCL's own staging buffers), opt-in, off by default
This is not from the VIctory line, so it does not fit #3011's list; I am posting it as its own issue and following #3011's claim rules (one claim, draft PR within 48 h, provenance header + THIRD_PARTY.md row, credit upstream). It is a port from an XCL fork.
- Upstream:
zortos293/XSEmu(GPL-3.0-or-later; an XCL fork) at0a91aa71a3a0913849e2ed5bbc632266a46521d0,crates/xcl/src/gpu/rebar.rs(first added in439a152322b297b7bb46c8e6e3de591a9844c3f0, author zortos293). The file arrives in a bulk "PC tree" sync commit, so it has no per-file history; I credit it to the repository and its author. - What it does: XCL's own buffers that the CPU only writes and the GPU only reads (the sparse windows' staging ring and zero buffer, the texture upload buffer) are created in
D3D12_HEAP_TYPE_GPU_UPLOAD(video memory the CPU writes through the BAR) instead ofUPLOAD(system memory), while the adapter's local budget has room: 1 GiB of headroom kept free, at most 512 MiB placed. Otherwise, or if the device refuses, they stay upload heaps. The title's own memory (the coherent window, sparse CPU side) and everything the CPU reads back stay where they are. I will make it opt-in (XCL_REBAR=1, off by default; upstream has it on). - XCL files (amd-dev,
7c795f5e): newcrates/xcl/src/gpu/rebar.rs(+ unit tests),crates/xcl/src/gpu/mod.rs,crates/xcl/src/gpu/texture.rs(buffer()and the staging pool),crates/xcl/src/hle/d3d12x/sparse.rs(staging_ptr,ensure_zero_buf), oneinitcall where the device is made,THIRD_PARTY.md,README.md(switch). Under ~400 changed lines. Program names, offsets and run names in upstream's comments and tests are left out. Not included: upstream's BAR-size probe through the configuration manager (diagnostics only) and its page-directory class (no counterpart on amd-dev). - Why this and not a duplicate: I checked the open PRs. D3D12.X: XCL_UMA_DRIVER=mixed keeps part of the coherent window in VRAM (nvidia-dev) #3005 / D3D12.X: XCL_UMA_DRIVER=mixed falls back without GPU_UPLOAD heaps and keeps console buffers in one segment (nvidia-dev) #3006 / D3D12.X: XCL_UMA_UPLOAD_PRIORITY=1 keeps a mixed window's GPU_UPLOAD segment resident (nvidia-dev) #3007 (Kalmarv, nvidia-dev) put the coherent window in
GPU_UPLOADheaps and D3D12.X: ~43x FPS over main on Series X (0.58 -> 25.3 fps, ~7x over #2844): XCL_UMA_DRIVER=mixed keeps part of the coherent window in VRAM #2938 (closed) did the same onmain; this leaves the window alone and moves the staging buffers. D3D12.X: XCL_UPLOAD_KEEP_MB sets the idle texture upload buffers kept #3050 only sets how many idle upload buffers are kept, D3D12.X: gate texture uploads on OOM back-off and commit headroom (XCL_UPLOAD_BACKOFF=1) #3037 is the upload back-off, D3D12.X: pool async upload command lists, raise staging item cap to 32 MiB, and lower parallel detile threshold #2989 pools upload lists and raises the staging item cap, D3D12.X: a stalled sparse upload retries its unsent chunks and reuses no busy allocator #2821 / D3D12.X: waits for the sparse queue do not hold the sparse state's lock #1385 touch the sparse waits. None createsGPU_UPLOADbuffers for staging;amd-devandmainhave no use ofGPU_UPLOADat all (git grep). D3D12.X: pool async upload command lists, raise staging item cap to 32 MiB, and lower parallel detile threshold #2989 and D3D12.X: a stalled sparse upload retries its unsent chunks and reuses no busy allocator #2821 touch the same functions, so I will rebase onto whichever lands first. - Gate: a one-off
CheckFeatureSupport(D3D12_OPTIONS16)on RX 7800 XT (RDNA3, Windows 11):GPUUploadHeapSupported = true. Before the PR I measure base against patch on that card (upload time per 2 s, presents, video memory against budget) and post the numbers; if the upload path does not get cheaper I will say so here and release the claim. - Draft PR: by 2026-11-29 21:00 UTC (48 h), against
amd-dev.
AI use: Claude Code, Claude Sonnet 5.5, read the upstream file and the XCL code and will write the port and its tests; a person runs the title measurement.
Metadata
Metadata
Assignees
Labels
No labels
Activity