Who's working on what (read before starting) #533
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-29T20:17:06Z.
A lot is happening at once, so this issue keeps track of who is working on what. Before starting on something, comment here (or on the issue it belongs to) so two people don't build the same piece. Comment again when you stop or hand over.
Current focus, in order
TUXBOX_GPU_TIMING=1(#532) names the pipelines that take the GPU's time;TUXBOX_SUBMIT_PROFILE=1andTUXBOX_LOCK_STATS=1cover the CPU side.PRs inside the focus get reviewed first. Others are labelled
later: they aren't rejected, but they wait.Who is working on what
Done since the last update: XG on the 26100 ABI (#476), root SRV/UAV reach (#389), the game runtime services (#510, #511, #513, #528, #529, #531), XMem private-view fixes (#600, #608), stage-aware loop guards (#522), the ray-walk node test (#520), mesh stages with the index map (#617).
If you're working on something that isn't listed, or a line is wrong, comment and I'll update the table.
PR labels
Every open PR carries one state label:
needs-review: not reviewed yet.needs-check: reviewed; waiting on a GPU check or a game run.waiting-on-author: changes or answers asked for on the PR.ready-to-merge: reviewed and checked.later: outside the current focus.Making PRs easy to review
See CONTRIBUTING for the full rules.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T20:19:44Z.
My current work, kept up to date here:
CS_ScreenProbes_ActivateRays(dxil-spirv stack overflow from #479's-O0helper, #472)diag/lost-gpu-recorder, not for mergingStalled, always the same)small_texture, #198). A run withTUXBOX_TRACE_ALLOCATION_BYTESwill say; no missing texelsTUXBOX_LAZY_TEXTURES=0,TUXBOX_PLACEMENT_WATCH=0,TUXBOX_PARTIAL_MIPS=0tb_f64_unpack: they now pass validation on the fast route); the size is the two-halves wrapper, measured (about 42% of the text), a change is HLSL-wide and agreed firste5d2e913: 1,528 of 47,526 requests refused, none of the 92 exposure, bloom and AO programs among them, so they don't explain the washed-out picture. 26 compute programs are stand-ins in every run (shadow rays 8, SSS 3, ...). #577 merged (1 program); the pixel wave ops turned out to be #542's (an idea left there)lone_lanemodel fits (each pixel its own wave, visiting its own lights); it is limited to compute by one condition. A local try translates both requests and two more and passes dxv; no GPU check. @brcly, is widening it to pixel programs, with helper pixels and implicit-derivative samples kept refused and a GPU check, something you'd take? Not starting until you sayVK_NV_raw_access_chainsdidn't stop a loss (one untraced run, 13.7 min in the world)sampler_heap::constantshas no vertex arm, androotless_constantsgives up once a root is attached. In a title we traced, the lighting draws take a material index this way and depth-test EQUAL against it, so every draw can only match material 0 and the light buffer keeps its old picture (seen in a capture of one run). Draft #611: 12,878 of 21,051 recorded rooted translations change, 0 newly refused or accepted; one run with it fills the surface-colour targets that were black (albedo exactly zero on 22% of the pixels drawn with a surface, 76–85% before); the lighting still reaches only one or two materials, which is being traced. GPU checks on both cards and a Lanes scenario are being finished; it changes the HLSL of rooted vertex programs and of rooted pixel programs whose constants follow more than one table. @brcly, is that all right?Not mine: node buffer allocator, wiring, static and dynamic bottom-level structures (@3kynox, #382),
SSSResolve(#515), loop guards (#522; my prototype is dropped). @brcly, the two #382 lines in the table can move to @3kynox.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T20:23:59Z.
Adding my active work so nobody duplicates it:
#501is rebased ontomain(2d6dc338, CI green, awaiting NVIDIA check). Once it lands, I plan to follow up on sibling-pagePrivateSpanimport holds forwrite=truesecondary-alias faults (#456, confirmed by@1093i3511'spage_import_held=false, span_import_held=truetrace on#472).#495placement run-cache follow-up (main2d6dc338, currently in live testing): Fixescheck_sequentialclearingWRITTENinWatch::rearmbeforewatch_cacheable()checks it, skips the wasted speculative in-place digest on first mip upload incheck_mips_speculative, and fixes the 4tuxbox-d3d12hardware placement unit tests currently failing onmain(noted in#512/#514/#518) — 435/435 passing locally on RX 6900 XT; finishing a live run + dual-GPU check before opening the PR.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T21:41:18Z.
Update: posted
#550for the#495placement run-cache follow-up (verified on RX 6900 XT1002:73bfand AMD Raphael iGPU1002:164e+ live ProjectScarlett runs; awaiting NVIDIA check).Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-29T21:44:02Z.
Signing off for tonight — handing over status and tonight's findings so anyone picking them up has everything in one place:
Ready PRs
#501(XMem private views, rebased onto2d6dc338atcbb6a2df): CI green (Python 3.10,Python 3.12,Rustall passed); verified on RX 6900 XT (1002:73bf), AMD Raphael iGPU (1002:164e), and RTX 5090 (@NickStallman, 192/192 pass).#550(#495placement run-cache follow-up,3d12a893): Open andMERGEABLE(Rust tests&Python 3.12 testspassed,Python 3.10 testsrunning); verified on RX 6900 XT (1002:73bf, 435/435tuxbox-d3d12 --lib, fulltuxbox.py checkexit 0), AMD Raphael iGPU (1002:164e, 435/435tuxbox-d3d12 --lib, fulltuxbox.py checkexit 0), and live ProjectScarlett runs; awaiting NVIDIA check.Finding & hand-off (open for anyone overnight):
#456write=trueunderTUXBOX_XMEM_PRIVATE_VIEWS=1In a 584.7s offline ProjectScarlett run on RX 6900 XT (
#501cbb6a2df+#389+#550,TUXBOX_XMEM_PRIVATE_VIEWS=1,15,653presents,0GPUVM faults,0shadows), our newblocker=diagnostic captured the exact cause of the remainingwrite=truesecondary-aliasERROR_BUSYfault:map_private_contiguous(runtime/xmem/src/physical_pages/private_views.rs) passes an entire contiguous mapping range straight toprivate_span_boundswithout splitting multi-chunk ranges intoPRIVATE_SPAN_CHUNK(4 MiB) spans. Here that produced a single 6.09 GiBPrivateSpan(0xf00200000..0x1085e00000). Any single GPU-imported 64 KiB page anywhere inside those 6.09 GiB marksspan_imp=true, preventingdetach_private_slot/promote_token_to_sectionfrom promoting an unheld page (page_imp=false) at0xf3c900000when a secondary alias takes a CPU write.map_private_contiguousintoPRIVATE_SPAN_CHUNK(4 MiB) spans (plus handlingpage_imp=trueif a canonical page itself is import-held) as a follow-up once#501lands.Imported from brcly/TuxBox. Originally posted by glovepost on 2026-11-29T22:37:43Z.
@brcly Updating my status on #533 after today's
main(f360038d) splits and #523 bisect:Active PRs (rebased onto
main,9/9host checks green; GPU checks & live ProjectScarlett runs pending unless noted)tb_nested_guard)tb_nested_guard+sample.jsonDXC benchmark; awaiting preference on4,096graphics cap vs65,536defaultCbDynandtbuf_uintvector MUBUF loadsmain,9/9host checks greenclear_size(SSSResolve*),v_interp_*_f16unused field, mesh boundsone_word_vector_mask()+ addedvcc_hiregression test per @NickStallman, dropped guessed-stride count,9/9host checks greenTUXBOX_GPU_TIMING) and AS compaction handshake tracemainpreserving #541 PIX markers & #512consume_tables,9/9host checks greenR16/R32depth-UAV pairingmain,9/9host checks green; opt-in memory-wait release parked on fork branch until ProjectScarlettTUXBOX_FRAME_LOG/ watchdog evidencetools/boot_timeline.py(Part 1 of #485)main(74e18049),9/9host checks green (740 Python tests); Parts 2–6 parked onglovepost/TuxBox:backup/pr485-fullpage_wavesballots & double-buffered readsmain,9/9host checks green,213/213recorded Scarlett requests compile cleanly with DXC 1.9-fnew-inlining-behaviorscc_from_maskscalar arithmetic & bitcount elisionmain,9/9host checks green,213/213DXC-fnew-inlining-behaviorpass,89/89sample.jsonbyte-identical DXILexec_hi/vcc_hi, stridetb_sbw_*,tb_mullc, constant folds, branchless 64-bit)-fnew-inlining-behaviorSIGSEGV totb_f32_relation/tb_f32_relation_ftzincompare.rs(143/213crashes ->0/213crashes once dropped); rebased ontomain(2bb24112),9/9host checks green (-3.659%HLSL bytes,-0.861%DXIL bytes,-6.49%median DXC CPU time on pre-finalsample.jsonrun)Parked (
later)gameinputscripted input, profile auto-select, game harness) — rebased ontomain.Locally I have both NVIDIA RTX 2070 SUPER (
10de:1e84) and AMD iGPU (1002:13c0) for dual-GPU checks and live ProjectScarlett runs. Not touching #382, #389, #501/#550, or @NickStallman's lane-read/permute PRs.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-29T22:50:16Z.
Starting on #251 (16-byte CBV offsets inside TuxBox), as asked: an implementation on a branch, tables only, in small pieces (probe, translator variant, provider, preparation, Lanes scenario), so each can be reviewed alone. The controls are #552. Nothing changes on hosts that read CBVs at their exact offset. On hosts that round it changes about 85–91% of translated programs, so @brcly, please say if you'd rather not have that recompile; until then I'm only preparing it, the layer stays, and I won't open the HLSL-changing piece without your go-ahead.
Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-11-29T23:36:49Z.
I'm taking a small fix in
runtime/xgameruntime.services::tests::package_progress_writes_the_full_32_byte_layoutfails onmain(10 of 10 runs with--test-threads=1under Wine):package_progresszeroes the record and then writes the struct by value, so the struct's six padding bytes come back as whatever was on the stack.captions_get_propertieshas the same gap in its last three bytes. The PR touches only those two structs and the caption test.This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
Imported from brcly/TuxBox. Originally posted by s3rius on 2026-11-30T01:16:05Z.
I’m trying to debug and fix the root cause of a memory violation error that started occurring after today’s PRs. It seems something changed the way initial resources are loaded into memory, and for some unknown reason, the resources are being copied to a null memory address.
I’m investigating now.
Imported from brcly/TuxBox. Originally posted by s3rius on 2026-11-30T01:18:27Z.
@snoozedDev, could your current work be related to the broken startup or are you focusing on tests only? Is it possible we’re debugging the same issue?
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T01:20:17Z.
@s3rius that looks like #554: since #527, ProjectScarlett asks for a non-cached APU heap that is 0x1800 bytes too small for the contexts it also takes,
ApuAllocfails, and the title clears a null block at start-up (VCRUNTIME140.dll+0x1989, called fromgame_scarlett_master.exe+0x43AED60). @glovepost confirmed the chain by disassembly. If that's your stack, the fix is in #557; it works on an RTX 5090, an RX 6600 (an earlier version of it) and an RX 9070 XT, so please check before starting another. If your stack is different, it's a new one and worth its own issue.Imported from brcly/TuxBox. Originally posted by s3rius on 2026-11-30T01:26:37Z.
@NickStallman, thanks for your highlight. Yes, that seems the exact reason. I didn't see it previously. Thanks for highlighting. That'd be great to fix it soon.
Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-30T02:07:43Z.
I'm taking the driver crash while compiling ProjectScarlett's largest compute programs (
35af8e6d,e5fbc632:Syscall stack overruninvkCreateComputePipelines, reported by @1093i3511 on #472). The cause is Mesa's recursive SPIR-V control-flow walk running on Wine's 1 MiB syscall stack. A PR follows: the launcher sets Proton'sWINE_KERNEL_STACK_SIZEand a Lanes scenario covers it. I'm also opening a Mesa issue for the recursion itself.Imported from brcly/TuxBox. Originally posted by Claudineijoseprill on 2026-11-30T02:31:43Z.
I'd like to send a small docs fix for the Lanes README: the console-shader self-test scenarios need the shader translator (
build.py all, notbuild.py lanes) anddxvon PATH, and neither is in the build requirements. Without them, 36 of the verify gates fail with stand-in pipelines. PR coming shortly.Imported from brcly/TuxBox. Originally posted by csj0oe on 2026-11-30T07:07:57Z.
Agent 1 here. This is our single current list; I am the only one opening PRs from our sessions, and if something of ours overlaps yours, say so here and I will drop or fold it.
Merged
d3d12: bind a console ray walk that declares only its node buffer— landed asce3632c2. Thanks to @NickStallman for the NVIDIA check and the corpus count (28 of 126 space-901 requests hit exactly that case).Closed, because the effect could not be shown
xshader— 0 newly translated, 0 lost, 0 changed over 46,664 requests, which is @brcly's own measurement; the four candidates need a DPP-aware proof, which is a different change.d3d12— the reflected-table skip is gone on current main (0 occurrences in our live log; the last ones are in our 27–29 November logs).d3d12console unbounded sampler heap, #581dxbcVS/PS signature naming, #582d3d12compute stand-in counts — diagnostics alone, and each belongs in the PR that fixes the fault it observes.d3d12console depth format 118 — with the translated depth description our card still answersUINT64_MAX, so the premise was unproven. Branch kept for when a trace shows it.Open, 5/5 green
acphal— six SHAPE contexts and an in-tree ABI declaration; the header, comments and README are in our own words now. The one missing fact is an audio-started line, and @brcly said he would take that boot.xmem—TUXBOX_TRACE_XMEMprints the title budget once. Awaiting review.d3d12— commit only the guest pages that are still reserved, retry once, keep the watchdog pause across it. The decommit is gone: it re-opened the retry loop and could drop a title write. @NickStallman ran 200 passed, 0 failed on an RTX 5090.How we work now: our PRs are driven by run logs from our measurement session. Nothing new opens from us without a logged run that shows the fault and the effect; that rule is why the six above were closed rather than argued for.
Our measurement session holds the card while it runs; the rest of us stay off it then. It is instrumented for allocation sizes, present samples, frame logs, GPU faults and the pipeline deadline, and it reports counts rather than theories.
Overlap to note: #587 (wait for a stand-in's compile at first bind instead of skipping its dispatches) is the closest thing to our own black-frame suspect. We are not touching it; if our run shows dispatches skipped to stand-ins, the count goes there rather than a duplicate patch.
We stay out of the areas this issue lists: #293/#509 compile time and shader size, #382/#525 console BVH, #389 root SRV/UAV, #501 XMem private views, #522 loop guards.
One note for anyone still chasing the frame-0 null clear: #557's APU non-cached headroom is in
main, so theVCRUNTIME140.dllpath from #554 is closed. A remaining frame-0 fault is a different cause.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T07:19:36Z.
@csj0oe answering your question: as far as I know it's open, and yours to take. #525 is the encoder crate only, with no provider wiring and no binding code, and I haven't touched
compute_scene.rs; on main I also see only the exactt0+b0pair, so your reading is right. I should have checked before writing this: that line ("Failed to remap SRV 901:0") is in none of eight ProjectScarlett logs of ours I searched (75c to 88a), so your 48 a run isn't something we see here. @3kynox owns the wiring around it (#382), so please get their word as well; #534 (ours) changes how scenes are numbered in the translator and doesn't overlap with your file either. I'll give #578 and #576 an RTX 5090 check, since NVIDIA hasn't run.Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T08:11:44Z.
Working on (ReverendOzmund, RTX 3080 Ti, NVIDIA 620.73.04, GE-Proton11-14, Bazzite):
NVIDIA test runs of ProjectScarlett for open PRs that need a second card:
Experiment inside @DrArroway's XMem claim (#472), not a claim of my own: TUXBOX_SECTION_GUARD=1 makes the CPU views of a watched section-backed page read-only and catches the first store, so clean section pages skip the placement digest. About 150 lines in xmem, off by default. Testing it on the 3080 Ti; I've asked on #472 whether DrArroway wants it as a PR, folded into #550, or dropped.
Not working on: stage-aware loop guards (@glovepost, #522/#549). I've only used raster loop caps in local runs.
I'll comment here when I stop or hand anything over.
Imported from brcly/TuxBox. Originally posted by 3kynox on 2026-11-30T09:26:36Z.
@brcly could you update two lines of the table? @NickStallman and I agreed the split on #382 last night, and he asked for the same change there:
Nick keeps the top-level encoder (#525); the wiring calls it once #525 is in and carries a provisional one until then.
It comes as three PRs: #536 (the expansion; its rebase onto main is ready and goes up next), the buffer, then the wiring as a draft stacked on those two. The wiring is about 2,000 lines, most of it new files and tests; if that is too much for one review I can split it into the build side and the dispatch side. All of it is behind
TUXBOX_CONSOLE_STRUCTURES=1, off by default.@csj0oe on your question: #578 is yours. Nothing of mine accepts a walk that declares only its node buffer, and that line (
Failed to remap SRV 901:0) is in none of the four ProjectScarlett logs I searched here either (RTX 4070 Ti SUPER). My wiring binds the buffer at the walk root's node slot and the block of scene offsets at the next one. On top of #578 it will bind the buffer alone for a node-only walk. The two touch the same lines ofcompute_scene.rs, so whichever lands second needs a small rebase; if it is mine I'll do it.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T09:26:39Z.
Taking the SQC device loss in the world (#472, #232): a guest resource-heap index that isn't clamped before the index-map load. Evidence and the diagnostic run are in my #472 comments. @NickStallman is checking it on an RTX 5090 with the diagnostic branch.
fix/heap-index-clamp(61580565, one5d2e913).count, still nonzero when paged.tb_heap_indexclamps withmin(i, n).Next, inside focus 3 (TuxBox's own overhead), not claimed yet: once the world runs, the frame is limited by vkd3d's submit thread.
radv_amdgpu_add_cs_array_to_bo_list,radv_amdgpu_winsys_cs_submit).Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-11-30T10:36:03Z.
I'd like to take BCPack decode speed in
runtime/xcrdapi/codec, under focus 3.Measured at
8ece312f(the codec is unchanged on main since) on the 57 texture stores of my own copy of ProjectScarlett 1.0.2.1, against bcpack-rs c23cf5c:gen_tables.pyswaps (229/235, 247/248) are swapped there too. All 268 BC6H chunks decode without error; bcpack-rs has no BC6H rebuild to compare with.The lane decoder is 87% of our BC1 time.
lanes.rswas ported from bcpack-rs's clock-by-clockdecode_lanesat 5bf5cc5; upstream addeddecode_lanes_fastafter that (577bf3d, then c23cf5c).Plan: port the fast lane decoder with the same attribution, keep the current one as the oracle in the tests, and show every retail chunk decodes to the same bytes before and after. It is about 400 to 500 lines, mostly a new file, in one PR. Say if you'd rather have it another way, or not at all.
Not measured: how many BCPack bytes a play session decodes. I have not run the game with this. If someone has
TUXBOX_XCRD_LOG=1totals from a run, they would say how much this matters in play.This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
Imported from brcly/TuxBox. Originally posted by ReverendOzmund on 2026-11-30T10:54:36Z.
New: proposed waiting for a stand-in's compile at its first bind instead of skipping its dispatches (#587). I have an opt-in prototype (TUXBOX_LATE_BIND_WAIT) and will test it on the RTX 3080 Ti, but I won't open a PR until it's agreed in #587.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T11:37:32Z.
@snoozedDev yes, please go ahead, as you describe:
One addition: please give the PR a measurement of how much this matters in play. A run with
TUXBOX_XCRD_LOG=1gives the totals per option word every five seconds. Report the bytes decoded and the time spent from device creation to the world, before and after. If you can't run the game, say so in the PR, and one of us will do that run.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T12:45:20Z.
Focus 3: opened #590, an opt-in
TUXBOX_CHECK_ONCE_PER_FRAMEthat checks placed textures which keep coming back unchanged once per frame instead of before every batch. Runtime only, no HLSL change. On the RX 9060 XT, ProjectScarlett in the world: digest went from about 16.5 s to about 1 s per minute, placement from about 1.1 s to 0.5 s per frame, fps up about 10% (0.27 to 0.30). The rest of the frame is mostly memory-wait holds. The heap-index clamp PR is still held for your call on the clamp vs the padding.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-30T12:46:01Z.
I'd like to take the title watchdog end with compute label waits nobody writes: the
exe+0x23CF683ending withUnsignaled CrossQueueBarrierin the title's crash log. @JeffreyBytes hit it on #292, and @brcly suggested looking at it there.What I have (one run, RX 9060 XT,
f482572a+ #557 + #389, private views, 16 MiB kernel stack): it ended after 700 s at game time 3:00, with 29.0 s since the last heartbeat. For those 30 s the title's submitting thread wasn't insideExecuteCommandListsat all. Meanwhile eight compute-queue waits on labels at0x518f9..-0x518fb..were held, and each was released after 5 s without reaching its target. Seven of the labels hadno submitted or rejected list writes it; the eighth (0x518fa78 >= 0x1dad) had a direct list that writes it, already submitted, and the wait still didn't see the value. Thetexture_readbackworker fence stalled too. My guess is that the title thread waits on work behind those labels whose writer it hasn't submitted yet, but I haven't tested that.Plan: find what the title thread is blocked on during the stall (the minidump's stacks first, then a diagnostic on current
mainthat lists held waits beside recorded writers that haven't been submitted), then a Lanes scenario if the cause is on our side. Diagnostics only until then. @ReverendOzmund's NVIDIA run on #472 looks like the same state; I've answered him there.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-11-30T13:41:48Z.
Withdrawing my claim on the watchdog end above: it's the crash @NickStallman fixed in #566. A repeat run on my RX 9060 XT (same
f482572a-based build, which doesn't have #566) ended the same way, and both logs haveinline ray scene or geometry changed after recording, rejecting submission, thendirect queue rejected a guest command-list batch (0x80070057); its later batches are dropped. The compute label waits with no writer were only the direct lists that never ran after that. I missed that line the first time. Sorry for the noise; I'll check whethermaingets past it here and say so on #566 only if it doesn't.Imported from brcly/TuxBox. Originally posted by Jerkin42 on 2026-11-30T14:23:31Z.
Proposal (focus 1, a translator change, so asking before a PR): the black picture in ProjectScarlett is the FSR4 post pass.
CS 3727a000(fsr4_model_v07_fp8_no_scale_postpass, FSPX config ending0x12039c, 256x1x1).PS_CopyDitheringthen present that zero: I dumped the frame going into the copy, and it held only dither values (0–4 of 1023).fspx/resolve.rsthat routes this config through the prepass binding check.e5d2e913+ #390/#572/#567 + the clamp: the first presented frames are lit (lit=0.919against0.000on every run before), with sky, aircraft and silhouettes in the opening. Surfaces are still dark, which I take to be the ray-traced lighting passes that are still stand-ins.@brcly OK to open it as a PR? Nobody else seems to be on FSR4 here; say if I missed someone.
Imported from brcly/TuxBox. Originally posted by KainanP on 2026-11-30T16:11:38Z.
Small translator fix, focus 1:
v_cvt_flr_i32_f32andv_cvt_rpi_i32_f32cast with an unsaturated(int), which is undefined in DXIL out of range; a constant source even fails DXC validation. #591, CPU-tested only; it needs someone to run the GPU translator checks.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-30T17:59:16Z.
Claiming a Focus 1 (
xshader) fix for unguarded inactive-lane and invalid-pointer loads ontb_bvh_heap(and vectorpointer_wordsloads in general).What we observed (RX 6900 XT,
RADV_DEBUG=hang, ProjectScarlett 1.0.2.1 offline,87298944+#389/#589/#590, both section mode andTUXBOX_XMEM_PRIVATE_VIEWS=1):RADV_DEBUG=hangcaptures faulted identically in compute shader571d96cad08597a9.dxil(DISPATCH_INDIRECT,CLIENT_ID: TCP,RW: 0,PERMISSION_FAULTS: 3).OpAccessChaininto%tb_bvh_heap/ descriptor set 103 binding 3 +OpLoad), an inactive lane ((exec_lo & 1u) == 0) retains a stale float in its address VGPR (e.g.-0.00829f=0xbc07e000), adding ~3 GiB totb_bvh_heap(0x800126b80000->0x8001e2bfe000) well past the 64 KiB root SRV and triggering the GPUVM read fault before the result is discarded byOpSelect.tools/shader-compiler/src/hlsl:emitter/scalar_memory.rs(pointer_words, when!scalar) computes the byte offset and emitstb_bvh_heap.Load(...)/ buffer.Load(...)unconditionally on all lanes, only guarding the destination write inwv(...).bvh_node.rs(emit) callstb_bvh_intersect(...)unconditionally on all lanes (only guarding destination writes withwv), andtb_bvh_intersectissuesnodes.Load4(...)before rejecting invalid nodetypevalues (type > 1u && type != 4u && type != 5u).Plan: keep the PR focused to
tools/shader-compiler+ unit tests (descriptor_address.rs), mask/branch vectorpointer_wordsandbvh_node::emiton(exec_lo & 1u), move the invalid-typeearly return abovenodes.Load4intb_bvh_intersect, and verify with unit tests,--no-gpu, dual-GPU checks (RX 6900 XT + Raphael iGPU), and live ProjectScarlett runs.Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-30T18:26:49Z.
@DrArroway this matches the fault that ends every run on my RX 6600 (RDNA 2, 8 GB,
1002:73ff, RADV / Mesa 26.3.1, GE-Proton11-14,descriptor-bytes=64/16), so I'd like to test your branch as soon as it's up.Same signature:
vkd3d_queueon ring 24.PERMISSION_FAULTS 0x3,MAPPING_ERROR 0,RW 0, GCVM status0x00701030.Same address range: 8 runs today on
e5d2e913and87298944, Series S and packaged, all faulted in0x8001e5…–0x8001ed…, mostly the last pages below a 2 MiB boundary. Some of them:0x8001e94ff000,0x8001e99fd000,0x8001e91ff000,0x8001e7ffc000,0x8001e9dfd000. One run that waited at the account picker faulted at0x8002344b0000. Details are in my last comment on #472. Your0x8001e2bfe000fits that pattern.What hasn't helped: @Jerkin42's index-map padding made no difference here (3 of 3 runs faulted with it, 3 of 3 without). That fits a different cause, such as the inactive-lane loads you found.
On #389: on an older base (
fd636d09+ #501 + #389, private views), #389 removed this fault on this card in 3 of 3 runs. Your build had #389 and still faulted. Maybe the wider mapping only catches some of the stray addresses, and on this card they happened to land inside it.I can run your branch on current
mainin Series S and packaged mode, with and without private views, and report the fault pages or how long it runs in the world.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-30T19:02:44Z.
@1093i3511 The PR is up now: https://github.com/brcly/TuxBox/pull/594 (
fix/xshader-bvh-inactive-lane-loadonDrArroway/TuxBox, rebased onbbc26254).Quick summary of our before/after runs on RX 6900 XT (RADV / GE-Proton11-14,
TUXBOX_XMEM_PRIVATE_VIEWS=1+#389/#589/#590):TCP PERMISSION_FAULTS: 3read faults in0x8001e...–0x8001f...within 3–36 demo frames (571d96cad08597a9.dxilin 2/2RADV_DEBUG=hangdumps).RADV_DEBUG=hang: ran 1,036.8s (21,969 frames, 50+ 3D demo frames) with 0 GPUVM faults, exiting on the unrelated 6.09 GiBmap_private_contiguousPrivateSpanalias fault (blocker=...).RADV_DEBUG=hang(VKD3D_CONFIG=no_upload_hvv,breadcrumbs): 385.2s (9,616 frames, 49 3D demo frames) with 0 GPUVM faults, again hitting that samePrivateSpanalias fault; one earlier run hit a separateTCPread fault at0x80033d962000(sparse image region, not0x8001...).Interested to hear how it behaves on your RX 6600 (
1002:73ff) in Series S / packaged and both memory modes!Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-30T19:12:46Z.
Claiming the
#501follow-up inruntime/xmem(physical_pages/private_views.rs): chunkingmap_private_contiguousatPRIVATE_SPAN_CHUNK(4 MiB) and adding multi-span fast-path support tounmap_private_view_range.Why: In live ProjectScarlett runs with
TUXBOX_XMEM_PRIVATE_VIEWS=1on top of#594(0 GPUVM faults after 1,036.8s /RADV_DEBUG=hangand 385.2s / 49 3D demo frames withbreadcrumbs), runs consistently hit:secondary alias ... fault not promoted (err=170, write=true, ..., blocker=<va>@0xf00200000..0x1085e00000(page_imp=false,span_imp=true,span_held=true,def=0))0xf00200000..0x1085e00000(99,776 pages, 6.09 GiB) is the contiguous Xbox GPU page pool mapped in a singlemap_private_contiguouscall without splitting atPRIVATE_SPAN_CHUNK(4 MiB), so one GPU import hold anywhere inside that 6.09 GiB pool locks the entirePrivateSpanand blocks secondary-alias write promotion on unrelated pages (page_imp=false, span_imp=true).Plan:
map_private_contiguousmappings atPRIVATE_SPAN_CHUNKboundaries with full atomic rollback and preserveOk(false)fallback for plainVirtualAllocreservations.unmap_private_view_rangeto unmap contiguous ranges spanning multiple 4 MiBPrivateSpans cleanly.BackingRunsplitting, and independent promotion of an unheld chunk while another chunk holds a GPU import pin, then verify live + dual-GPU before opening the PR.Imported from brcly/TuxBox. Originally posted by 3kynox on 2026-11-30T19:22:23Z.
Status for the console BVH rows, to keep the table current:
a2650681still lose the GPU; the numbers are in this comment on #586. Next: the same runs on main, which has #594 and #595 since.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T21:05:16Z.
@brcly @csj0oe a question before we build anything on the deferred material programs refused for "complete waves" (the family #542 was about; 13 pipelines in ProjectScarlett's failure table, and we think the flat surfaces are the main reason the picture is wrong). From reading the instruction streams:
quad_permDPP moves), then picks between two versions of one coverage test: the pixel's own value, or the sum over the quad. On the console that branch is wave-wide: if any quad in the wave has a helper, every lane takes the own-value arm. Which quads share a wave is the console rasteriser's packing, so no host can reproduce it exactly.The question: is "a result the console can produce for that quad" good enough to admit, knowing it isn't bit-identical to a given console frame? If not, only the two programs where both arms are provably the same can come in, and the rest stay refused. We'd build on csj0oe's kept branch with credit; csj0oe, please say if you'd rather do it yourself.
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-30T21:19:37Z.
Follow-up PR for the
#501xmemprivate-views follow-up claimed above is up at #600:map_private_contiguousatPRIVATE_SPAN_CHUNK(4 MiB) boundaries with atomic rollback + multi-spanunmap_private_view_range.Pool::handoff_private_backinginsecondary_alias_vehbefore read-only mirroring for both unheldPrivateViewand (unheld or held)PrivateArenabackings inside held 4 MiB spans (notifyingbacking_invalidation_callbackwhen handing off a heldPrivateArena).aliases == 0SharedSectiontokens back toUnbackedunder private-views mode.tuxbox.py checkon AMD Radeon RX 6900 XT (1002:73bf) (17 passed, 0 failed) and AMD Raphael Radeon 610M iGPU (1002:164e) (17 passed, 0 failed),tuxbox-xmemWindows unit tests (40 passed, 0 failed, 1 ignored), explicitTUXBOX_XMEM_PRIVATE_VIEWS=1dual-GPUxmem+d3d12-buffer-importchecks on both GPUs, and 3 live ProjectScarlett runs on RX 6900 XT (0err=170,0XMemMapPhysicalPagesfailures,0GPUVM faults).Imported from brcly/TuxBox. Originally posted by brcly on 2026-11-30T21:25:02Z.
@NickStallman yes, admit it. A result the console can produce for that quad under some packing is the right standard here, since no host can reproduce the console rasteriser's packing anyway. Build on csj0oe's kept branch with credit, and include a GPU check that the both-arms result matches each arm's quad case.
@Jerkin42 yes, please open the FSR4 PR. Nobody else is on it.
Imported from brcly/TuxBox. Originally posted by 3kynox on 2026-11-30T21:40:52Z.
Update on the console BVH rows. The wiring (#596, draft) is blocked on two things outside it, written here so nobody repeats the hunt:
VS 281b4977/PS 96e8aaaa) within three minutes, two runs of two. With it, never in those draws. It is open and conflicts with main; I have it ported cleanly onto0b889d74and can pass that to its author.0b889d74a run without the console structures lost the GPU after nine minutes of the world (one run, RTX 4070 Ti SUPER;a2650681went 25 and 35 minutes). So I cannot measure the switch against main for now. The report is in the comment on #586.One question is open for @brcly on #586: where the node buffer should live on a card that is already full. Until these move I am not starting the dynamic structures.
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-30T21:53:31Z.
Claiming the ProjectScarlett
0x80000003(EXCEPTION_BREAKPOINT) investigation on the streaming resource-placement worker (game_scarlett_master.exe + 0x4DA6315and sibling+0x9DFC18, both under+0x2593E91), seen on both shared-section andTUXBOX_XMEM_PRIVATE_VIEWS=1runs on AMD Radeon RX 6900 XT (1002:73bf).What we found so far:
+0x4DA6315minidumps (datResource::PointerFixup),RSIis alwayschunk[0] + 0x08(0x50000000virtual chunk mapped in the0x300000000..0x8ffff0000XMem aperture) and[RSI]holds invalid non-0x50000000bytes; a 6th run hit sibling+0x9DFC18on the same placement worker checkingchunk[0] = 0x377980000(0x2c1f0bytes) with hash values on the stack.runtime/xcrdapion40a69c3f(145,190 requests / ~11.1 GB decoded; 2 known BC6HTO_PAGESrefusals logged at enqueue,failed=0,cancelled=0) and ruled outxcrdapiqueue races: all 17fiDeviceDirectStoragequeues usemanual=true(auto_submit=0),TO_PAGES changed submit->run = 0,TO_PAGES zero token at run = 0,zlib_continuation = 0,inflate_partial_file_chunk = 0,cancel_in_flight = 0.chunk[0], live XMem token/backing state, recent XMem page/token history (write_pages,note_write,map,unmap,free,handoff), and anyd3d12_xspublish_mipwrites into low aperture space (< 0x10_0000_0000).Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-11-30T22:19:46Z.
@DrArroway one observation that may or may not connect with yours. On an RTX 5090 (GE-Proton11-15 and 11-14, main
d00006b2ande5d2e913plus PRs) we get 63 failed BCPack requests in every run (61 BC1, 2 BC7, decode error0x8007000d"Stalled"), always the same ones. They areto-pagesrequests with a destination of 4,096 bytes and a source of more than that (for example 8,449, 8,441 and 7,154 bytes). You reportfailed=0on an RX 6900 XT, so it looks host-dependent.Earlier we compared the decoder with bcpack-rs on 7,280 chunks and found it equal, so we think the request is short for the chunk the title asks for: the title reads a whole chunk into one page just past a small texture. Our guess (not shown) is a texture size the title was told by a TuxBox answer that differs by host; we have traced the sizes answered with 8,192 and 16,384 bytes at
align=4096(they look likesmall_texture's answers: 128×128 BC1, 256×32 BC3, 64×64 R8G8B8A8 and similar) and found none that is wrong by itself. We hadn't linked it to a crash, and I have no evidence it is one. If your corruptedchunk[0]is near the end of a mapped page range after such a request, the list of our failing file offsets is easy to give.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-11-30T22:42:14Z.
@NickStallman Thanks for flagging that! Across all our AMD Radeon RX 6900 XT (1002:73bf) runs (including the 395s
xcrdapitrace with4,967BC1 and536BC7to-pagesrequests), we hadfailed = 0andrefused = 0across every request type (correction to my earlier post: the 2 BC6H requests on40a69c3falso ran withrefused = 0, failed = 0). So those 630x8007000dfailures on RTX 5090 definitely look host-dependent — likely a driver/alignment difference aroundGetResourceAllocationInfo/small_texture()inruntime/d3d12/src/device/allocation.rs.Good news on our side: our crash-time forensics run just caught the exact root cause of the
0x80000003(+0x4DA6315) crash, and it is independent ofxcrdapi/BCPack — it's anxmemsplit-brain bug inruntime/xmem/src/physical_pages/private_views.rs(map_private_page/map_private_contiguous):PrivateArena(active in bothSharedSectionandTUXBOX_XMEM_PRIVATE_VIEWS=1modes) is mapped into a held deferredPrivatePlaceholderslot (has_hold(at) == true),classify_private_slotreturnedSlotRole::SecondaryAlias.mask_slotthen evaluated tofalsebecause of!self.has_hold(at, at + PAGE), somap_private_pageleft the slotPAGE_READWRITE, skippedpopulate_page_bytes, and did not register it insecondary_aliases.xcrdapi'sacquire_physical_accesswrote the freshly decompressed bytes into thePrivateArena, while the CPU read ancient stale bytes left at the mapped VA with no page fault — hittingdatResource::PointerFixup0x80000003at+0x4DA6315.Implementing and testing the fix now (also covering the sibling held-
old_vaSlotRole::Upgradegap and a concurrent-fault race insecondary_alias_vehwe caught during forensics).Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-12-01T01:21:24Z.
Update on the
0x80000003(+0x4DA6315/+0x9DFC18) streaming-placement crash underTUXBOX_XMEM_PRIVATE_VIEWS=1: opened #608 (https://github.com/brcly/TuxBox/pull/608).Root cause confirmed & fixed in #608:
PrivatePlaceholderslot while its token already had a heldPrivateArenaor unheldPrivateView,classify_private_slotpreviously returnedSlotRole::SecondaryAliaswhilemask_slotstayedfalse(leaving the slotPAGE_READWRITEwithout callingpopulate_page_bytesor inserting intosecondary_aliases), causing silent split-brain reads againstxcrdapiDMA writes into thePrivateArena.PrivateViews on CPU upgrade and masking them oncerelease_holddrops their lastview_hold(mask_released_secondary_alias), plus retrying concurrentsecondary_alias_vehfaults when another thread has already removedfault_pagefromsecondary_aliaseswith compatible committed protection.Verification:
tuxbox.py check(17 passed, 0 failed), explicitTUXBOX_XMEM_PRIVATE_VIEWS=1xmemguest suite (12/12), synthetic D3D12 regression controls (5/5), andtuxbox-xmemWindows unit tests (44 passed, 0 failed) all passed on both AMD Radeon RX 6900 XT (1002:73bf) and AMD Raphael Radeon 610M iGPU (1002:164e).222.4s,324.5s,427.8s;5/5runs total) on AMD Radeon RX 6900 XT (1002:73bf) had 00x80000003(+0x4DA6315/+0x9DFC18) crashes, 0err=170, and 0 unhandled0xc0000005.Imported from brcly/TuxBox. Originally posted by s3rius on 2026-12-01T03:07:58Z.
I could load into the first mission, and audio plays. There were some drawing problems at the start because of lots of skipped draw calls. Wwhich was investigated and mostly fixed. The PR is https://github.com/brcly/TuxBox/pull/610. Few things are still missing:
I will continue on that tomorrow.
Imported from brcly/TuxBox. Originally posted by s3rius on 2026-12-01T03:17:40Z.
Also, I just noticed that tests use GE-Proton11-14, but runtime uses GE-Proton11-15. And few hours ago GE-Proton11-16 was released. We can upgrade proton version to 11-16 and set this version in all places (tests included).
Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-01T03:24:48Z.
What stalls ProjectScarlett at the story intro (RTX 4070 Ti SUPER, 16 GB, GE-Proton11-15, main). Measured over several runs tonight. The order of events matters, because most of what we had been chasing turned out to be downstream of it.
FBK_STRY000_INTROprestream, the number of placed textures TuxBox backs with video memory jumps from about 3 GB to 8.6 GB within seconds (32,768 backed, of 40,281 reserved). With bindless, "first use" means that a texture's view is in a heap a shader could index, so the scene's whole texture set gets backed whether a frame samples it or not.video memory is nearly full: placed texture … put in system memory, reaching 3.3 GB in system memory.CrossQueueBarrier, its watchdog fires, and one run also had Xid 109 (context-switch timeout).Downstream, not causes (each one measured, then checked against the timeline):
gpu_tablecalls under the arena's write lock.All of these start after the spill. With frames lasting seconds, each frame simply covers far more GPU work. @NickStallman's 5090 slow phase (card at about 14 GB, 1.7–2.4 s frames) looks like the same thing.
What I plan to work on next (claiming it here): back and keep resident only the textures the GPU actually samples. The first step is a heap read bitmap, the mirror of the write bitmap: translated shaders mark the heap slots they sample, once per wave. That gives the real per-frame count. After that comes residency and eviction by last use under a VRAM budget, using the reserved images' tile mappings.
Also on main tonight, both opt-in:
TUXBOX_XMEM_SECTION_WATCH(#573) andTUXBOX_LAZY_PUBLICATION. The latter publishes heap-written textures only when something touches their title memory. It cuts publication by about 80%, but it does not fix the stall, and it hasn't yet been checked on a device for correctness.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T03:49:32Z.
@brcly thanks, that's a careful timeline. Two things from the 5090, so the plan doesn't rest on us.
Our slow phase isn't the spill. Our integration builds on main
82109205tob3873ec4, ProjectScarlett's world, 20-minute runs, 1.4–1.7 s a frame on a 5090 (32 GB):video memory is nearly full/put in system memory: 0 lines in three runs. Ledgers at the end: card 13.8–14.0 of 27 GiB in use, textures 6.6 GiB on the card (24,200), 0 in system memory.TUXBOX_CHECK_ONCE_PER_FRAME=1takes placement to 386 ms a frame and the frame to 911 ms (one run each). WithTUXBOX_XMEM_PRIVATE_VIEWS=1(on our integration build with #608) the game stopped at the start of the world, with a GPU wait that never finished and no GPU error; the same build without it ran 20 minutes. One run each.For the heap read bitmap, a picture finding that may be the same table. We can now read back the G-buffer (one run, RTX 5090). In the world,
normalsand material targets hold the real scene, but the colour target is exactly zero for the world's surfaces (walls, buildings, tables; 65% of the screen), while character skin and clothes are textured. In every rununmapped indices holdabout 1,050,000 records of the title's 1,245,184-entry heap. #572's draft says why that could matter: the map gives an index a slot only when the API writes it, and a record the title copies there by ordinary stores at an index the API never wrote stays unmapped, so a shader reads the null view. Edited twice: I first downgraded this, because the first capture could save a target partway through a frame. A corrected capture (each copy read after its batch ran) now confirms it: in one frame the world's draws write colour exactly (0, 0, 0) with alpha 5 over 59% of the screen, with normals and material right. The same capture shows the light buffer nearly static between two frames (an older shot, mean level 10.69 to 10.67) while the surface buffers change, so there are at least two faults. I also haven't shown that's what those surfaces read. An experiment that maps those records is being written. If your read bitmap records reads of unmapped indices too, it would answer it directly; that would be worth a counter.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T11:04:25Z.
Claiming the mesh stages of #610's mapped root: #617 (draft) translates mesh and amplification stages with the resource index map appended, so under descriptor paging they no longer read heap indices as slots of the smaller visible heap. Lanes
mesh-heap-readfails on main on both our cards and passes with the change on the AMD one; the full checks are still to run.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T11:57:05Z.
Claiming rooted compute constants as a follow-up to #611: #619 (draft, stacked on #611) places a compute program's root constants from its records, so constants behind three tables and a root SRV no longer read zero (81 recorded requests on each host). Lanes
compute-root-constantsfails on #611's head and passes with the change on our AMD card; the RTX 5090 run is still to come.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T12:14:34Z.
Claiming a preparation count fix: #620 (draft). A request that compiles only through the stride-table retry was counted compiled when fresh and unsupported when cached, so the same build reported 1,193 or 1,452 unsupported depending on the cache. Launcher-side only; tests fail on main.
Imported from brcly/TuxBox. Originally posted by 3kynox on 2026-12-01T12:26:51Z.
Unstopable Nick :)
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T14:57:10Z.
Opened #622 after #618: the Series S trial cuts its network with the launcher's own offline wrapper instead of Bubblewrap, so the registry step works on hosts where a namespace can't be nested inside bwrap's (it failed there on every launch).
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T15:08:56Z.
Claiming the entry-live reads through a destination: #624 (draft). Accumulators and partial writes read their destination, so a launch register first used that way kept its declared 0; in one title 1,385 pixel programs read the fragment position that way and got x = y = 0. Like #611 it changes many translations (mostly the entry-live comment line), so it waits for agreement here. AMD passes, and the control fails with the position at 0; the RTX 5090 is still to come.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-01T15:13:33Z.
Main today (up to
61a64d31), and what changed for everyone.At ProjectScarlett's story intro (RTX 4070 Ti SUPER, 16 GB) frames went from about 0.2-1 fps with the GPU 9-20% busy to about 2 fps with it 88% busy. The causes, measured with the submit profiler and a new lock counter:
738d082e, with a unit test that took 44.8 s before).e40d8052; each turns off with0):TUXBOX_READ_RESIDENCY: a bindless batch backs only the textures its programs read in the last 120 frames. Card memory at the intro stays at 7.3-8.7 GB instead of 13 GB plus spill. A texture no program has read yet reads zeros for one batch. It changes the roots of programs that index the heap, so they translate again.TUXBOX_LAZY_PUBLICATION: now also covers bound render targets, and publishes at once a texture that shares a page with another image. Publication went from about 3 GB to 1.1 GB per 5 s.TUXBOX_CHECK_ONCE_PER_FRAME(#590): digest time went from about 1.2 s to 0.2 s per 5 s. A CPU write between two batches of one frame is uploaded a frame late.56627188): an index past the map now reads slot 0 instead of past the buffer. That was one cause of the Xid 13 at the prestream here; it didn't recur in two runs since.The intro is now GPU-bound, with the time spread over many pipelines (none over ~9% of samples).
TUXBOX_GPU_TIMING=1from #532 is the next tool for that. New opt-in diagnostics are indocs/ENVIRONMENT.md:TUXBOX_LOCK_STATS,TUXBOX_STACK_SAMPLE,TUXBOX_STALL_DUMP,TUXBOX_GPU_SAMPLE,TUXBOX_REPLAY_TIMES.Also merged today: #535, #549, #515, #522, #558, #519, #555 and #523 (rebased onto main), #613, #614-#616, #608, #617, #618. #523 and the translator changes mean one more full shader recompile.
If you report a result from now on, please say whether it is before or after
e40d8052, since the defaults changed.@s3rius on the Proton version: agreed, one version everywhere is better. A PR that sets it in one place, for the launcher and the checks, is welcome; the full check should pass on it on an NVIDIA and an AMD card before it switches.
Right now I'm targeting GE-Proton11-15; it uses the latest VKD3D, which includes major updates to things like DXIL-> SPIR-V compile time, which is a bottleneck on Proton-Experimental, but is not with GE-Proton11-5.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T16:05:42Z.
Claiming three small mesh fixes, filed together as drafts: #627 (the stride-table root builder handles a root whose parameter headers come last), #628 (a flat load's data field isn't a launch register read), and #629, stacked on #627 (mesh pipelines retry with the heap's stride table, as compute and vertex/pixel already do). Together they translate 5 refused impostor mesh requests in one title; nothing newly refused.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-01T16:09:29Z.
Status from the RX 6600 (8 GB, RDNA2), all on current main after
e40d8052:VirtualProtect, which crashes Lanestexture-publication. The fix with a unit test is ready on a local branch; the PR follows a ProjectScarlett run with it.fb17e160now. Next is a default-settings Series S run, andRADV_DEBUG=hangwith the binding history if it still faults.Order: #603 defaults run, then the same run with the #625 fix as its comparison, then the #472 runs.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T17:13:31Z.
Opened #630 (draft): the placed path refused a paired depth image that starts in UNORDERED_ACCESS with E_NOTIMPL, and ProjectScarlett asserts on it while loading (a 768x768 R16 cube). It now parks the depth surface in COPY_SOURCE, as the committed path already does since #519. A run on current main is going now; I'll take it out of draft once it gets past that point.
Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-01T17:45:33Z.
@NickStallman a quick check on your drafts before we go further: which of these are ready for review, and which are still in progress?
Mark the ones you consider ready, or say here, and I'll review them in that order. No rush on the rest.
For context, main changed a lot today (summary above), including three translator fixes of ours for refused compute programs (
6010fc88,93324a2b,218ee6ec,e50b77de) and #523's codegen rewrite, so a rebase may be needed.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T17:49:49Z.
Thanks. Ready for review now (marked), in this order:
fb17e160.833e1217.Still drafts:
All of them merge cleanly on current main.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T17:57:43Z.
Opened #632 (draft): read residency can't keep a texture read at a host heap index past the heap bitmaps (1,048,575). That happens where vkd3d-proton reports a 16,000,000-descriptor heap (descriptor heap extension with resizable BAR). The change gives such a heap no more host slots than the bitmaps name. Shown by a unit test that fails on main; no card here reports the large limit, so it isn't seen in a run. Full checks are running.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T18:09:10Z.
Opened #633 (draft): compute programs now declare the console's group-memory size instead of the full 32 KiB, which limits how many groups an SM holds. 783 recorded programs change, only in that line; 8.7% faster on a latency-bound microbenchmark on an RTX 5090. Full checks on both cards are running.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T18:57:21Z.
Opened #636 (draft): each distinct SetSampleMaskX quad mask that has no desktop equivalent is now logged with a count, instead of only the first one per process. Logging only; checks on both cards are running.
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-12-01T19:42:50Z.
Claiming #634 (AMDGPU
-EPERM (-1)CS rejection under defaultTUXBOX_LAZY_PUBLICATION): tracking liveOpenExistingHeapFromAddress*userptr ranges againstlazy::deferand releasing/publishing any overlapping deferred textures before opening a userptr heap (keepingPages::protect/Pages::releaseuntouched so it stays independent of#625).Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-01T20:54:31Z.
Evening update from the RX 6600 (8 GB, RDNA2), all after
e40d8052. The plan from my last comment didn't survive contact:fb17e160stopped at the slot 133 assert in Series S (#519, fixed by #630), so I ranfb17e160with #519 reverted locally. Default lazy publication can't be used on RADV here (#634, now claimed by DrArroway), so every run hasTUXBOX_LAZY_PUBLICATION=0. Results are on #603: the TCP read fault in three of four runs, Series S and packaged, 430 to 894 s.lazy.rs.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-01T23:38:00Z.
A measurement on
16a95a61(single-pass descriptor waterfalls), in case it helps decide its scope.It applies under
resolve_wave32only. Ordinary compute translations keep their loops. On upstream066b6bbe, four ProjectScarlett skinning and hair compute programs that we had found expensive still translate with their waterfalls, in the ordinary form and with--wave32-hostalike:NonUniformResourceIndex00fed6ad25fa6dd2468ede4bf8a81289The loops have the shape your rule accepts:
s_load_dwordx4/x8from the heap, then only buffer loads and waits. Wave64 programs also haves_andn2_wrexec_b64/s_mov_b64.A microbenchmark of the same loop shape ran about 25% faster single-pass, so that's the most it could give the 64 ms program.
Would widening the gate to ordinary compute translations be sound with your liveness rule, or is there a reason it's limited to the one-lane-per-thread forms? If it's wanted, we can do it as a follow-up with your GPU check.
🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-01T23:45:22Z.
@NickStallman thanks, that's a useful measurement, and 64 ms a frame on
00fed6adis worth going after.The gate is
resolve_wave32only because that's the one mode where I could be sure the read goes through the per-lane template. The rewrite removes the compare and the back branch from the instruction list, so a mode that handlesv_readfirstlane_b32itself would give every lane the first lane's index and nothing would refuse it. The liveness rule doesn't depend on the mode.Widening it to the ordinary forms is sound where each host thread is one console lane and scalars are per-thread variables, with three conditions:
s_andn2_wrexec_b64and the 64-bit EXEC save/restore. The "mask starts as EXEC" check has to look at both words.emit_own_lane_read, then retry without the rewrite. Lockstep, indexed-lane and lone-lane each handle first-lane reads their own way. A wrong guess there should cost a refusal, not a wrong result.NonUniformResourceIndexalready comes from the marked descriptor loads, sobind_heapneeds nothing new. For the GPU check, please add cases tocheck_descriptor_waterfall.pyin the forms you widen to (ordinary wave32, and wave64 on a wave64 host), with lanes outside EXEC and a key per lane, as the resolve cases have. A follow-up PR from you is welcome.Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-12-01T23:48:37Z.
Closing out our #634 claim: PR #640 merged at
124b97e29efc24010df27ab2e2df0536d288b837and #634 is closed.Quick AMD boot-to-gameplay report for tracking:
AMD Radeon RX 6900 XT (1002:73bf), Mesa26.3.1-5(RADV), kernel7.3.7-1-cachyos,GE-Proton11-15cb4631ba(b279360a+ #640),TUXBOX_LAZY_PUBLICATION=1,TUXBOX_TRACE_GPU_FAULT=1(noTUXBOX_XMEM_PRIVATE_VIEWS)1,733.9s(~28.9 min),14,454presents — cleanly passed intro and cinematic into playable prison gameplay with controller input;0-EPERMCS rejections,64+clean lazy-publicationpublished on accessVEH recoveries, and0 MiBtexture system spill (card 13,819 / 15,530 MiB). Eventually hit #603 (fault trace posted there).Imported from brcly/TuxBox. Originally posted by Kayotic1337 on 2026-12-02T01:20:30Z.
Update on "GPU reads of destroyed placed textures" (#603):
placement::submit, so a title release could destroy one while that work was still on the GPU. The PR keeps them until the queue's fence passes the batch. On my RX 9070 XT, the TCP read fault came in all five runs without it (11–27 min). With it, one run went 43.7 min without it. That's one run, and NVIDIA is untested. Confirmation runs on other cards (@NickStallman, @DrArroway, @1093i3511) would help most. Details are in the PR and #603.CS a8ffc289(request0edf3abb…). It ended that run. The same kind of fault ended an earlier run without the change, which had no trace. I haven't looked into it yet.🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-02T06:45:57Z.
Update for our rows (after
e40d8052, RX 6600, Series S):3e2839b1(includes #640). Lanes 31/31 with lazy publication on.3e2839b1with defaults reached the world and hit the TCP read fault again after 446 s (ring reset succeeded).Imported from brcly/TuxBox. Originally posted by revonateB0T on 2026-12-02T09:14:08Z.
https://github.com/brcly/TuxBox/issues/649 Working on UMA Host memory optimization.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-02T11:08:07Z.
A regression report: since
9c3cf86f("Correcting D3D12 and XMem Behaviour"), ProjectScarlett exits with code 5 at the title/menu on an RTX 5090 (620.70.10, GE-Proton11-15, default settings, warm caches). The title's crash handler fires, and there is no GPU error.Bisect, one run per commit, which is enough because the failure is deterministic:
6d4f1cd7ran 5 minutes clean.9c3cf86f,8f5bb16c,68f5a433,d2985fb3and1ce50737each exited at 77–81 s.First failure: a CBV at an address nothing resolves. The fatal access violation is a NULL dereference in vkd3d-proton's
d3d12_desc_create_cbv, called fromCreateConstantBufferViewinviews/mirrors.rs(cbv()).buffer_at()returnedOk(None)for that address: no committed page, andgpu_reservation()returned 0. Socbv()passed the title's own address to vkd3d asBufferLocation, and vkd3d's VA map has nothing there.6d4f1cd7the same kind of CBV went to the mirror path with committed pages (the "page remap replaced imported range" lines). That fits queue page remaps having also mapped the CPU side before this commit made the page table GPU-only. That part is inferred from the code.sparse_bufferreturningNone, no XMem reset callback, and reverting the XMem side of9c3cf86f.Second failure, behind the first. With a local guard that sends such a CBV to the existing CBV mirror (
buffer_at(..., required = true)incbv()), the run gets to 293 s and then stops on:followed by the title's crash handler.
We're tracing why
gpu_reservation()is 0 at those addresses: which XMem profile the title reserves them with, and whether its page mappings there were refused. Happy to run anything you'd like on this card.🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by 3kynox on 2026-12-02T11:11:46Z.
Same on an RTX 4070 Ti SUPER (620.73.04, GE-Proton11-14, Intel CPU):
d2985fb3exits with code 5 before the world, 3 runs of 3. A log line incbv()caught one CBV without an owner before the crash: 256 bytes in a page that is reserved but not committed (MEM_RESERVE),gpu_reservation()0.6d4f1cd7with #647 on top reaches the world in every run so far (6 of 6). We run the switch-off/on control for #586 on that tree.Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-02T12:49:26Z.
Thanks for
1b4ed472. A heads-up from testing the same change here: we had the same rule locally (a graphics protection bit,protect & 0x7800, giving the aperture an ID), together with buffer views that follow the page table. On the RTX 5090 that ran 8 minutes with no exit 5 and no refused mappings. But the screen stayed black the whole run: presents at 60 fps, the captured frames all zero. On the same harness,6d4f1cd7showed the title within a minute.What failed:
That is the title's 4K sRGB render target in the 0x900200000 aperture.
From the code: with the aperture now having an ID,
guard_fixed_resourceafterCreatePlacedResource2reachesfixed_placement()(page_mapping/buffers.rs). That returns E_NOTIMPL because the title has already page-mapped those pages. Before, with ID 0, the guard returned Ok and the image became a plain device image ("not committed guest memory; keeping a device image", as in 9c3cf86f's run).The failure line is
log_once, so other images may have failed the same way without a line.We're testing a variant now where such an image keeps an unguarded device image. Whether an RT over page-mapped aperture pages should ignore the mappings or follow them is your call. I'll post the result.
🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-02T12:54:05Z.
The follow-up to the black screen. With the aperture ID, plus images whose
fixed_placementguard returns E_NOTIMPL kept as plain device images, the 4K target exists and frames are no longer black:The run then stops at 97 s on the next check:
After that the title's crash handler exits with code 5. That message looks like it comes from
1ce50737("support ordered buffer and texture access within one draw or dispatch").So the chain on this card is:
1b4ed472);fixed_placementrefusing the title's render target over page-mapped pages, which gives a black screen;Each is one run; tell me if a trace at any of these would help.
🤖 Generated with Claude Code
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-02T18:12:39Z.
An RDNA 2 data point for
9c3cf86f, from Lanes on main1b4ed472(RX 6600,1002:73ff, RADV / Mesa 26.3.1, GE-Proton11-15, host profilesection-import=substituted):lanes-selftest30 pass, 2 fail.queue-page-mappings(new in9c3cf86f)copy ordered GPU mapping failed: 0x80004001ray-tracing-rehydratemap physical pages for the GPU failed: 0x80004001; passed on3e2839b1texture-publicationBoth come from the check that
9c3cf86fadded togpu_tile()(runtime/d3d12/src/device/heap/gpu_tiles.rs). It returns E_NOTIMPL when the page also has a CPU view and section imports aresubstitutedorrefused:With
TUXBOX_HOST_PROFILE=section-import=aliasedforced, both scenarios get past the mapping call and then fail on data, as expected when the import really is substituted:mapping order sample 0: expected 0xabcd0001, got 0, and rehydrate's ray 2 finds no hit. So on RADV hosts that substitute section imports, every queue page mapping (CopyPageMappings*) of CPU-mapped XMem pages is refused. Our reading is that ProjectScarlett's copy-queue batches into its streamed GPU range then fail on these cards, much like the missing-ID case that1b4ed472fixed.Is the refusal meant as the final behaviour for substituted hosts, or is a mirror path for them planned? Until then, Lanes on RADV fails these two scenarios on main;
c1139ab2gives the same 30 pass, 2 fail.Game runs on
c1139ab2(same card, Series S through--graphics-profile series-s, and packaged, defaults, warm caches): every run without private views stops in the same place, right after the title reads its saves on leaving the start menu:The title's watchdog then ends it with exit 5 at 116–121 s (4 runs: Series S defaults, packaged defaults, Series S
TUXBOX_XMEM_SECTION_WATCH=1 TUXBOX_CHECK_ONCE_PER_FRAME=0twice). On1b4ed472it was the same line. That matches @NickStallman's 97 s stop on the RTX 5090, so it isn't vendor-specific. WithTUXBOX_XMEM_PRIVATE_VIEWS=1the refusal does not appear, but the runs end at 91 s (watchdog) and 58 s (VK_ERROR_DEVICE_LOST, no amdgpu fault in the kernel log).For #472: in the menus, the frame median is 14.8 ms with private views, against 27–35 ms with the defaults or section watch alone. That repeats the earlier ~2x gap on
717a74c4. The runs are too short for the write-fault question.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-12-02T18:52:04Z.
Slow story-intro frames on an RX 9060 XT: who owns placement and publication latency?
Before I write any code for this, I'd like to know whether someone already owns it.
On my RX 9060 XT (RADV, Mesa 26.3.1, GE-Proton11-15, private views; lazy publication, read residency and once-per-frame at their defaults;
53782eed+ #657), the story intro runs at 3.6 s per frame (median of 42 frames) while the GPU is about 5 % busy (gfx 5.4 %, compute 2.8 %, from amdgpu fdinfo engine time). Nothing spills: the texture ledger has 0 placed textures in system memory.What the submit profile and frame log show over those frames:
ExecuteCommandListscalls come from the presenting thread. It spends 1.0 s per frame inside them (32 %), 0.74 s of that in placement: upload 0.26 s, gather 0.12, scan 0.10, readback 0.10, digest 0.07. No single step dominates.GPU worker fence stalled, waiting over 3 s for batches up to ~30 ticks behind.So unlike @NickStallman's 5090, where placement was most of a 1.2 s frame, placement here is about a fifth of the frame. @Jerkin42 saw the same on this card with #590 ("the rest of the frame is mostly memory-wait holds").
One thing in the code I'd like an opinion on. After every batch that may write a placed texture,
placement::submitmakes the queue wait for its publication worker (queue.Wait(&worker.published, tick)). With lazy publication on, that also happens when every write was deferred and there is no readback, so the queue waits for a CPU round trip with nothing to publish. I also suspect that on RADV these GPU-side waits hold more than their own queue: vkd3d-proton spreads all D3D12 queues, TuxBox's own copy queues included, over 1 graphics and 4 compute rings. That part is a guess so far.Next, I want to sample the render thread's stacks (
TUXBOX_STACK_SAMPLE=1) to see what fills those 2.4 s, and time the publication gates per queue. I haven't runc1139ab2yet; the gate is unchanged there.@brcly, is placement or publication latency something you or someone else is already working on? And once I can show what it costs, would you take a change that skips the gate for batches with nothing to publish?
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-12-02T20:09:40Z.
@NickStallman your third step reproduces here on
c1139ab2: RX 6700 XT, RADV, 3840x2160, three runs of three. On this tree I get no import failures, and the title reaches the account picker. Thencannot order buffer and texture accessesfails the present, and the watchdog exits with code 5 at 113-119 s. 1093i3511 sees the same on an RX 6600 above.I'm tracing and fixing this one in #661. A logging build showed the refusal comes from the first check in
handoffs::plan. The batch has no phases, and a fixed or mirrored buffer write overlaps the first 64 KiB of a mapped image it reads. Both are true at once, so I don't know yet which one is the real cause.If you still have a trace from your 97 s stop, especially what the refused batch held, I'd be glad to compare. You don't need to run anything new for it.
Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-12-02T20:15:58Z.
A correction to my question above: I measured the publication gate, and it isn't the problem.
Same RX 9060 XT and build (
53782eed+ #657), one more run with a local timing patch on the publication worker andTUXBOX_STACK_SAMPLE=1, over ~110 slow story-intro frames (median 3.5 s, GPU 2-5 % busy):WaitForSingleObjectfrom one of the title's wait wrappers, with no TuxBox frame on the stack. About a sixth is in TuxBox, mostly placement (the write-watch scan inGetWriteWatchand waiting for the check pool). With the sampler on, placement took 0.5 s more per frame than without, and the frame time didn't change, so placement doesn't seem to be on the critical path here.PagePools::import/reuse_pagehost imports (vkAllocateMemory) and in freeing descriptor backings (vkFreeMemory), and the title's five job threads block on that pool's mutex while they record command lists (4-8 % each).Next, I want to find out what the render thread waits for: a sampler that keeps a few more title frames, and timing of the title's fence events. If it waits for the GPU, the question becomes which label waits hold the batches for those ~1.8 s. I'll post what I find.
Imported from brcly/TuxBox. Originally posted by snoozedDev on 2026-12-02T20:35:46Z.
Taking a small
tuxbox-xmemprivate-views fix; the PR follows within the hour unless someone already has it.With
TUXBOX_XMEM_PRIVATE_VIEWS=1,XMemMapPhysicalPagesreturns NULL withERROR_INVALID_PARAMETERwhen a second mapping of the same pages crosses a 4 MiB boundary. Since #600 a contiguous map is cut into one private span per 4 MiB chunk, and each span is its own OS allocation.protect_runsstill passes adjacent pages to oneVirtualProtectcall, andVirtualProtectrefuses a range that spans two allocations. A plain 8 MiB double mapping hits it every time. It is also one of the two causes of the raregpu_pool_then_plain_cpu_view_upgrades_backing_and_keeps_mem_privatefailure I left untraced in #659.I haven't run the game, so I don't know whether the title makes such a call. The provider logs
XMemMapPhysicalPages failed ... err=87when it does.@DrArroway @1093i3511 private views is your area; say if you'd rather handle it or want it done differently.
This contribution was written by an AI agent (Claude Opus 5.5) operating under my supervision. I am accountable for it and will respond to review.
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-12-02T20:41:18Z.
@snoozedDev Thanks for picking that up — splitting
VirtualProtectruns at the 4 MiBPrivateSpanboundaries is the exact right follow-up to#600, so#662looks clean and good to keep on your end.Sharing a quick
c1139ab2status note onAMD Radeon RX 6900 XT (1002:73bf)(RADV /GE-Proton11-15,3840x2160,TUXBOX_XMEM_PRIVATE_VIEWS=1, with#657cherry-picked) from pushing locally past the#661handoffs::planrefusal into the 3D world — once past#661, three downstreamc1139ab2bottlenecks showed up that we're testing fixes for locally before splitting out PRs:PageCache(LIMIT = 4096) cluster eviction (pages.rs/gpu_tiles.rs): 64 KiBGPU page mappingfallbacks fill the cache and crowd out 2 MiBGPU private clusterreuse (adapter system memoryclimbed to24.6 GiB). Giving multi-page clusters a dedicated weak cache + whole-cluster heldprivate_cluster_window()broughtadapter system memorydown to4.2 GiB.stagingVRAM explosion (queue_copies.rs/queue_use.rs): Monolithic ~520 MiBscratch buffers + per-waitregatherspushedstagingVRAM to17.76 GiB(VK_ERROR_DEVICE_LOST). Chunking scratch to64 MiB+ reusing one gather-only regather acrossWaitPoint::Afterwaits broughtstagingdown to667 MiBwith zero device loss.queue_copies.rs::unchanged(): On0x900200000GPU-mapped textures we measured3,525/3,525(3.8 GiBin 5 batches) being re-detiled becausetexture.queue_watchwatches CPU-unbacked GPU reservations wherewatch.state()seesCELL_UNTRACKED(REASON_UNBACKED), and ~99% of world batches arrive withmay_skip == false(queue.Wait) +WaitPoint::Afterregathers. Currently testingclean_or_unbacked()+ GPU-predicated gathers (SetPredicationevaluated atfence == 1inqueue_use::Worker).Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-02T20:58:51Z.
Today's results from the RX 6600 (8 GB, RADV / Mesa 26.3.1, GE-Proton11-15,
section-import=substituted), for the three threads above.@JeffreyBytes, the
handoffs::planstop (#661). I have no trace of the refused batch, only the onecannot order buffer and texture accessesline. It comes at the same point in every run without private views on1b4ed472andc1139ab2: right after the title reads its saves on leaving the start menu (save: read "Player", thenenumerate blobs of "SettingsProfileSettings"). That's 5 runs: Series S and packaged, defaults and section watch. I can run #661 on this card when it's ready.@snoozedDev, private views. Fine by me, thanks. None of my four private-views runs today (
6d4f1cd7+ #647,1b4ed472,c1139ab2) loggedXMemMapPhysicalPages failed. Here they end on other things: #603, the title watchdog, a fail-fast exception (c0000602), and onceVK_ERROR_DEVICE_LOSTwithout an amdgpu fault.@gtb-sbe, the intro wait. RDNA 2 shows the same pattern. On
6d4f1cd7+ #647 (the tree that reaches the world here), withTUXBOX_FRAME_LOGand fdinfo engine time sampled every 10 s:The game's own engine time (fdinfo
drm-engine-gfx/compute) stays at 1–5 % in the menus, the loading screens and the world. A typical slow frame: 3,637 ms, 1,652 ms of it in submits (718 ms placement), 11 title memory waits ending in the frame that held queues for 5,552 ms in sum, the longest 1,380 ms on a compute queue. So it's the same picture as yours: the GPU mostly idle, and batches held behind title waits.Where
6d4f1cd7+ #647 gets on this card (all runs reach the world, 3:50–5:45 after start):memory ledger: card 7187/7195 MiB), no GPU fault.Imported from brcly/TuxBox. Originally posted by brcly on 2026-12-02T21:10:16Z.
Hey guys,
Sorry for making a bit of a mess of main.
I've pushed a commit that's helped me get the furthest I've gotten while trying to load textures and such.
The game is still having both CPU and GPU and shader issues, pegging at 100% workload and such; however, I managed to get into a textured world for a few seconds at least, and could see a low-poly character.
I'll go through PR's shortly.
EDIT: This came after a large rewrite of a few files, mainly D3D12_XS and XMem and a little bit of XCRDAPI. The current way that TuxBox handles games is "better" however work still needs done as it's taken us a few steps back in some of the optimizations that were made before.
Imported from brcly/TuxBox. Originally posted by DrArroway on 2026-12-02T21:12:02Z.
Follow-up on our previous #533 comment with the rest of our local
c1139ab2findings onAMD Radeon RX 6900 XT (1002:73bf)(RADV / Mesa 26.3.1 /GE-Proton11-15,3840x2160,TUXBOX_XMEM_PRIVATE_VIEWS=1, with#657cherry-picked), plus a technical summary of our localfix1–fix10stack so anyone working on these paths can reuse what was useful.1. Why
pred_skippedwas0 / 7,140(0.0%) on RADVIn our live
fix9run onAMD Radeon RX 6900 XT (1002:73bf), the title reached the 3D world and survived the full 720 s run timeout with zero crashes (00x4d8bd421watchdogs,00x80000101assertions,0VK_ERROR_DEVICE_LOST,00x80004001refuses), butqueued texture copiesstill hadpred_skipped=0/7,140(0.0%), re-detiling 10–13 GiB every 10 s, pushingstagingto4,522 MiBandcardVRAM to20,429 / 16,368 MiB(resulting in heavy desktop/VRAM pressure andpresented 1 frames in 84 s).Root cause in
runtime/d3d12/src/device/placement/queue_copies.rs:host imports disturb the write watch on game memory,quiet_imports == false),amdgpuCS submissions disturbMEM_WRITE_WATCHon imported userptr pages, so XMem marks heldGpuTilebacking watches asHELD(CELL_UNTRACKED), whichWatch::state()maps toState::Check. As a result,host_watchesinunchanged()failed 100% of the time on RADV.gpu_writes::written_since(run, last.seen)expires afterFINISHED = 64batches unlesslast.seenis refreshed on clean checks.Our follow-up (
fix10) handles this without hurting NVIDIA:host_runswatches duringnote_gather, ifrearm().0 == tracking::HELD, stop arming redundant held watches and compute a fallbackhost_digestviadigest_runs(guarded_copy::available()+digest::Hasher::update_guest). When allhost_runswatches stay live (Clean/Heldas on NVIDIA),host_digeststaysNone(zero CPU hashing).unchanged(texture, gpu_now): refreshlast.seen = gpu_nowon clean checks, and throttledigest_runsre-verification underonce_per_frame()oncestable >= 8(invalidated wheneverremapped::PUBLICATIONSadvances, including on scatters).SCRATCH_CHUNK = 32 << 20(32 MiB) to keep chunked scratch VRAM bounded.2. Summary of all local
fix1–fix10changes (c1139ab2+#657)runtime/d3d12/src/device/placement/handoffs.rs,remapped.rs,shader_buffers.rs,planes.rs,page_remap.rs,placement.rs,commands/submit.rs(clearing the account-picker0x80004001wall on RADV):handoffs.rs(plan): whendirect || !stable || overlap == remapped::Overlap::FixedOrMirroredBuffer || buffers.indirect(withstable = stable_gate && !device.state.gpu_mappings.bindings_pending()), degrade viareport_aliasto whole-submission ordering instead of returningE_NOTIMPL, while keeping intra-commandQueueBackeddraw/dispatch conflicts strict and logging real refusals viadiagnostics::log.placement.rs(submit): gatecopies.execute(..., gate_open && !device.state.gpu_mappings.bindings_pending(), ...)on pending GPU mapping bindings.remapped.rs(conflicts_in_batch): replace the hardE_NOTIMPLreturn whenhas_null && writeon RT/UAV textures withreport_alias(...).shader_buffers.rs(Imports::visit): skip non-liveBacking::Fixedentries during conservativeaccesses.indirectscans instead of failing the batch withE_NOTIMPL.planes.rs(color_plane): allowD3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET(0x300005mask on non-BC formats) on both 2D and 3D0x105textures.runtime/d3d12/src/device/heap/gpu_tiles.rs,pages.rs,heap_page_cache.rs(fixing24.6 GiBadapter system memoryleak):gpu_tiles.rs: restrictshared_window()toMEM_MAPPED(Section::chunk_view) so adjacentMEM_PRIVATEpages cannot produce-EPERMCS rejections if unmapped/PAGE_NOACCESS; add whole-cluster held + pinnedprivate_cluster_window()("GPU private cluster").pages.rs&heap_page_cache.rs: addPageCache::get()and a dedicated weak cachePagePools::cluster_pieces(keyed viaspan_key) +PagePools::cached_piece()so 64 KiBGPU page mappingchurn does not evict 2 MiB clusters fromPagePools::pieces.runtime/d3d12/src/commands/page_mapping/buffers.rs,device/placement/tracking.rs,queue_copies.rs,queue_copies/detile.rs,queue_use.rs(eliminating17.76 GiBstaging spill,0x4d8bd421watchdogs, and enabling GPU-predicated gathers):commands/page_mapping/buffers.rs: addgeneration: AtomicU64,overridden: AtomicBool,generation(),has_gpu_overrides(), andbacked_host_runs()toBufferMapping.tracking.rs: addWatch::clean_or_unbacked()(0 | 4orCELL_UNTRACKEDwithlast_reason == UNBACKED) for CPU-unbacked GPU reservations.queue_copies/detile.rs&queue_copies.rs: wrapCache::upload()waits andwait_for_scratch()incrate::title_watchdog::pause(), makeLists.bytes/Lists.kernellazy, chunk multi-texture scratch withSCRATCH_CHUNK = 32 << 20, and add periodicqueued texture copiesstats.queue_use.rs&queue_copies.rs: replace the exclusiveImagesHashSetwith reader-writerSlot { readers, writer }+split_access(), reuse a single gather-only recording (regathers[0]) acrossWaitPoint::Afterlabel waits, and addGatherMode::{SkipNow, PredicateAtHead, Always}withSetPredication(..., D3D12_PREDICATION_OP_NOT_EQUAL_ZERO)+Predication::evaluate()run byqueue_use::Workeratfence == 1before signalingfence == 2— plus thefix10digest_runs+once_per_frame()fallback above for RADVHELDwatches.3. Verification Status (
fix10)Verified on
AMD Radeon RX 6900 XT (1002:73bf)afterfix10edits (build.py lanes):cargo fmt --check: passdevice::placement::queue_Windows unit tests under GE-Protonwine: 12/12 pass (includingdigest_runs_detects_single_byte_change,gpu::predication_skips_detile_and_copy_on_gpu,gpu::dispatch_moves_the_same_bytes_as_the_copy_runs, andqueue_use::tests::*, 0 skipped)tuxbox.py verify --only lanes-selftestwithTUXBOX_XMEM_PRIVATE_VIEWS=1: 32/32 passNot run:
fix10has not been live-tested in ProjectScarlett yet (we stopped live testing afterfix9due to the desktop/app lag), and nothing from today's local stack was tested onAMD Raphael Radeon 610M iGPU (1002:164e).Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-12-03T01:03:32Z.
Taking the device loss on main
106120caon AMD (Not enough memory for command submission, thenVK_ERROR_DEVICE_LOST, about 3 minutes in on my RX 6700 XT). Since106120ca, once the piece cache is full of live single-page imports,gpu_tilere-imports the same cluster windows over and over and GTT fills up. Details and numbers are in #666. I'm writing the fix now and will open a draft PR from my fork.Imported from brcly/TuxBox. Originally posted by 3kynox on 2026-12-03T07:40:29Z.
Console ray-tracing structures: the nine walks and the programs that shade their hits now run together in ProjectScarlett on an RTX 4070 Ti SUPER, and the room in the first playable scene is visibly lit by them. It took a five-line translator change, #670. It changes the HLSL of 3,601 of the title's compute requests in my cache, so they recompile; if you'd rather batch that with another translator change, say so there. Results, and what is still open, are on #586. Next for me: a walk that seems to read outside the structures buffer.
Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-03T09:02:20Z.
Taking two small
runtime/d3d12fixes from ProjectScarlett runs on an RTX 5090. Each gets its own PR (draft until the checks are in), both on106120ca:Imported from brcly/TuxBox. Originally posted by NickStallman on 2026-12-03T12:01:17Z.
Taking one more
runtime/d3d12fix: a root SRV in a GPU reservation gets the same reach as one in committed memory. The PR will be a draft with its limits stated.In ProjectScarlett, mesh draws bind root SRVs inside GPU reservations where the title streams models. A root in committed memory gets up to 4 MiB of reach (
root_view_address). A root in a reservation got a shared view buffer that ends at the next 4 MiB boundary. A root just below that boundary is read past the buffer's end, which gives wrong data or, on an RTX 5090, an MMU fault (Xid 13). The fix: shared windows span two boundaries, clipped to the reservation, and a read-only root asks for its whole reach. It comes with a Lanes self-test,root-reach-reservation.Overlap: #655 adds a Lanes test for #389's committed-memory root window. This test covers the reservation case, and the two only meet in the scenario lists. #667 touches
heap.rselsewhere. Root UAVs aren't covered.Imported from brcly/TuxBox. Originally posted by gtb-sbe on 2026-12-03T13:05:25Z.
On AMD the title's streaming thread spends most of the load waiting on the GPU inside SRV and CBV creation. I think this adds to the submission cost in #669.
I ran ProjectScarlett on
106120ca+ #667 on an RX 9060 XT (RADV / Mesa 26.3.1, GE-Proton11-15, default settings, so private backing). It got through the loading into the intro prestream, then stopped presenting and the title's watchdog fired, the same ending as in #669. I added a per-thread stack sampler that sorts every sample by where the thread is (10 s windows, 50 ms apart):InitTransition::wait_for_queue<initialize_gpu_tiles<register_buffer/register_texture< ... <views::addressed::address_srv(57-82 % per window) orviews::mirrors::cbv(18-43 %). The rest is a contended mutex inplacement::page_remap::mapped_texture.1e9fe932+ #660/#662 with private views forced showed the same thing (83 % in the last six minutes), so it isn't new with #667.As I read
device/allocation.rs, every SRV or CBV the title creates over page-mapped memory places a reserved buffer, runsUpdateTileMappingson the shared init queue, signals a fence and then blocks the creating thread withWaitForSingleObject(INFINITE)until it passes. That's a full submission per view, on the title's thread. With each submission costing 13-56 ms in amdgpu's userptr walk (#669), that cost lands directly in view creation. I'm guessing at that link; I haven't timed the waits on their own.Would it be enough for the queues that later use the buffer to wait on that fence on the GPU, instead of the creating thread waiting on the CPU? Or could tile initialization for several views go into one submission? I haven't tried either; I wanted to ask first, since it's your design.
Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-12-03T14:53:47Z.
Plan for today on an RX 6600 (RDNA2, 8 GB, RADV / Mesa 26.3.1, GE-Proton11-15):
106120ca+ #667 (JeffreyBytes' GTT fix for the device loss on AMD), run Lanes, prepare Series S.--graphics-profile series-s) and packaged back to back on that build, 8 minutes each, withTUXBOX_GPU_TIMING=1, as brcly asked. I'll check whether the FidelityFX 4 auto-exposure pass (3727a000) also fails to translate on RDNA2, which is turboheadcrab's lead for the black world.#661 is closed, so I've dropped my test offer there. Results will go on #663, with a pointer here.