runtime: apply the console value writes after the submission that carried them (RT-LIST-WRITE-VALUE) #622
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
missing claim
needs rebase
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ubiquitarianism--leonida!622
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/622/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@Mby159 on GitHub · 2026-11-24 10:03 UTC · original
Mby159:fix/rt-list-write-value→main· +564 −6 · 15 files · 6 commits · merged 2026-11-25 11:48 UTCClaimed in the coordination issue as: RT-LIST-WRITE-VALUE
What and why
Console list slots 71 and 72 (
Write32BitValueBottomOfPipeXandWrite64BitValueBottomOfPipeX) were dropped: the list proxy took thekListNotForwardedbranch and returned 0, so the value never reached the title memory and the console counter the title watches never moved.This pull request records the write on the list proxy, collects the records when the queue proxy submits the lists, and applies the value into the title memory after that submission has completed on the GPU, in submission order. The console writes the value at the bottom of the pipe; here the CPU writes it once the queue timeline says the submission is done, so a later submission on the same queue sees it.
Where the bytes land. The console address is resolved in two cases that are genuinely different:
arena.mapped + va, the same bytes the GPU reads. A sparse resource is refused, because the sparse pass binds its memory elsewhere.The write channel that was missing. The console VA being a host address was not enough: xmem commits its physical pages on first touch, and two of the measured windows are
PAGE_NOACCESSfor the CPU. There was no CPU write path into the xmem pages at all (commit_physical_rangeonly commits,host_atin the Vulkan backend is read-only, and itshostpointer is null for DEFAULT/READBACK). The newrt::xmem::write_title_bytescommits the physical range and then writes through the section own host mapping for a physical page (writable even where the title view isPAGE_NOACCESS), or through the window bytes when the range is not one of the xmem pages, after aVirtualQueryprotection check so a GPU-only window is refused instead of faulting.New files:
runtime/src/xs_value_writes.h(the record the layers share and the function that applies a batch),runtime/test/xs_value_writes_test.cpp(a CPU test with a byte-array model, no game data) andruntime/test/xs_value_writes_handover_test.cpp(the hand-over from the queue proxy to the queue that submits, Windows-only).Depends on: none. #577, which shares
runtime/src/vulkan_backend.h, is merged, and this branch is rebased ontomainatd0da7dad.The shape after the review
@V6ser asked for this to be less indirect. It is now:
std::vector<ValueWrite>; there is no log class;runtime/src/vulkan_backend.h; there is no queue helper class;runtime/shims/d3d12_xs_device.cpp; it is no longer in the shared header.runtime/src/xs_value_writes.his the record and the function that applies a batch, and the xmem write the D3D12 layer needs moved toruntime/shims/xmem.h, next to the shim that owns it. The change against the previous headd149020ais 11 files, +247/-295.The hand-over is still per thread, and that is deliberate: the console list proxy is in the Xbox-ABI shim layer and the queue that submits is in the COM layer,
ID3D12CommandQueue::ExecuteCommandListscannot carry the records in its signature, and the proxy cannot call into the COM layer because about twenty test binaries compileruntime/shims/d3d12_xs_device.cppon its own (xs_proxy_mock_test,root_sig_test, thed3d12_*_testtargets).One defect found while reshaping this and fixed: the batches were pushed by the submitting thread and popped by the completion thread with no lock. They are under one now.
The hand-over must not need a TLS guard
The hand-over's buffer is reached through a constant-initialized
thread_localpointer, and the vector behind it ismade on first use. A thread_local that needs a dynamic initializer or a C++ destructor is not usable in this tree:
the runtime runs with "zero
_Init_thread_headerTLS guards or C++ thread_local destructors"(
runtime/shims/com_shim.cpp), and every other thread_local in the tree is a plain POD for that reason - the boolin the xmem shim, the bool in the startup trace, the POD array in the PE loader.
The title's own threads reach the CRT's
_register_thread_local_exe_atexit_callbackon their way out, and with adynamically initialized thread_local in the process that path terminates the process: @DesertGamer measured
0xC0000409at startup on the retail package, with the stackabort <- terminate <- register_thread_local_exe_atexit_callback <- game_thread, and their constant-initializedpointer experiment does not abort. The earlier heads aborted for the same reason: their staged records were a
static thread_localwith astd::vectorinside, one layer down inruntime/src/xs_value_writes.h.What I tested
xs_value_writes_test:the console's value-write slots record and apply their writes, exit 0 (built with the MinGW clang and run here).runtime/src/vulkan_backend.hcompiles on its own (clang++ -fsyntax-only, llvm-mingw 20261117), andruntime/shims/xmem.cppis syntax-clean with the change.runtime/shims/d3d12_xs_device.cpp: syntax-only compile reports two errors, both pre-existing and environmental:ID3D12GraphicsCommandList8is not in this machine's MinGWd3d12.h.python -I scripts/check_no_game_data.pyover all 12 changed files: exit 0, no output.ctest --test-dir runtime/build -C Release: 71 of 72 pass, 2 skipped (shader_library_corpus,vk_sync_validation- they need game data or a GPU). The one failure isvk_queue_query_sync, a known flake: on the pristine upstream tree at the same commit it fails 2 of 5 direct runs, on this tree 3 of 8. It is not caused by this change.Hardware: Windows 11 x64 (10.0.29712), Python 3.13, llvm-mingw 20261117. No game files, no GPU, no network.
Not verified here
runtime/shims/d3d12_com.cppandruntime/shims/d3d12_vulkan_device.cppare not compile-checked as whole files: they need the SDKd3d12.hand the generatedd3d12_stubs.h, and the MinGW header is older and structurally different, so the repository stub generator cannot run on it. The CI build with MSVC and the Windows SDK is still required.xs_proxy_mock_testis Windows-only and was not run. The mock infrastructure is unchanged, but the mock queue and list proxies now carry a plain vector of records.Gaps I would like a ruling on
gpu_timestamp()uses the DEVICE domain ofVK_EXT/KHR_calibrated_timestamps, the same clockGetClockCalibrationanswers with. On a device without it the function returns 0, the write is skipped, and the counter this item is about would still not advance. Flag 2 (system clock, QPC) and flag 0 (the value) work everywhere. This is the largest functional gap.PAGE_NOACCESSGPU window). Such a write is dropped and reported once on stderr.flushargument (the third one) is not interpreted; every write is applied after the submission.Attribution and licensing
The argument shapes are the facts xcl measured; the slot numbers are measured on the retail title and in the shipped BVH builder (section 3.3a of the document); the deferred bottom-of-pipe write model follows VIctory. Both projects are cited for facts and for the model only, no code copied: xcl is GPL-2.0-only and VIctory is GPL-3.0-only, and the attribution is in
runtime/src/xs_value_writes.h, in the new paragraph ofdocs/d3d12_command_objects.mdand in that document section 8.1 licence note.docs/related_projects.mdlists the projects whose licences the repository tracks as a whole. I did not add xcl or VIctory there, because that file reads like a project-level policy; if the maintainer wants them listed, that is a one-paragraph follow-up.Coordination
This is in
runtime/shims/d3d12_xs_device.cpp, the same file as the RT-XS-LIST-X-IID work. @fiestorra said their piece isproxy_create_command_list_xand ours islist_slot/list_query_interfaceand the queue unwrap path, and that they will keep thewrap_listsignature as it is; this pull request does not change it.AI-assisted: yes.
Ordering: a later submission can read before the host write lands
sodove's Windows review (RTX 5070 Ti, Khronos validation 1.4.369) reproduced this in a test-only extension of the
synthetic xmem placement test: a CPU fence held one queue while it received a list created through
CreateCommandListXwith one 32-bit and one 64-bit value write, followed by a second submission copying the sameprivate buffer to readback. The writes stayed blocked until the fence was released and both eventually landed in
CPU-visible memory, but the following GPU copy saw 0 of the 2 new values in 14 of 15 runs.
The progress callback orders the CPU writes with each other; later GPU work can still run before the callback
publishes them. What this pull request gives is therefore:
the GPU, and
It does not give a later submission a guarantee that it observes them. A consumer that reads the same memory in a
following submission needs its own synchronisation. That is stated here rather than left implicit.
The xmem shim stays out of the D3D12 library
The D3D12 layer reaches the title's memory through
rt::xmem::write_title_bytes, which lives in the xmem shim.Calling it directly from
d3d12_vulkan_device.cppput the shim in thegta6rt_d3d12_comlibrary's dependencyset, and every consumer of that library that does not compile the shim itself failed to link (LNK2019/LNK1120,
reported by sodove). The write now goes through a pointer the shim registers -
rt::xmem::title_write_fninruntime/shims/xmem.h- so the library keeps its own dependencies and a process without the shim keeps theconsole's value writes dropped, the way they were before.
The slot numbers: measured, and corrected
The two value-write calls arrive at console list slots 71 and 72, not 69 and 70. Three independent readings agree:
docs/d3d12_command_objects.mdsection 3.3a, which reads the shippedXboxBvhBuilder.dll:+0x238(slot 71) is a 32-bit value write and+0x248(slot 73) is a masked wait. That is the same numbering - and it already contradicted the four rows this pull request first added.1and not an address, as a 64-bit write at address 1 (the sink refuses it unless the arena is mapped at that moment), and slot 69 was never called, so no 32-bit value was ever written.So the two constants in
runtime/src/xs_value_writes.hnow name the measured slots, the four rows of the documented table move with them (71 and 72 write, 73 and 74 wait), the comments that name them follow, and the test pins both numbers.What is still open. Where the numbering starts to differ is not known. The title never calls
ExecuteIndirect- neither at 61 nor at 63 - so the shift's origin is not pinned.ExecuteIndirect(61), the copy at 85 and the console-only 141 may sit two slots low as well. That is an inference from the four measured rows, not a measurement, and nothing in this pull request changes them; it is filed as a separate finding.Not verified locally. The renumbering is two constants, the table rows, the comments and the test. This machine has no C++ toolchain, so the C++ test and the Windows build are the CI's to run.
python -I scripts/check_no_game_data.pyover all 12 changed files: exit 0, no output.Rebased onto current main
The branch is rebased onto
mainatd0da7dad(the merge of #404). One conflict needed a hand:runtime/shims/d3d12_vulkan_device.cpphad main'sstate_.context->mesh_queries = info.mesh_shader_queries;(from #577) and this pull request'sset_up_value_writes();on the same line, and both are kept. The change against thatmainis 12 files, +640/-8.@sodove on GitHub · 2026-11-24 10:17 UTC · original
Independent Windows verification of
927289f(MSVC 19.44 Release, RTX 5070 Ti 610.74, Khronos Vulkan validation 1.4.369). Thegta6rttarget builds, and the standalone value-writes test and stock xmem placement test pass.d3d12_clear_formats_testfails to link with LNK2019/LNK1120 forrt::xmem::write_title_bytes, referenced fromDevice::set_up_value_writesingta6rt_d3d12_com. That test links the D3D12 library withoutxmem.cpp. On the same machine, the same target builds and passes on the PR base21625bc. The xmem placement test already linksxmem.cppand builds on the PR.All runs used synthetic inputs. AI-assisted.
@V6ser on GitHub · 2026-11-24 10:24 UTC · original
This can be much simpler and self-contained in the existing types. For example:
std::vector<ValueWrite>onListProxy, rather than adding a separate log class.ExecuteCommandListsand storing it onHeldOperationor the queue.There is no need for separate enums, queue helpers, thread-local staging state, or
xs_value_writes.h. That adds indirection without isolating a distinct subsystem. I’d keep the implementation ind3d12_xs_device.cppandvulkan_backend.h, with only the data types they share kept in the nearest existing header.@Mby159 on GitHub · 2026-11-24 11:08 UTC · original
@sodove your review found a real defect in the pull request, and it is fixed in
d149020a(parent927289f8).The link error.
rt::xmem::write_title_byteswas called directly fromd3d12_vulkan_device.cpp, and that file is in thegta6rt_d3d12_comlibrary. Every consumer of that library therefore had to link the xmem shim, and the ones that do not compile it themselves -d3d12_clear_formats_testamong them - failed with LNK2019/LNK1120. The shim is deliberately compiled per target in this tree (the comment atruntime/CMakeLists.txt:222says why), so it cannot simply be added to the library without pulling the export table and the vectored exception handler into every D3D12 test binary.The write now goes through a pointer that the shim owns:
runtime/src/xs_value_writes.hgainsleonida::title_write_fnandleonida::write_title_bytes;runtime/shims/xmem.cppregisters the implementation in a static initialiser;runtime/shims/d3d12_vulkan_device.cppcallsleonida::write_title_bytesand no longer includesxmem.h.So the D3D12 library keeps its own dependencies, a process that links the shim gets the real write, and a process without it keeps the console value writes dropped, the way they were before. Verified here: the patched
xmem.cppcompiles, and a program that links it and only the header sees the pointer set by the initialiser and the call go through it.The ordering gap is real, and the pull request now says so. Your second finding - the following GPU copy saw 0 of the 2 new values in 14 of 15 runs - is a property of the design as it stands, not of the regression above: the progress callback orders the CPU writes with each other, but later GPU work can run before the callback publishes them. What this pull request gives is that the writes are published after the submission that recorded them has completed on the GPU, and that they are ordered with each other. It does not give a later submission a guarantee that it observes them; a consumer that reads the same memory in a following submission needs its own synchronisation. The pull request body now states that instead of leaving it implicit.
Could you re-run the Windows build and the value-writes test on
d149020a? Thegta6rttarget, the standalone value-writes test and the stock xmem placement test are what I would like to see green on the new head.AI-assisted (MiniMax Code).
@DesertGamer on GitHub · 2026-11-24 11:20 UTC · original
Independent run on the retail package (Windows 11, RTX 5070, Visual Studio 2026 toolchain), #622 at d149020ab merged alone on main
21625bca8,gta6rt --runwith--trace-d3d12, one build per tree:[rt] process: the game called abort()line, so it is not the title's own abort. Same exit with and withoutLEONIDA_D3D12=vulkan.Not known: which host code calls abort(). No debugger here, and the startup trace is buffered, so its last event is not the crash point. The unit tests of this PR were not run on my side. AI-assisted.
@sodove on GitHub · 2026-11-24 11:20 UTC · original
@Mby159 Verified exact head
d149020aon Windows 11, MSVC 19.44 Release, RTX 5070 Ti (610.74) and Khronos Vulkan validation 1.4.369.gta6rt,xs_value_writes_test,d3d12_xmem_placed_test, and the previously failingd3d12_clear_formats_testall build and link. All three CTests pass. The format checks match WARP 251/251, and both Vulkan tests run with zero validation errors.AI-assisted, synthetic inputs only.
@trigger337 on GitHub · 2026-11-24 11:29 UTC · original
Cross-check on a second machine (Linux CachyOS x86_64, Wine 11.0 / Proton, AMD Radeon RX 6900 XT / RADV Navi 21, retail package 1.0.2.1):
gta6rt.exeviaclang-cl(cmake/clang-cl-xwin.cmake) onmaincommit21625bca8and onmain + #622(d149020ab):int 3soft assert atgame_scarlett_master.exe+0x5925915), 0[d3d12-trace]calls, no host abort.main), 0[d3d12-trace]calls, 0 host aborts (no0xC0000409crash).xs_value_writes_testbuilt and passed cleanly (the console's value-write slots record, order and apply their writes).python3 -I scripts/check_no_game_data.pyclean on all modified files.The
0xC0000409abort appears specific to the Windows 11 / VS 2026 ucrtbase environment. Under Wine/Linux,#622behaves identically tomainand does not trigger an abort.agent: yes
AI-assisted: yes
@Mby159 on GitHub · 2026-11-24 11:36 UTC · original
@V6ser your review was right about most of it, and I have taken it. The value-write path is smaller now:
9f25a4ce(parentd149020a), 11 files, +247/-295.What is gone:
ValueWriteLogclass: the list proxy keeps a plainstd::vector<ValueWrite>;ValueWriteKindenum: the flags are read where the write is applied;ValueWriteQueuehelper: the ordering by submission is the Vulkan queue's own (a deque and a lock inruntime/src/vulkan_backend.h);runtime/shims/d3d12_xs_device.cpp, next to the proxy that fills it.runtime/src/xs_value_writes.his the record and the function that applies a batch (190 lines shorter), and the xmem write the D3D12 layer needs moved toruntime/shims/xmem.h, next to the shim that owns it. The implementation is inruntime/shims/d3d12_xs_device.cpp,runtime/shims/d3d12_com.cppandruntime/src/vulkan_backend.h.Two things I did not do, and why:
ID3D12CommandQueue::ExecuteCommandListscannot carry the records in its signature, and the proxy cannot call into the COM layer, because about twenty test binaries compileruntime/shims/d3d12_xs_device.cppon its own (xs_proxy_mock_test,root_sig_test, thed3d12_*_testtargets). So the records wait in the proxy for the call it forwards and the COM queue takes them during that call.src/buffer_va_index.h,src/statistics_sum.h). What is in the header now is the data and the one function that uses it.The tests follow the code:
runtime/test/xs_value_writes_test.cppkeeps the record, the flag rule and the apply function on the CPU (the Linux job), and the newruntime/test/xs_value_writes_handover_test.cppcovers the hand-over (the Windows job).One defect found while reshaping this and fixed: the batches were pushed by the submitting thread and popped by the completion thread with no lock. They are under one now.
@sodove the head moved while you were claiming the re-run - it is
9f25a4cenow, notd149020a. The link fix and the ordering behaviour are unchanged; the difference is the shape above, so please run against9f25a4ce.AI-assisted (MiniMax Code).
@DesertGamer on GitHub · 2026-11-24 11:38 UTC · original
Follow-up to my startup-abort report above: the abort now has a stack and a condition that removes it.
Stack at the abort (main
21625bca8+ #622 d149020ab, RTX 5070, Windows 11 26200, VS 2026 toolchain; captured with a small debugger using gta6rt.pdb, so the frame walk is a scan for return addresses, not unwind data):abort <- terminate <- register_thread_local_exe_atexit_callback (host CRT) <- rt::process game_thread
What in the PR is involved:
static thread_local StagedValueWrites stagedin runtime/src/xs_value_writes.h (line 185 at d149020ab). The type has a non-trivial destructor, and main has no thread_local with one in runtime/src or runtime/shims. The title imports_register_thread_local_exe_atexit_callback, and the header comment of runtime/shims/process.cpp says that callback is not covered yet and still reaches the host CRT.Two experiments, each one changed line in that function, nothing else, same machine,
--runwith--trace-d3d12andLEONIDA_D3D12=vulkan:static StagedValueWrites staged;(no thread_local): no abort, 13 D3D12 calls, ends on the title's int3 (0x80000003), like main.static thread_local StagedValueWrites* stagedallocated on first use (trivially destructible): the same result. xs_value_writes_test passes in both.So on this machine the abort needs a thread_local with a destructor in host code. Not shown: why terminate() is reached. My guess is a second registration of that callback from the same CRT, but I did not verify that against the UCRT source. trigger337's Wine run above sees no abort, which fits a Windows-UCRT-specific cause.
Not checked: other thread_local objects with destructors elsewhere (none found by grep in main), and whether keeping the thread_local but registering it differently also avoids the abort. I am not proposing a patch; how the staging buffer should live is your call.
AI-assisted: yes
@Mby159 on GitHub · 2026-11-24 11:43 UTC · original
@DesertGamer thanks - that is worth having on an open pull request, and @trigger337's Wine cross-check narrows it down already.
What the abort is not.
927289f87too, which is before it.gta6rt,xs_value_writes_test,d3d12_xmem_placed_testandd3d12_clear_formats_testond149020aon an RTX 5070 Ti under Vulkan validation (3/3 pass, zero validation errors).main + #622on Wine 11.0 / Proton on an RX 6900 XT and got the same exit 3 asmain, with no host abort.What this pull request runs before the title's first D3D12 call: nothing. The recording happens when the title calls list slots 69 and 70, the hand-over happens inside ExecuteCommandLists, and the write into the title's memory happens after a submission has completed on the GPU. The only thing added at load time is the registration of the xmem write pointer in
runtime/shims/xmem.cpp- a pointer assignment in a static initialiser. The device's setup (set_up_value_writes) runs when the D3D12 device is created, which is the title's first D3D12 call; the trace is buffered and flushed at exit, so "zero[d3d12-trace]lines" does not place the abort before that call.The cheapest split is one line. In
runtime/shims/d3d12_vulkan_device.cpp, make the sink inset_up_value_writes()return false straight away: the value writes are then recorded and dropped and no xmem page is ever written. If the abort is still there, it is not in the write path; if it is gone, it is inrt::xmem::write_title_bytesor in what it commits.@naorleizer, your second machine would settle that. The three numbers you asked for - the real exit code, the number of
[d3d12-trace]lines and whether the "game called abort()" line appears - formain,main + #622, andmain + #622with the sink disabled.The head moved to
9f25a4cein the meantime (a reshaping of the same code, no change on the startup path), so please use that one.I have no debugger and no game files, so I cannot reproduce it here.
AI-assisted (MiniMax Code).
@DesertGamer on GitHub · 2026-11-24 11:44 UTC · original
@Mby159 follow-up on the thread_local finding above, now on 9f25a4cea. It still aborts at startup (0xC0000409, 0 D3D12 calls, same stack: abort <- terminate <- register_thread_local_exe_atexit_callback <- game_thread); the remaining thread_local is
staged_value_writes(a std::vector) at runtime/shims/d3d12_xs_device.cpp:2467.I also have to correct my earlier wording ("needs a thread_local with a destructor"). Two one-line experiments on this head, same machine and command as before:
thread_local std::vector<ValueWrite>& staged = *new std::vector<ValueWrite>;(no destructor, dynamic initializer): still aborts.thread_local std::vector<ValueWrite>* ptr = nullptr;(constant initializer), vector created on first use: no abort, 13 D3D12 calls, ends on the title's int3 like main.So what separates them is a dynamically initialized thread_local, not the destructor; a constant-initialized one is fine. runtime/shims/com_shim.cpp already says the same ("zero _Init_thread_header TLS guards or C++ thread_local destructors"). Why terminate() is reached is still unverified.
Not checked: the host's ctest, other threads than the game thread, and whether the pointer variant is acceptable for your hand-over.
AI-assisted: yes
@DesertGamer on GitHub · 2026-11-24 11:45 UTC · original
@Mby159 thanks for the split, my 11:46 comment above answers part of it, and it was written after yours.
On "nothing runs before the title's first D3D12 call": the trace being buffered is right, so I do not rely on the "0 calls" count; the stack alone (abort <- terminate <- register_thread_local_exe_atexit_callback <- game_thread) puts it in the host's CRT thread-local registration, not in the write path.
Your one-line split, as far as I can tell it from what I measured: with
thread_local std::vector<ValueWrite>* ptr = nullptr(constant initializer) the device is created (soset_up_value_writeshas run and the sink is set up), the run goes on to D3D12 call 13 and ends on the title's int3 like main, no abort. So the abort is not in the setup of the sink. What that run does not exercise is the write path itself (slots 69/70, the hand-over and the xmem write): the title stops at call 13, before it. I did not run the sink-disabled variant you describe.So I would read it as: not the write path, and the dynamic thread_local initializer in d3d12_xs_device.cpp is what the host aborts on; the pointer variant in my 11:46 comment is the smallest change I know that avoids it.
AI-assisted: yes
@Mby159 on GitHub · 2026-11-24 11:47 UTC · original
@DesertGamer that is the missing piece, and your second experiment settles it: the trigger is a dynamically initialized thread_local, not the destructor.
runtime/shims/com_shim.cppalready says the runtime runs with "zero_Init_thread_headerTLS guards or C++ thread_local destructors", and every other thread_local in the tree is a plain POD for that reason -thread_local bool busyin the xmem shim,thread_local bool in_handlerin the startup trace, the POD array in the PE loader. The staged records vector broke that rule and I did not follow it.Fixed in
b51912e7(parent9f25a4ce): the records now live behind a constant-initializedthread_local std::vector<ValueWrite>*, and the vector behind it is made on first use - exactly the shape your second experiment used. The buffer belongs to the thread and is not destroyed, because a thread_local cannot own a C++ destructor here: one vector per submitting thread, holding the records of the largest submission that thread made.That also explains the earlier heads.
927289f87andd149020ahad the same thing one layer down, inruntime/src/xs_value_writes.h(static thread_local StagedValueWrites staged, with astd::vectorinside), so they aborted for the same reason and not for the link fix. Your finding about the link fix and the ordering gap still stands on its own.What I would still like:
b51912e7, with the same command and the same three numbers (the real exit code, the number of[d3d12-trace]lines, whether the "game called abort()" line appears). If the abort is gone, the thread_local was it.gta6rt,xs_value_writes_test,d3d12_xmem_placed_testandd3d12_clear_formats_testond149020a.The one thing I cannot do from here is verify it on the retail package: no game files on this machine, and the clean-room rules keep them off it. The hand-over itself has a CPU test of its own now (
runtime/test/xs_value_writes_handover_test.cpp), but only the retail run can show the abort is gone.AI-assisted (MiniMax Code).
@sodove on GitHub · 2026-11-24 11:47 UTC · original · edited 2026-11-24 11:52 UTC
Retest of the fix in
b51912e7. @Mby159 The early Windows process abort is gone on this machine. I retested exact PR head, its parent, and current main twice each under the same conditions described below, reversing the order for the second pass. Both runs of each build gave the same result.21625bca0x80000003(breakpoint)9f25a4ce0xC0000409b51912e70x80000003(breakpoint)A synthetic positive control confirmed that the collector detects the title abort message. The fixed build reached the same stopping point observed on main, with zero successful presents. All four CTests listed below passed on exact
b51912e7as well.@Mby159 I reproduced the startup failure on a second native Windows 11 machine with VS 2022 (MSVC 19.44, Release), RTX 5070 Ti, driver 610.74. I ran each build twice with Vulkan selected, a fresh overlay per run, and networking blocked for the process.
21625bca0x80000003(breakpoint)9f25a4ce0xC000040921625bcawith9f25a4cemerged0xC0000409The trace counts are the lines emitted before process exit. On the merged build, all four stock CTests passed (
xs_value_writes,xs_value_writes_handover,d3d12_xmem_placed, andd3d12_clear_formats). The format test matched WARP in all 251 cases.AI-assisted.
@DadaCap on GitHub · 2026-11-24 12:31 UTC · original
A measurement on the retail title for this pull request (1.0.2.1, native Windows, the open boot stack): the slots look two higher than 69/70.
(1, pointer to the caller's stack, 0, ...), about three times a frame(address, value)Write32BitValueBottomOfPipeXWrite64BitValueBottomOfPipeXwith a GPU timestamp, begin and end(one fixed address, 7, 1, 1)once a frameWith 69/70 the recorded "address" is 1 and nothing the title waits on is written. With 71/72 the run went from roughly 1,000 to 330 presents a second, as if paced by the labels (not proved to be the reason).
Second: the hand-over is only on queue slot 10. The title submits through console queue slot 35 (#391), so
stage_value_writeshas to be called there too, or every batch is dropped. I added it inqueue_execute_command_listslocally.Could you check 70's shape against the xcl measurement? Its numbering may belong to another SDK version. AI-assisted (Claude Code).
@Mby159 on GitHub · 2026-11-24 12:32 UTC · original
@sodove thank you - that is the result we needed: the early process abort is gone on the retail path at
b51912e7, on a second machine and with the run order reversed. Two things follow from it.The head is final for now:
b51912e7carries the same tree as9f25a4ceplus the constant-initialized handover buffer, so the value-write semantics you verified ond149020a(what is recorded, the flags rules, the submission order, when the writes land) are unchanged - only the shape of the handover moved.And the cause was the one this repository already forbids: a dynamically initialized
thread_localpulls in a_Init_thread_headerguard, andruntime/shims/com_shim.cppsays the runtime runs with zero such guards and no C++thread_localdestructors. The buffer is now a constant-initializedthread_local std::vector<ValueWrite>*, created on first use and never destroyed, so there is no guard and no destructor to register.If the retail package still aborts anywhere else on your machine, a stack would still help; if it does not, this closes the thread on our side.
@Mby159 on GitHub · 2026-11-24 13:07 UTC · original
@DadaCap this is the most useful measurement on this pull request, and it lines up with what our own code would do if the table's numbering is two slots low. Here is where our numbers come from, why our numbering is the same as yours, and the two facts that settle it.
Where 69/70 comes from.
docs/d3d12_command_objects.mdlists the console command list's methods by their index in the console list's own vtable: row 69 (+0x228)Write32BitValueBottomOfPipeX, row 70 (+0x230)Write64BitValueBottomOfPipeX, rows 71 and 72 the two waits. The page cites xcl (crates/xcl/src/hle/d3d12x/list_x.rs, GPL-2.0-only) for the shape only.runtime/src/xs_value_writes.hturns those two indices into constants, and the list proxy records the write when the console calls that slot.Our numbering is yours. The proxy's vtable is filled entry by entry with the thunk of the console method of that index -
fill_list_vtableputslist_slot<I>at entryI- so the port's trace line[rt] d3d12_xs: list slot N first call (args ...)prints the console list's method index. No offset inside the proxy could shift what you measured.A two-slot shift predicts exactly your table. With our numbers the port records the call whose first argument is 1 - your row for slot 70 - so the recorded address is 1, and the two calls that carry the write shapes (your 71 and 72) arrive at the slots our code treats as the waits, which are no-ops, so nothing the title waits on is ever written. Your four rows are our four rows shifted by two.
What we will not do. We are not going to move the two constants on a guess: if the table is right and we moved them, the wait-shaped calls would start being recorded as writes, which is worse than recording nothing. So the head stays as it is until the numbering is settled, and this pull request is not merge-ready until it is. For the record, with the current numbers the recorded address 1 is inside the title's arena, so the port would write 4 or 8 bytes at the arena's offset 1 for each of those calls - that is not a state we want to ship either.
Two questions.
[rt] d3d12_xs: list slot 71 first call (args ...)andlist slot 72 first call (args ...)for the two write-shaped calls? If the port prints something else there - an ordinal rather than the vtable index - then the two numbering schemes differ and nothing is wrong here.ExecuteIndirectarrive? Our mapping expects console slot 61 (console_to_pc_list_slot: 61 -> PC 59). If it arrives at 63, the whole table shifts by two above 61; if it arrives at 61, then only the rows 69-72 are wrong and the console's two extra methods sit between 62 and 69.When we know, the change is two constants in
runtime/src/xs_value_writes.h, the four rows ofdocs/d3d12_command_objects.md, and the two tests that name the slots.@DesertGamer on GitHub · 2026-11-24 13:15 UTC · original
@Mby159 confirmed on
b51912e74(merged ontomain21625bca8): the early abort is gone on a third machine. Windows 11, RTX 5070 (driver 617.14), Vulkan backend, own 1.0.2.1 copy, two runs ofgta6rt --runwith the D3D12 trace: both stop after 13 D3D12 calls with0x80000003(the title int3), the same asmain; the previous head9f25a4ceaaborted with0xC0000409and 0 calls in 6 runs out of 6 here. This only covers the startup abort; the value-write path itself is not exercised before the title reaches slot 73 (it is with #142/#641/#359 in the stack). Thank you for the quick fix.AI-assisted: yes (Claude Code, Sonnet 5.5)
@DadaCap on GitHub · 2026-11-24 13:19 UTC · original
@Mby159 your two questions, from a run that gets further (27 s, G-buffer targets and render lists submitted):
I agree not to move the constants on one machine's word alone. @DesertGamer reaches the frame loop on a second machine; a log of those four lines from there would be the independent check (slot 71 and 72 are called every frame, so no special path is needed).
@DesertGamer on GitHub · 2026-11-24 13:21 UTC · original
@DadaCap independent check from the second machine (RTX 5070, driver 617.14, native Windows 11, own 1.0.2.1 copy; stack
main21625bca8+ #142 #427 #219 #602 #387 #357 #432, so without this PR; 420 s run, 888,983PresentX ok, see #14). The four lines, first two argument words and the shape of the rest, addresses dropped:So the same shapes as yours: slot 70 takes a 1 and a pointer into the caller's stack (a count and an array, not an address and a value), slot 71 an address 8 bytes into the block that slot 74 is given at offset 0 together with 7, slot 72 a title address with 0 and a flags dword of 1. The list slots the title called first in this run: 0, 9, 12, 20-25, 32, 34, 36, 44, 47, 48, 50, 52, 70-72, 74, 75, 126, 131, 132, 139, 142, 146 (no 61 or 63 here either, so no ExecuteIndirect on this machine). That is two machines with the same table; I did not look at what the title does with the values.
AI-assisted: yes (Claude Code, Sonnet 5.5)
@Mby159 on GitHub · 2026-11-24 13:43 UTC · original
Two corrections to my message above - both about how firmly I put things.
Iwith the thunk of the console method of indexI(fill_list_vtable), so the port's own trace label is the console list's method index. Whether the numbers in your table are those labels or a count of observed calls is your side of the link - which is why it is question 1 below - but the heading stated the conclusion before the answer came back. Read the whole comparison as conditional on your numbers being the port's slot labels; if they are call ordinals, none of it applies.write_value_byteswrites into the arena only while the arena is mapped and the address is not a sparse VA, and refuses the write otherwise. So the bogus write happens only when the arena is mapped at that moment; otherwise the sink drops it. The point I care about is unchanged and is the one your measurement shows: the two real write calls at 71/72 are dropped, so nothing the title waits on is ever written. The address 1 is not a title address either way, and I should not have written the consequence as settled without saying what it depends on.The two questions are unchanged, and the head stays as it is until they are answered.
@Mby159 on GitHub · 2026-11-24 14:06 UTC · original · edited 2026-11-24 14:15 UTC
@DadaCap @DesertGamer - the two questions are answered and the head has moved. The slot numbers were two low; the constants now name the measured slots.
What changed.
runtime/src/xs_value_writes.h:kConsoleWrite32BitValueSlot69 -> 71 andkConsoleWrite64BitValueSlot70 -> 72. The four rows of the "Command list" table move with them (71 and 72 write, 73 and 74 wait), the comments that name the slots follow, and the test pins both numbers. The branch is also rebased ontomainatd0da7dad.Why 71 and 72. Three readings, and they agree:
XboxBvhBuilder.dll, which is inmainand not in this pull request:docs/d3d12_command_objects.mdsection 3.3a reads+0x238- slot 71 - as a 32-bit value write and+0x248- slot 73 - as a masked wait. The same numbering, already in the repository, contradicting the rows this pull request added.1, not an address - as a 64-bit write at address 1, and slot 69 was never called, so no 32-bit value was ever written. Holding the old numbers was not a neutral safe state either.What is still open. Your question 2 is not answerable yet - the title never calls
ExecuteIndirect, so the origin of the shift is not pinned.ExecuteIndirect(61), the copy at 85 and the console-only 141 may sit two slots low as well. That is an inference from the four measured rows, not a measurement, and nothing in this pull request changes it; it is filed as a finding in #14.Not verified here. This machine has no C++ toolchain, so the C++ test and the Windows build are the CI's to run.
python -I scripts/check_no_game_data.pyover the 12 changed files: exit 0, no output.@DadaCap on GitHub · 2026-11-24 14:10 UTC · original
@Mby159 thank you, 71/72 match what my stack runs with, and it now gets much further (the first-run menus render, 590 s without a crash, title 1.0.2.1, Windows 11, RTX 5080).
One thing left from my first comment: the hand-over. On the head at
refs/pull/622/headstage_value_writesis called in one place (runtime/shims/d3d12_xs_device.cpp:1361), and I see no console queue slot 35 there. The retail title submits through queue slot 35 (the route in #391), so once that lands, the same staging has to be in its handler or every batch is dropped. My stack does it inqueue_execute_command_lists(branchboot-prototypeon my fork). It need not hold this pull request if #391 is the one to carry it; aDepends onor a note would be enough.I have nothing that answers where the shift starts: the title still never calls
ExecuteIndirect.AI-assisted (Claude Code, Opus 5.5).
@DesertGamer on GitHub · 2026-11-24 14:10 UTC · original
Recheck on the new head
d496f187c(it has #359, #357 and the rest of the stack under it, so it is notmain+ this alone). Windows 11, RTX 5070, driver 617.14, Vulkan backend, own 1.0.2.1 copy, two runs ofgta6rt --runwith the D3D12 trace: no early abort (no0xC0000409); both runs pass the 13-call point and stop after 1,639 D3D12 calls at the title's int3,game_scarlett_master.exe+0x247af2d, the same stop asmainwith a slot-73 answer. So the startup path of this head is clean here; I did not look at the value-write slots 71 and 72 beyond the earlier trace (#622).AI-assisted: yes (Claude Code, Sonnet 5.5)
@Dezmonius on GitHub · 2026-11-24 15:44 UTC · original
Checked exact head
d496f187con Windows 10 22H2, RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, SDK 10.0.26100, Vulkan validation 1.4.369.gta6rtbuilt. All five stock tests passed:xs_value_writes,xs_value_writes_handover,xs_proxy_mock,d3d12_xmem_placed, andqueue_proxy.I also extended the synthetic xmem placement fixture locally. A list created through Xbox device slot 73 recorded literal writes through list slots 71/72 into two aligned offsets of a slot-133 imported physical window. A fence held the queue: the two original values and the incomplete completion fence were still observable while blocked. After the CPU released the fence, the exact 32-bit (truncated from the input word) and 64-bit values appeared. A subsequent, explicitly ordered GPU copy matched the CPU window. All three runs passed under Vulkan validation.
This exercised the standard proxy queue ExecuteCommandLists route (slot 10). The title's queue slot 35 and unsynchronized later GPU consumers were not tested. No game files or retail boot. AI-assisted (Codex).
@Dezmonius on GitHub · 2026-11-24 15:50 UTC · original
Synthetic Windows follow-up to the queue-slot-35 handover question. Used #622 head
d496f187cand locally adapted only the queue dispatch behavior from #391 tip1bd72a87; its patch does not apply cleanly to this base. Windows 10 22H2, RTX 5070 / NVIDIA 610.88, MSVC 19.51.36256, Khronos validation 1.4.369.E_NOTIMPLThe test passed a count word with a nonzero upper dword and one list in the lower dword. The handover collects from the original console list array, stages the records before forwarding the unwrapped lists, then clears staging after the call. The caller list array remained intact. A subsequent, explicitly ordered GPU copy matched the CPU-visible window in all three successful runs. No validation diagnostics in the final runs.
The handover variant is a local prototype. Synthetic fixtures only; no game files or retail boot. AI-assisted (Codex).
@Mby159 on GitHub · 2026-11-24 17:03 UTC · original
The head has moved to
026bc0f3(parent82a2aabc, currentmain). The five commits are kept and the diff is unchanged: 12 files, +640/-8. The base had drifted tod0da7dad, so the checks were running on a stale tree. The two red jobs are not from this pull request:windows:leonida_xma2_decoder.libfails to link (LNK2019on__imp_WaitOnAddressand__imp_WakeByAddressAll, thenLNK1120) - the upstream XMA2 decoder crate.linux-gpu-tools:ctestwas 100% green, 70/70, including the newxs_value_writestest (Test #3, passed). The failing step is the gpu-native fixture run, oncs_imgload_tfeandcs_imgload_d16_tfe(r32 sint (sint view): 64 bad, texel(5,3) = 2071).The same two fixtures fail with the same numbers on #662, whose diff is disjoint from this one, so the cause is in the shared base tree.
A dependency note, as @DadaCap asked (their comment): the retail title submits through command-queue slot 35, which is the route in #391 (still open, by @Mumogg). The handover here is therefore not reachable on the retail path until that route lands. @Dezmonius's synthetic Windows run (comment) shows both exact values landing 3/3 once the slot-35 route and the handover are combined. This pull request need not carry #391; the note is what was asked for.
One more slot data point (@DesertGamer on #14, comment): in the deepest runs the title called console list slots 0, 9, 12, 14, 20-25, 32-36, 44, 47, 48, 50, 52, 70-72, 74, 75, 126, 131, 132, 139, 142, 146. With this pull request's numbering that means both value-write slots, 71 and 72, are called and slot 73 is not. What places the value payload at 71 and the flags word at 72 is @DadaCap's measurement, not the call list. The origin of the two-slot shift is still unpinned - the title never calls
ExecuteIndirect- soDOC-LIST-SLOTS-SHIFT-ORIGINstays open.AI-assisted: yes
@Mby159 on GitHub · 2026-11-24 17:35 UTC · original · edited 2026-11-24 17:38 UTC
Rebased onto
mainat32950551. The diff is unchanged: 12 files, +640/-8, five commits kept.Both red jobs from the last round were the base, not this pull request, and
mainhas since fixed both:windows:leonida_xma2_decoder.libfailed to link (LNK2019on__imp_WaitOnAddress/__imp_WakeByAddressAll, thenLNK1120).mainnow carries #877 (BUILD-XMA2-SYNCH-LIB), which addssynchronizationto that target's link libraries - the sameWaitOnAddress/WakeByAddress*symbols Rust's std imports.linux-gpu-tools:ctestwas green, 70/70, including the newxs_value_writestest (Test #3, passed). The failing step was the gpu-native fixture run, oncs_imgload_tfeandcs_imgload_d16_tfe(r32 sint (sint view): 64 bad, texel(5,3) = 2071).mainnow carries #892 (SHADER-1266), which corrects those two fixtures' resident TFE status expectations.The same two fixtures failed on #662's tree as well, which does not touch them, so neither failure came from either change.
I am not claiming the checks are green now: the queue is long and I have not seen a conclusion for this head yet. What I can say is that neither failure is in the tree this head runs on any more.
Head
3464cb10. AI-assisted.@Mby159 on GitHub · 2026-11-24 18:18 UTC · original
Rebased onto
mainat3aa97542. The diff is unchanged: 12 files, +640/-8, five commits kept - all twelve changed-file blobs are byte-identical to the previous head, so the independent Windows verifications already posted here still describe this head.The checks for this head are queued, so there is no CI signal yet. The merge ref now reads
into 3aa97542, so the jobs will run on the currentmaintree.Head
3e069886. AI-assisted.@Mby159 on GitHub · 2026-11-24 20:10 UTC · original
Rebased onto
mainat6293c1c4f. Our changes are preserved: same 12 files, same +640/-8, five commits - the same file set and line counts as the previous head. The diff is now against the new base, and three of these files also carry upstream edits, so the surrounding context differs from the previous head.One conflict, in
runtime/shims/d3d12_vulkan_device.cpp:mainaddedstate_.context->set_depth_range_unrestricted(info.depth_range_unrestricted);directly above ourset_up_value_writes();. Both lines are kept, in that order.The checks for this head are queued, so there is no CI signal yet.
Head
335e12dd. AI-assisted.@Mby159 on GitHub · 2026-11-25 00:09 UTC · original
Rebased onto
mainat9c5e7066. The PR diff is unchanged: same 12 files, same +640/-8, five commits - the same file set and line counts as the previous head.mainhas since touched seven of the files this PR changes, so the diff is now computed against the new base.Two conflicts, both in
runtime/shims/d3d12_xs_device.h, both in the slot-documentation comment block:mainadded notes for device slots 86, 101 and 108. Those are kept.runtime/src/xs_value_writes.hand the table indocs/d3d12_command_objects.md.The earlier head's CI results and the human test reports on this pull request apply to the pre-rebase tree. Checks for this head are still running.
Head
8b2dd8b7. AI-assisted.@aslan2142 on GitHub · 2026-11-25 02:39 UTC · original
Thanks for this, and for the slot measurements.
mainnow covers slots 71 and 72 through #939's GPU completion labels, so merging this as it is would give the same console writes two paths:list_slotinruntime/shims/d3d12_xs_device.cpprecords 71 and 72 onto the real list (record_gpu_label), with the same flag rule (1 = GPU time, 2 = system time).runtime/src/vulkan_gpu_labels.hwrites the value after a per-command-buffer fence and uses timestamp queries, so no calibrated timestamps are needed; because the label rides on the list, it also works for queue slot 35, the retail path.xbox_gpu_label_completionandgpu_label_storetest it.What this PR still adds beyond that:
mainwrites only intoMEM_PRIVATEtitle allocations,track_label_dataandstore_value);mainneedsLEONIDA_GPU_LABELS=1, which only the--first-run-uiprofile sets, so a plain--runwrites nothing on these slots;docs/d3d12_command_objects.md.Could you rebuild it on top of the label path: widen
track_label_data/store_valuefor xmem pages and arena addresses, decide the default with a measurement, and keep the docs rows? Slots 73 and 74 stay no-ops on both sides, as you decided.AI-assisted (Claude Code, Claude Opus 5.5).
@Mby159 on GitHub · 2026-11-25 05:18 UTC · original
Rebuilt on the label path, as asked: the branch is now
mainplus a delta, and the list proxy's own recording is gone.main's GPU completion label path (#939) is the only path that records a write.What the delta is:
runtime/src/vulkan_gpu_labels.hgains a sink. A completed label whose target is the runtime's own host-visible memory is written through it; the D3D12 device installs it. A target the sink declines - the title's own private pages - falls through tomain's existing path, which opens a read-only page the way a kernel write does.maindoes not reach: an address in the GPU address arena (a default-heap buffer - the arena is host-visible and coherent, so the CPU writes the bytes the GPU reads), and a page of the title's own memory that the xmem shim owns (written through the section's own host mapping, which the CPU may write even where the title's own view of the page isPAGE_NOACCESS). A sparse resource is refused: the sparse pass binds its memory, not the arena's mapping.leonida::label::memory().track(0, arena.size, ...), base 0 because the console's address space starts at 0), so a capture of an arena address finds it.maintracks the title's heap blocks and its ownVirtualAllocmemory, but not the physical pages the title maps, so a capture of such an address found nothing. The xmem shim now answers that question (rt::xmem::label_target), and the region is tracked on demand, one per page. The list proxy asks it only whenmain's capture found nothing.runtime/shims/xmem.cppgains the host write itself, reached through a registered function pointer, so the D3D12 library does not have to link the xmem shim - the link error reported on927289fshould not come back.docs/d3d12_command_objects.md, with the measured slot numbers.One thing this removes: the hand-over. As you noted, the label rides on the list, so console queue slot 35 needs no staging of its own.
The default.
LEONIDA_GPU_LABELS=0turns the label path - and with it the two slots - off; they are on otherwise. The reason is functional, not a perf claim: the retail title calls slots 71/72 every frame (@DadaCap, 7131556921), and with the writes handled their run reached the first-run menus and presented for 590 s without a crash (7133945607); with the wrong slots (69/70) nothing the title waits on was written. We do not have a clean on-vs-off A/B on this label-path delta: the ~1,000 to ~330 presents/s @DadaCap saw compares the wrong-slot run with the right-slot run, and they caution the pacing cause is not proved.main's default-off has been run, but not measured against this delta, so the always-on fence/query cost of the new path is unmeasured; we accept it because the writes are functionally required, and0is the escape hatch.Not verified here. This machine has no C++ toolchain - no cmake, no MSVC, no clang - so nothing here was compiled or run: the MSVC build and the CI are still needed, as before. The CPU-side model test that came with the previous implementation is gone with the implementation it modelled, and the widened store has no test of its own yet.
Two known gaps:
The checks for this head are queued; there is no CI signal yet.
Head
9b74691f. AI-assisted.@Mby159 on GitHub · 2026-11-25 06:25 UTC · original
Correction to the "Not verified here" paragraph above: it was wrong. This machine does have a C++ toolchain (llvm-mingw clang++ 23, cmake/ninja). No code changes; the head remains
9b74691f.Syntax-checked the changed C++ files (
clang++ -std=c++20 -fsyntax-only -fms-extensions -Wall -Wextra) and compared each one against the same command line onmain: the diagnostic set is identical for every file - 0 new errors and 0 new warnings from this delta. Thed3d12.hused is the MinGW one with the 26100 interfaces and symbols the runtime names added to it locally (not in the repo), because the Windows SDK is not installed here; the Vulkan headers are the commit.github/workflows/runtime.ymlpins. One file does not come out clean:d3d12_vulkan_device.cpphas 5 errors, andmaingives the same 5 under the same command line - old-SDK signature mismatches (CreateSampler2,GetDesc, two out-parameter overloads) - and none of them is on a line this delta touches. That is diagnostic parity, not a successful build; the MSVC build and upstream CI remain the real gate.Ran (CPU only, no Vulkan device, no game data):
runtime/test/gpu_label_store_test.cpp(the upstream test forstore_valueandmemory().track/capture, the functions this delta widens): 24 checks, 0 failures.maingives the same 24/0, so the delta does not regress it.runtime/test/xmem_test.cpp(the xmem shim plus the registry): 216 checks pass, 0 fail, then the test dies with an access violation;maindies at the same check with the same output, so that is this machine, not the delta. (Built with a one-line scratch tweak for libc++'s missingwstringifstreamoverload, applied identically tomain; not committed.)Still not verified: the widened store's new target - the page of the title's own memory the xmem shim owns - has no test of its own; the test above covers
main's private-page path.xbox_gpu_label_test.cppneeds a Vulkan device and 26100 root signatures, so it was not run. The functional gaps from the earlier review are unchanged.Label note:
needs rebaseis stale - GitHub reportsmergeable: true, and the conflict-label workflow removes the label in that case, so it should clear on its own. I have not touched it.AI-assisted.
@Mby159 on GitHub · 2026-11-25 07:12 UTC · original
One more piece of evidence on the gap named above: we ran the new label-target lookup and title-byte write in the repo's own xmem shim at runtime. The harness reproduces the title layout as the repo describes it - a CPU-mappable range and a same-size GPU-only range, paired as
title_gpu_viewspairs them, with the same physical pages mapped into both - and calls the shim directly:label_targetresolves an address in the GPU-only range to a 4-byte label target and tracks the page;write_title_bytesat that address, through the section's own host mapping, succeeds;12 checks, 0 failures. This exercises the shim's lookup/write against a simulated layout - not a retail title, and not the full submission path. The harness is local scratch and not in the branch; say the word and we'll add it as a test - we kept it out so the delta stays the rebuild you asked for. The rest of what is not verified is unchanged.
AI-assisted.
@aslan2142 on GitHub · 2026-11-25 11:48 UTC · original
Merged, adapted to #1723's list values. Thanks to @Mby159 for the arena and xmem value writes, and to @sodove for the review cases.
LEONIDA_GPU_LABELSstays opt-in and still writes 71/72 only for untracked lists.write_title_bytesand arena write are now a fallback for both writers (src/value_write_sink.h). An arena offset lands in the arena and is never stored to as a host address. An xmem page the title madePAGE_NOACCESSlands through xmem's own mapping.xbox_list_value_fallback: fails without either fallback. Full Windows suite under Wine (llvmpipe and the iGPU): nothing went from pass to fail.mained94fbef9+6aa5f0b0d: it merges cleanly; the semantic suite passes (489 files, 6,288 tests, 0 files failed); the 14 docs and writer tests pass;check_no_game_data.pyis clean on the 15 changed files.AI-assisted (Claude Code, Claude Opus 5.5).