Repository navigation
Conversation
|
Regression run on this head fails the merge gate (RTX 2070 SUPER, the retail game, 60 s,
The gate is at least 80 % of Likely cause, from the diff (not yet confirmed by a trace): I have stopped work on this PR until the author decides how to go on. Rerun (same settings, interleaved main / this head / main / this head in one queue job; CPU load 2–3 % and no build processes at the start and end of every run, so not background load):
The regression reproduces: about 55 % of — Claude Code (Claude Opus 5.5), on behalf of the PR author |
|
Regression confirmed: on two more interleaved runs on an idle machine this head showed about 55 % of The author is now investigating exactly why it is slower: which of the title's — Claude Code (Claude Opus 5.5), on behalf of the PR author |
1664d4b to
c5aff7a
Compare
|
Cause found and fixed in
— Claude Code (Claude Opus 5.5), on behalf of the PR author |
Decode the flags word for XCL_TRACE_MEM and the address-limit diagnostic. Keep the existing XAllocAttrs-based allocation type so the test title's legacy graphics requests still land in UMA. Interpreting bit 0x2 as MEM_GRAPHICS sent retail large heaps to sparse VRAM and regressed smoke. The focused tests cover flag decoding and both allocation cases. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Assisted-by: Codex (exact model unavailable)
c5aff7a to
599bf81
Compare
|
Additional call-site evidence supports keeping these arguments separate: Microsoft’s Xbox GDK FSR3 sample builds the third This sample supports treating the page-size/type and flags arguments as distinct contracts. It does not establish the numeric AI-assisted. |
|
#3353 is stacked on this PR (it carries this commit AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
Status: a guess that needs evidence before it can be merged. Reading XMemVirtualAlloc's 4th argument as a flags word is reasoned from how titles call the API and from the PC's D3D12; it is not taken from any console documentation, and no title has confirmed it yet. Draft until then.
Evidence that would confirm it:
XCL_TRACE_MEM=1logs every call's decoded flags with its result; titles' words and what they then do with the memory settle the meaning of each bit. No bit is acted on yet (see below).If you run a title that gets there, please post those lines here (not the whole log, which names your paths).
XMemVirtualAlloc's 4th argument looks like a flags word, not an allocator's XALLOC_ATTRIBUTES. This PR decodes it as flags, for a trace and for a log of the address limits it can ask for. It changes no allocation:main's routing is kept as it is (the XAllocAttrs decode: MEM_GRAPHICS from a graphics memory type in bits 29–32, 0x8000_0000 for a page-size field of 2; the test title's check that a graphics memory type lands in UMA depends on it), andtypeandprotectotherwise go toVirtualAllocas given. Placing memory below an address limit is left to a second PR.Why the flags are not acted on: an earlier revision (
1664d4bb) added MEM_GRAPHICS on bit 0x2. The retail game sets it on its big committed large-page heaps (about 4.6 GB), which then went to the sparse VRAM pool instead of the coherent window: 640, 705 and 707 frames againstmain's 1297, 1259 and 1316, at about +9.5 GB peak commit (see the comments). A later revision (c5aff7ad) removedmain's attribute routing instead, which broke the test title's UMA check. Whether a console title's graphics bit should make memory GPU-visible needs a design for where such heaps go; it is not done here.What the retail game asks for: in the regression run below it makes one address-limited request, flags 0x7 (CPU, graphics, below 4 GiB) for 0xb900000 bytes, and gets 0x44c610000, above the limit (
mem: XMemVirtualAlloc asks for an address below 0x100000000 (flags 0x7): 0x44c610000 + 0xb900000 is above it: not placed yet). It runs regardless; whether it depends on that memory being low is not known.What is in it
crates/xcl/src/hle/kernelx.rsVirtualAllocFlags:limit()gives the first address the memory must stay below.trace_virtual_alloc_flags: logs every call, decoded, underXCL_TRACE_MEM; logs one line per run, unconditionally, for the first request with an address limit, with whether the returned address fits.XMemVirtualAlloc: the allocation as onmain, then the trace.README.md:XCL_TRACE_MEMalso logs eachXMemVirtualAlloccall's decoded flags.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4on599bf81a(built onmain10d27297; it merges into the currentmain7db2f391without conflict): 2155 passed, 0 failed, 48 ignored, 25SKIPPEDlines (21 no wave64, 3 gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426, 1 no heap windows). The e2e test title tests pass, including its graphics-memory-in-UMA check.kernelx::tests, ok in that run:virtual_alloc_flags_decode;virtual_alloc_graphics_flag_keeps_the_type: a committed heap with word 0x283 is not in the GPU-visible pool (fails on1664d4bb);virtual_alloc_preserves_legacy_graphics_routing: a word with memory type bit 29 lands in UMA, as onmain(the test title's check of the same thing failed onc5aff7ad).Regression run
Both 60-second runs started from copies of the same DXIL cache, with
XCL_PREPARE=0andXCL_PRESS_AT=25:A.The
mainrun is on a newermainthan the PR's base (10d27297).Not tested
maindoes).XCL_PREPARE=0.AI use
1664d4bbregression to the graphics bit.main's routing in599bf81a, addedvirtual_alloc_preserves_legacy_graphics_routing, and ran the suite on this head.🤖 Generated with Claude Code