The device loss line in Status.md: the frames before it hold 3.8 ms of GPU work in 140.33 ms/frame (RTX 5090) #64
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/ThatRecompDev--five-star-recomp#64
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?
@RubAway on GitHub · 2026-11-26 21:01 UTC · original
Status.mdat9864ac5ereads:On an RTX 5090 the frames before the loss are not GPU work at all, so the 2 s timeout does not look like the whole
story here. Full boot report in #36; these are the lines that bear on this claim.
the per-pass timings of the sample before the loss (
--gpu-timings --sample-threads 30):of that busy time
loader:indirect-clampis 0.94 + 0.20 ms/frame, i.e. about a third of what queue #1 does at all.the passes named in Status are all but absent from the busy list:
smh_gen_385~CS_InterpolateStrands 0.02 ms,GpuParticleSort~CS_GpuSorting_Sort 0.01 ms,ped_skinning_cs~CS_PedStandardSkinning_0 0.07 ms.the frames themselves are long, and the time is inside the game's own frame:
this boot never reached the world (it lost the device at 215 s, still in the loading state:
main state 3,session 0x1d008dc8330 ready 0), so we cannot say what a world frame looks like on this box. what we do see isthat the frame cost is not on the GPU while the game is waiting.
the stop points do move from boot to boot, which matches Status:
ExecuteIndirect(twice),CS_InterpolateStrands,CS_PedStandardSkinning_0,CS_InstanceRotationFixup,CS_MarkBoundaries,CS_EmitCounts_AddCountsFromAppend.the stopped
execute #5614held17 lists, 0 draws, 4 dispatches, 1925 indirect.two things that did not help, and one that did not find anything:
--empty-indirect-after-skip: in this boot its own counters report101 dispatches and ExecuteIndirects skipped after a skipped one of their list, 27140 recorded, 112 lists ran work after a skipped one; in an earlier boot ofthe same build the same counters read
0 … , 17885 recorded, 0 lists ran work after a skip. the loss happened atthe same point either way, 210-215 s in.
--check-null-addressesreported no null and no out-of-range argument records in two boots.--gpu-upload-heapschanged nothing about the loss in three boots (the loader logs no line for applying it, so weonly know it was asked for).
what does happen just before the loss, on the compile side: 188 pipelines end with
failed after 172 s: 0x887a0005; its draws and dispatches stay skippedin the last minutes, with the budget lines namingestimate 3.2 GBperpipeline and
8 compiles running at its start. the boot is otherwise warm:45 segment(s) opened in 0.5 s,journal prebuild: 0 built, 3041 cached already, 446 refused.unknown:
loss; for the stopped
executeitself there is no timing, onlyno progress for 0.3 s.main state 3andsession … ready 0for all 215 s,and
--cpu-samplesees the game threads 97.6 % blocked.0x887a0005, not in a compile error.@ThatRecompDev on GitHub · 2026-11-26 21:32 UTC · original
you're right, and thanks for checking it instead of taking the status line at face value. the timeout theory was wrong. what we found since: textures the loader released (replaced or aliased ones) kept descriptors pointing at them, and a pass reading such a view later read freed memory and the device went. that also explains why the stop point moves around, it's whatever pass happens to read a stale view next.
f8fd2f8cnulls those views (or moves them to the replacing texture) before the release and waits for the GPU after. two boots since ran 8 and 11 min without a loss, before that every boot lost it within 4-10 min. status is corrected in3b0b84a8.your 215 s loss while still loading fits too, a lot of textures get swapped then. if you can run current main on the 5090 that would tell us if it holds there as well. the 188 compiles failing with 0x887a0005 are probably just the device already being gone by then
@ThatRecompDev on GitHub · 2026-11-26 22:28 UTC · original
correction to my last comment: I misread one of the boots, w165 did lose the device too, around 11 min in. so the stale-view fix (and a second one since, for address-map pages that still named released buffers) didn't end it. what changed is that the loss now comes at the same point every boot, about 10 min in, and the stopped queues are always in the hair simulation (smh_sim CS_SolvePerSplineConstraint / CS_SolvePerVertConstraint / WavePerSplineConstraint_32). testing a boot with smh_ skipped now. status page is corrected
@RubAway on GitHub · 2026-11-27 05:27 UTC · original
Ran current main (
fivestar-loader build 1.0.0+df2a7adcec34785bc155641cae56ebc912d783c9) on the RTX 5090, driver 32.0.16.2124, 2560x1440, warm pipeline cache. Three boots that ended on their own:run-20261127-081041.log0x887a0006, 1866 presentsrun-20261127-081537.log(--pix-capture 300,600)GpuKeepAwake.Loopas an unhandledDXGI_ERROR_DEVICE_HUNG, so this log has no queue staterun-20261127-081850.log(--skip-pipelines …,smh_)0x887a0006, 1758 presentsIt does not hold on the 5090, and it is not at the same distance as on your boots. Every loss here is 105-124 s after the process starts, at present 1750-1900, while the game is still in the boot splash. The screen readbacks show the splash art being drawn from about present 725-750:
None of these boots reaches the world, so "the same point of the game" cannot be compared directly.
Not
smh_simhere. The breadcrumbs stop on skinned-ped compute instead, and the shape is the same in A and in C where allsmh_programs were held as stand-ins:So
--skip-pipelines smh_did not stop the loss (boot C): it died at the sameped_skinning_csdispatch. What it did change is the frame: with the hair passes held, queue #1 goes fromi.e. boot C really draws deferred ped surfaces and boot A mostly bakes LUTs. C also got a bit further in the boot than A.
The GPU is idle at the loss, again. Same picture as in our earlier reports:
What Windows records at our losses. No
Displayprovider event (no 4101, so no TDR recovery), which matches "Windows records no timeout for most losses". Butnvlddmkmwrites three events at the exact second of each loss:with the same trio at 08:17:41 and 08:20:31. The message text is empty in the event log. Also, our
ERROR [gpu] device removed, reason 0x887a0006code isDXGI_ERROR_DEVICE_HUNG(DXGI_ERROR_DEVICE_REMOVEDwould be0x887a0005); the Status text says DEVICE_REMOVED, so it may be worth pinning which one you see.One thing that is fixed for us: the compile-failure storm is gone. Yesterday's build had 244
failed after …: 0x887a0005lines in a boot; today's four boots havecompile failures: 0each, with 4-5dxc-failvalidation warnings forMSNC_VS_MirrorReflectionPedTransformSkinDecals*programs.Unknown: whether the difference in distance (105-124 s here against about 10 minutes for you) is only that our boots never leave the splash, or something else. Nothing in these logs says why.
@RubAway on GitHub · 2026-11-27 05:35 UTC · original
Fourth boot on the same 5090, this time with no
--skip-pipelinesat all: everything the game asks for is built and drawn, only your own ray tracing stand-ins are in play (stand-ins 410 pipelines: 400 only serves ray tracing, 10 traces rays).run-20261127-083105.log, 106 s, build1.0.0+df2a7adc, same warm cache.Same loss:
ERROR [gpu] device removed, reason 0x887a0006, 1771 presents,compile failures: 3. So on our machine the skip list is not part of this: A had 75 names held, C had 138, this one zero, and all three end the same way.What does stay the same is where in the submission stream it happens, not what the GPU is doing:
--skip-pipelinesexecute #5634 list #25 of 352: at operation 219, dispatch (5, 1, 1), t32_ped_skinning_cs~CS_PedStandardSkinning_…smh_heldexecute #5356 list #20 of 623: at operation 127, dispatch (19, 1, 1), t32_ped_skinning_cs~CS_PedStandardSkinning_…execute #5345 list #3 of 707: at operation 4, dispatch (8, 1, 1), t32_ped_skinning_cs~CS_PedStandardSkinning_3_15f19d…So the GPU load of those three boots differs by a factor of about 25, the number of pipelines we hold differs completely, and still the driver gives the device up after ~5.4 thousand
ExecuteCommandListson queue #1, with the last started operation of the stopped list again aped_skinning_cs~CS_PedStandardSkinningdispatch. The wall clock is also the same (105-113 s). Unknown which of the two — submissions or seconds — it actually tracks; our boots are too close in both to separate them. Unknown what it runs out of.The boot itself looks like this now, for reference: black plane, then the splash art from present ~775 (
[capture] present-775 screen: image: lit 100%, …, 565 colours), then the intro movie (in the last 780 frames the top of queue #1 isPS_BinkNoAlpha 0.18 ms,PS_BlitColour 0.12 ms), loss at present ~1770.nvlddmkmagain wrote id 153 + id 13 x2 at 08:32:48, and no Display-provider (TDR) event.We also now have a PIX capture pair of that same present range on this GPU (1450 MB and 1860 MB, see my comment in #65), but the boot that produced them lost the device inside
GpuKeepAwake.Loopand so never printed the queue state — that part is in #65.@RubAway on GitHub · 2026-11-27 05:36 UTC · original
Correction to my last comment, one sentence of it matters: what I called "the splash art and the intro movie" at present ~775 is the story load screen, and the first-run screens were already behind us by then. The
--input-script docs/first-run.inputlog of the same boot (run-20261127-083105.log) says the flow went through:so the game reaches the story load about 40 s after the process starts, and the frames I quoted (
PS_BinkNoAlpha 0.18 mson top of queue #1 in the last 780 frames) are that screen's own video.present-1700.pngof that boot is the loading art in full colour at 2560x1440, no letterbox artefacts, so the picture itself is fine there.Which puts our loss in a specific place: ~40 s in the story load, at present ~1770, after ~5.4 thousand
ExecuteCommandListson queue #1 — before any world frame, while the story-mode streaming runs. The streaming side looks healthy in the log (DirectStorage 17 queues: 113904 entries enqueued, 113904 submitted, 112251 requests run (0 failed), BCPack3003 exact, 0 approximate, 0 placeholder, 0 failed), and the GPU is nearly idle during it (queue #1 busy 0.45 ms/frame).We have four of your five screens learned in
%LOCALAPPDATA%\FiveStar\screens.txt(subtitles, legal, legal-next, terms);story-loadis the one that needs an F8 when the loading art shows. Next boot I will press it, so the story-load time is named in the log and later boots need no help.@RubAway on GitHub · 2026-11-27 05:55 UTC · original
Ran current main again with no
--skip-pipelinesat all and PIX captures right before the loss, on the 5090:run-20261127-084948.log, build1.0.0+df2a7adc, 154 s, 1770 presents. All three captures wrote cleanly (PIXEndCapture -> 0x00000000):present-1000.wpix1879 MB,present-1200.wpix1827 MB,present-1400.wpix2929 MB — so we have the last ~370 presents before the device went. The pipeline cache was refused in this boot as you said it would be (59 segment(s) discarded,0 segment(s) opened), which is also why the boot was slow.It looks like the loss follows submitted work, not the clock. This boot presented at 75.89 ms mean interval against 34.33 ms in our un-pixed boots, so it lasted 154 s instead of 100-113 s — and it still stopped at the same place:
081041081850smh_too083105083949The seconds differ by 50%, the presented frames and the
ExecuteCommandListscount on queue #1 do not: 1711-1866 presents and 5.19-5.63 thousand submissions in all of them. Unknown what exactly is counted, and unknown whether the present number is meaningful or just travels with the submissions.Your
smh_simplace does appear on the 5090. In this boot the last started operation of a stopped list on another queue is exactly your pair:With
smh_held (the 138-name boot) it never reachedsmh_simand stopped atped_skinning_cs~CS_PedStandardSkinninginstead, and the device still went. So here holding hair moves the stop point, it does not remove the loss.The GPU was not idle in this boot either, unlike the ones I reported before:
gpu over 335 frames: queue #1 busy 9.42 ms/frame (indirect_diffuse_lighting~CS_ScreenProbes_EvaluateRayRequests_RayBinning 2.21 ms, PS_DeferredTexturedStdNC_48fb7423_Wrapped.trim2 1.34 ms, loader:indirect-clamp 0.49 ms, PS_DeferredPedTexturedNC 0.45 ms, PS_CascadeShadows_texture 0.42 ms …),all queues: some queue busy 9.65 of the 104.40 ms/frame,frames 71 timed: median 326.0 ms, 95% 7273.4 ms, max 16546.7 ms, and the CPU side is the same as always (game 3.7 %, ours 0.3 %, system 0.2 %, blocked 95.8 %).nvlddmkmwrote id 153 + id 13 x2 at 08:52:17, still no Display-provider (TDR) event.On the
GpuKeepAwakething from #65: this boot logged the unhandledSharpGenExceptionand still printedERROR [gpu] device removed, reason 0x887a0006with the queue dump, so which thread wins is a race; inrun-20261127-081537.logthe exception won and the queue dump never appeared.If it helps to have something read out of the three captures: tell us what you want looked at in the PIX UI (the event list around the last captured present, a particular list, the resource states at some record) and we will post what we find — the files themselves are 1.8-2.9 GB each, so they are easier to inspect here than to send.
@ThatRecompDev on GitHub · 2026-11-27 07:56 UTC · original
thanks for all of these, the no-skip boots and the "follows the work, not the clock" table were exactly the right thing to look at.
we found ours last night and it fits that picture. on the 4090 the NVIDIA user-mode driver keeps an internal shader table with a hard 512 MiB cap. the shaders of every pipeline that has been used go in there, plus the driver's own background recompiles ("optional shaders"), and ours grew about 1 MiB/s. the moment it would pass the cap the driver fails inside the next ExecuteCommandLists (E_INVALIDARG internally) and gives the device up on the CPU side. whatever list happens to be in flight shows up as "stopped", which is why holding hair or skinning only ever moved the stop point, for you and for us. no TDR, no GPU fault, Aftermath says DeviceRemovedNoGpuFault. the "GPU timeout" line I had in Status was wrong, it's corrected now.
fix on main since
57411f8f: the loader turns the driver's background shader work off at device creation (--driver-background-workturns it back on). with that the table sat flat at ~350 MiB and a boot ran 14.5 min past the old loss point until we stopped it.what I can't claim is that yours is the same thing. you get 0x887a0006 with id 13 + 153 at ~106 s, ours was 0x887a0005 with nothing in the event log at ~9.5 min, and at 106 s our table was only around 200 MiB. could be the same table filling faster without a skip list, could be a second problem. but you're on 32.0.16.2124 like us, so the new diagnostic works on your card as is: could you run current main once with
--d3dkmt-watch? it logs the table size as it grows, who marks the device as lost and the kernel's device state right before. one boot should tell us which of the two it is. also check the log fordriver background shader work off -> 0x00000000, the mode officially wants Windows developer mode and I only know it works here with that on.and if it's easy, the text of the two id 13 events would help too.
@RubAway on GitHub · 2026-11-27 10:27 UTC · original · edited 2026-11-27 14:42 UTC
Ran current main with
--d3dkmt-watchas you asked. Short answer: it is the same wall on our card, and your watcher shows it.run-20261127-112900.log, build1.0.0+e977ef84, RTX 5090, driver 32.0.16.2124, 2560x1440, no--skip-pipelines, warm-ish cache (60 segment(s) opened),--gpu-keep-awakeoff. It lived 660 s and 2184 presents, and the loss has your shape now:The tables at that moment:
287.1 + 185.4 = 472 MiB, which is your 512 MiB cap. Over the boot the two tables went 0.1 + 0.6 MiB ??? 102.7 + 93.3 ??? 144.8 + 113.6 ??? 203.9 + 138.2 ??? 273.4 + 176.6 ??? 287.1 + 185.4 MiB, so ours also grows at better than 1 MiB/s of wall time, and the failure lands at the same total on a card with twice the memory. So whatever your fix moved on our side, it was this.
Two things about the numbers I don't understand, may be nothing:
--driver-background-work), the line still readsoptional shaders 61.5 of 256 MiB, growing all boot. Is that entry still counted under "optional" when the recompiles are off, or does it mean some of them are still happening?WARN [d3dkmt] Escape -> 0xc000000d (#1..#4, first words 0x4000070040000680 0x0000000000000000). Four, then never again. Your call whether that is a normal thing the runtime asks the driver and ignores.How we got here, since it changes what our old logs meant: on our previous build (
df2a7adc) every boot died at 100-154 s with0x887a0006, and the only thing that changed is that--gpu-keep-awakeis gone - with the loop on, the Aftermath dump you added showeddevice status Timeoutwith threet32_ped_skinning_cs~CS_PedStandardSkinningprograms resident and not advancing, so our short deaths look like the keep-awake loop's kernel sitting next to the game's work rather than a full table. On main without it, the death moved to 660 s and to yourExecuteCommandLists-inside failure. We left the flag off everywhere now; if the looped dispatch is a bad idea next to a game that submits this much,--helpcould say so.What the boot looks like now, as a separate issue (not the loss): the game gets into the prologue - subtitles, the movement hint, footsteps, and it reacts to input - but the plane is a dark flat field,
present-2100: 1329629 of 3686400 pixels not black, mean rgb (4, 4, 4)where the loading art before it readmean rgb (139, 108, 127). The GPU is not idle while that happens:gpu over 67 frames: queue #1 busy 535.74 ms/frame (indirect_diffuse_lighting~CS_ScreenProbes_EvaluateRayRequests_RayBinning 119.02 ms, MS_VS_CascadeShadows_draw +rest 74.54 ms, PS_DeferredPedTexturedNC 21.05 ms, hair_resolve~CS_HairTileClassify 18.39 ms ???),stand-ins 417 pipelines: 406 only serves ray tracing, andwaits 15 threads waited for a pipeline the host was building, longest 452 s. Ondf2a7adcthe same scene came out the other way:present-1825 screen: white: near white 90%, one colour 90%- and--no-rt-stand-insdid not change it, so it is not the "shadow masks fully lit" fill. Yource2b333bStatus says you are on this already ("Game stalls on the white PROLOGUE card after the intro", "post chain ruins the frame"), and here is a number for the exposure row of that table, from a boot that ended on the white card (run-20261127-114705, 242 s,mean rgb (232, 232, 232)at present-1300):So the exposure statistics the game maps are zero on both targets, read both ways, while the lighting in front of them costs 535 ms a frame. Status says "Exposure: not re-checked since lighting shades" - on our card it reads zero and the frame goes white, which is what an exposure of zero would do. Next here we run
--map-readback-waitand--no-map-readbackagainst the default, to see whether the zeros come from our side of the Map or from the GPU's target.One more number for the table question, from that same short boot:
table 0: 273.4 of 512 MiB, optional shaders 83.6 of 256 MiB; table 1: 177.0 of 512 MiB, optional shaders 74.1- 450 MiB of entries at the loss, and the optional-shader part grew through one boot although we never passed--driver-background-work.And the cap is a cap: the boot that ended with
device removed, reason 0x887a0005(run-20261127-121051, 538 s, 1659 presents) was already over it in the last watcher line -table 0: 2200320 entries = 537.2 of 512 MiB, optional shaders 284.9 of 256 MiB; table 1: 836608 entries = 204.2 of 512 MiB. 537.2 MiB in a table whose line says 512, with your reason code. That boot had--dump-frame 210sand--trace-exposure 60on, which read back another 262 targets, so take 538 s as a floor for what the game alone does on a 5090 rather than a measurement.The frame dump is the part I would like you to look at.
--dump-frame 210sfired at present 1294 while the plane readmean rgb (238, 238, 238); its stage 142,VS_BlitInteriorStencilQuadsat 1706x960, is the prologue room complete: the character's head and shoulder in the foreground, the framed mirror with the boardwalk, the building and the people outside, the shelf at the right. Depth, meshlets and the gbuffer are fine there (the colours are only a float target shown without a tone map). Nothing of it reaches the plane, and the 262 dumped files stop at stage 149 with four postfx targets in them and no tone map, bloom, TAA or HUD at all. That matches your Status line "Before post-processing a frame is now a recognisable lit scene ??? post chain ruins the frame": on our card the frame is alive up to the interior blit and gone after it. Tell me which pass names to keep and I dump exactly that stretch.Our probes are part of the answer to the table question. The same build with nothing on it but
--d3dkmt-watchran 21 minutes, 2515 presents, no loss at all (run-20261127-125409); we closed the window ourselves, it never died. Its last watcher line:table 0: 1752576 entries = 427.9 of 512 MiB, optional shaders 213.4 of 256 MiB; table 1: 725248 entries = 177.1 of 512 MiB, optional shaders 109.8. So the cap reads per table, it is table 0 that reaches it, and the boots that died had--dump-frame 210sand--trace-exposure 60in them with table 0 at 537.2 - our own diagnostics feed the driver's table and buy us the 0x887a0005. Worth knowing if you tell people to run these probes for long.For "Exposure: not re-checked since lighting shades": re-checked over that boot, and it is not only zero, it is frozen. 24 reads between present 1114 and present 2495 -
0x24a178a3a00 (1x1 format 2, read after a wait): 0.00390625, -8, -8, 0, 0, ???byte for byte identical at all 24 reads, and0x24a1423fe00all zeros at all 24, with the plane sitting atmean rgb (241, 241, 241)the whole time. A -8 next to a 1/256 in the statistics the tone map reads looks wrong on its face, and an exposure that never changes for 23 minutes is what a white card would look like.Two boots of one build then, both stuck on the PROLOGUE card you have open: one ends at
mean rgb (4, 4, 4), another atmean rgb (241, 241, 241), and in both the room is drawn correctly at stage 142.Your "the NaN target" row, run as
--d3d12-nan-scan postfx,ptfx,TAA2,lightingon a fresh boot (run-20261127-131942, 288 pipelines, 1782 scanned draws): 1747 of those draws had at least one input holding non-finite floats. The one I would start from is a texture the whole post chain reads:1706x960 is 1637760 pixels, so between half and six sevenths of that HDR scene target is Inf or NaN before TAA runs:
CS_TAA2_PrepareFrameStats 15 clean of 21,CS_TAA2_Resolve 16 of 21,PS_TAA2_SpatialUpscaleWithDithering 9 of 13. The colour-grading LUT is poisoned at its identity pass too, one dirty input each:CS_LUT3DIdentity,CS_LUT3DBlend4WithBaseLayer,CS_LUT3DBlend4WithTonalAdjustments,CS_LUT3DBakeColorGradingAdjustments-table 1 entry 9, record 626595: memory 0x8ac077f118, 1048576 bytes as float32: 8 non-finite, first NaN at (376, 0). And the lighting inputs are dirty as well:CS_MaterialTiles,CS_PrescalarizeLightLoop,LightMixOutputCS_Scene_Lights,CS_ComputeInfiniteRRIntensity. Only five pipelines scanned completely clean, all of thempostfx_splines~CS_BakeLUT_2DBezier_*andptfx_CS_LightModeData_*/ptfx_CS_PreRenderBegin.Which pass writes that Inf/NaN target we do not know yet - next here is
--d3d12-nan-scan-dwords 0:8so the log shows the actual floats, and a scan aimed at the writers rather than the readers. One warning about running this probe long: that boot was removed at 196 s withID3D12Resource creation failed: 0x887a0005 (device removed reason 0x887a0001)while the entry table was only at447.0 of 512 MiBbut the optional-shader line at223.7 of 256 MiB, so the read-backs themselves are not free.@RubAway on GitHub · 2026-11-27 10:31 UTC · original
A format decode on the NaN report, because it narrows the search a lot.
In your own format table (
src/FiveStar.Shaders/Cache/RenderTargetFormats.cs)34 = R16G16_FLOAT(line 50) and2 = R32G32B32A32_FLOAT(line 39). So the buffer I quoted -texture 0x23fd9a7dad0 format 34 1706x960: 1382278 non-finite- is not the colour: it is an RG half-float target at scene resolution, and the passes reading it areCS_TAA2_PrepareFrameStats,CS_TAA2_ResolveandPS_TAA2_SpatialUpscaleWithDithering. That is the motion vectors, or the closest thing to them.The kind of non-finite matters too. On the big RG16F buffer it is Infinity and -Infinity (
first Infinity at (354, 37),first -Infinity at (298, 37)), while the NaN cases are on the small inputs of the LUT bakes (one dirty input each,1048576 bytes as float32: 8 non-finite, first NaN at (376, 0)). So the frame is not "full of NaN" so much as: velocity has infinities over most of the frame, and the grading LUT inherits NaN from one of its inputs. Infinite velocity at the sky is what an infinite depth pushed through the same subtract and divide gives you, which is your "the pass after TAA that loses the sky" row and the depth-twin work you are in - I would read that as the same bug seen from two sides.Two things we can bring:
--d3d12-nan-scan-dwords 0:8prints the floats of every scanned buffer, so the next log will show whether the infinities sit in the X and Y channels (velocity) rather than in a colour channel.TAA2,postfx,ptfxwith--no-rt-stand-ins, so the poisoned chain is simply out. If the prologue room - which is complete in the dump at stage 142,VS_BlitInteriorStencilQuads- then reaches the plane, the fault is in the post chain; if it stays white, the game's own velocity content is what poisons everything downstream and the fix belongs before TAA.And a question: your capture markers stop at pass names (
t32_TAA2,t32_postfx_lut,t32_ptx_prerender~ptfx_*), so I cannot tell from the log which pass writes that RG16F target. Is it the same pass that writes the depth on the real Xbox, or does the game keep the velocity in a buffer it never binds as a render target? If you know its name we can scan the writer instead of the readers, which is where the value is actually made.@ThatRecompDev on GitHub · 2026-11-27 10:31 UTC · original
that's a really useful run, thank you. so it is the same wall on the 5090, good to have that settled, and good catch on keep-awake being what killed the short boots. I'll put a warning on
--gpu-keep-awakein the help and docs.on your first question: no, with the background work really off that "optional shaders" number should not move. in our boots with the new default it reads 0.0 MiB from start to end and the table goes flat at ~350 MiB. yours growing to 61-84 MiB says the driver is still doing its recompiles on your machine, so the switch didn't take. could you look for this line near device creation in that log and paste it:
[d3d12_xs] driver background shader work off -> 0x...Microsoft documents that mode as needing Windows developer mode (Settings > System > For developers), which happens to be on here. if yours shows a failure code there, that's the reason, and turning developer mode on should give you our behaviour. either way that's on us: a fix that silently depends on a Windows setting isn't good enough, the loader should at least say loudly that it was refused, and we need the table itself smaller (it's about twice the DXIL of the pipelines in use, and with no skip list at 1440p you have more of them in use than we do). looking at both.
the four
Escape -> 0xc000000dat start: we get the same, 8 of them here, in every boot including the ones that run fine. I haven't found out what they ask, but they aren't followed by anything going wrong.the exposure zeros are the best lead we've had on the white/black frame, thanks for those lines. curious what
--map-readback-waitand--no-map-readbackgive you. on our side the lighting pass does shade now, but one of its inputs (a shadow mask) holds junk, and something after the velocity pass writes NaN, so I wouldn't trust anything downstream of that yet, exposure included.@RubAway on GitHub · 2026-11-27 10:32 UTC · original
You asked for the device-creation line, and it is a refusal in every boot on current main (
111833,112900,114705,121051,125409,131942), the same line each time:The numbers agree with your reading. Our "optional shaders" went 61.5 → 83.6 → 213.4 → 223.7 → 284.9 MiB across today's boots, and the table ends at 427.9 MiB on a clean 21-minute boot where yours stays flat near 350 MiB, so yes: the driver is still doing its recompiles here.
Developer mode is off on this machine:
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlockhas noAllowDevelopmentWithoutDevLicensevalue at all. Turning it on and repeating the same boot (1.0.0+ce2b333b, 2560x1440, no skip list,--d3dkmt-watch) is the next thing we do, and I will paste the table growth again. If it then reads-> 0x00000000andoptional shaders 0.0 of 256 MiBstays flat, that alone explains why we reach your cap and you never get near it.What is
0x887a002d, by the way? It is not in the DXGI range of winerror.h as far as I can find, and it is not in your sources either. One sentence in the docs naming the call that returns it would save the next person this hunt - and given your point, the refusal is worth a loud line of its own rather than a normal log line among ninety.And good to hear the shadow mask holds junk and that something after the velocity pass writes NaN: our velocity target being ±Infinity over most of the frame is very likely that same something seen from the reading end. Running
--map-readback-waitand--no-map-readbackas you ask, plus skippingTAA2,postfx,ptfxto see whether the prologue room reaches the plane without the post chain.@ThatRecompDev on GitHub · 2026-11-27 10:34 UTC · original
there it is.
0x887a002dis DXGI_ERROR_SDK_COMPONENT_MISSING, it's whatID3D12Device6::SetBackgroundProcessingModereturns when developer mode is off (same code you get asking for the debug layer without the SDK layers installed). so the switch was refused in every one of your boots and the driver kept recompiling, which is the whole difference between your table and ours. agreed on both points: it gets a loud WARN that names the call and says what to do, and a line in the docs. being worked on now, together with making the table smaller so it doesn't hinge on that setting at all. thanks for checking the registry value, that saved a round.on the velocity target: the pass that fills it is
PS_VelocityFill(it's a render target, format 34, at render resolution, so your 1706x960 at 1440p fits). in our boots that pass itself writes clean values and the non-finite ones show up after it, 196 pixels in one boot and ~340k in another, so something between it and TAA2 writes into the same target, and we haven't named that writer yet. your Infinity / -Infinity split is new to me and useful, we only counted "non-finite". infinite depth going through the reprojection divide is a good theory and it would tie in with the depth we copy from our twin, I'll have that checked against the sky / far-plane pixels specifically. if you scan the writer side,PS_VelocityFillis the name to start from, and whatever binds that same texture as a target or UAV after it.the skip of
TAA2,postfx,ptfxis a nice test, curious if the prologue room makes it to the plane.@ThatRecompDev on GitHub · 2026-11-27 10:59 UTC · original
follow-up, this is on main now (the merge of lane-table):
0x887a002d, developer mode off), what it leads to and what to do. docs/running.md has a short "Developer mode" section.--gpu-keep-awakecarries a warning in the help and docs about what it did on your card.--no-shader-table-guardturns it off.what we couldn't do: there is nothing to strip from the shaders (99.6% of each container is the code itself), the driver keeps roughly 2.2x our DXIL per distinct shader, and we found no documented way to stop the recompiles without developer mode. so the real fix is smaller translated shaders, that's translator work and not a quick one.
one thing in your numbers: the cap is per table, not the sum. and your 660 s loss ended with reason
0x887a0001at 287 + 185 MiB, well under it, same for the 196 s one. so that one is probably not the table at all. could you paste the block right under theMarkDeviceAsErrorline from that log? I need thenvwgf2umx.dll+0x271848frame with its rbp / rdi values and the "returned calls below the stack" list, that tells us which call inside the driver failed and with what code.@RubAway on GitHub · 2026-11-27 11:07 UTC · original
Here is the block you asked for, from the 660 s boot (
run-20261127-112900, 1440p, no skip list, driver 32.0.16.2124). It is the secondMarkDeviceAsErrorin that log (the first one is the watcher banner), with the line right above it kept in:Two notes on it. There is no
nvwgf2umx.dll+0x271848frame anywhere in that log: our driver is 32.0.16.2124 and its only nvwgf2umx frames sit in the earlyEscape -> 0xc000000dreports, at+0xc79231,+0x78734f,+0x2c6e30,+0x8eb86e,+0x8ebcb4. And the line aboveMarkDeviceAsErrorisWARN [present] ResizeBuffers(2560x1440, format 28) failed: 0x80070005- the person at the machine was closing the window at that moment, so I think your hunch is right and this one is not the table.With that in mind I went back over every ending from today:
ResizeBuffers failed 0x80070005, thenMarkDeviceAsError, window closed; reason0x887a0001inside ExecuteCommandListsResizeBuffers+MarkDeviceAsError, window closedgiven up insideline before it0x887a0005withtable 0: 537.2 of 512 MiB, so this one does cross your per-table cap0x887a0006So among the long boots only the 538 s one is a real driver loss, and it is over the cap, which fits your correction that the cap is per table.
Developer mode is on now and the switch goes through:
with
optional shaders 0.0 of 256 MiBin every one of the 42 table reports of that boot, andtable 0: 214.8 of 512 MiB; table 1: 109.5 of 512 MiBwhen it ended at 228 s. The same point of the pre-dev-mode boot at 12:54 wastable 0: 427.9plusoptional shaders 213.4,table 1: 177.1plus109.8, so the recompiles were about doubling what the driver holds. A nan-scan boot from 13:42:57 to 14:00:59, 1082 s, had no loss markers at all - first time we get past 700 s with the probes on.Your
PS_VelocityFillwas not clean on our side:so four of the inputs it binds are already non-finite. The target itself, seen as a bound texture on the readers, is
same order as your ~340k, and it is channel 1 with both signs present. In the earlier boot the same target gave
1382278 non-finite, first Infinity at (354, 37)and907157 non-finite, first -Infinity at (298, 37), so the count moves a lot between boots. For your far-plane check: (470, 0) is in the top row of the render target.One more thing from the 18 minute boot, since nothing was lost but the end looked bad:
a 17 second frame, then a fully black plane, the window stopped answering and we closed it. Is that the PROLOGUE stall you already have, or would you suspect the nan-scan readbacks?
We are on
34b4dfednow and rebuilt, so the next boots have your WARN and the table guard; on this card I expect the guard never has to fire.@RubAway on GitHub · 2026-11-27 11:39 UTC · original · edited 2026-11-27 16:19 UTC
A clean boot on
34b4dfed, developer mode on, no probes at all (ended by our own--run-timeout 1500):optional shaders 0.0 of 256 MiBin all 84 table reports, and both tables are byte for byte the same from the 6th minute to the 25th: 867328 and 444416 entries, so the driver stopped adding anything. Flat, like yours. 2763 presents, 541 ms mean interval, nodevice removed, nogiven up inside, no ResizeBuffers line, and your guard never fired - it never even printed the 400 MiB warning.Something that could be the garbage your lighting reads. The loader warns 107 times in this boot, and 107 times in the 12:54 boot as well:
All 107 are different textures. They come in two shapes:
1706x960and1728x960, format 19, view format 41(in the loader's naming 19 is the R32G8X24 typeless depth and 41 is R32Float), and768x768,256x256,128x128, format 53, view format 56(53 appears as Depth16Typeless, 56 is R16Unorm). So every depth texture the game tries to write through a UAV is given a null view and its writes are lost, the scene depth at render resolution included. If the reprojection divides by that depth, this is a good candidate for your infinities, and the 768x768 ones look like the shadow-mask inputs you mentioned. Is a null UAV view expected for typeless depth here, or could the view be created before the texture's descriptor is settled?The picture itself is unchanged. Captures go white from present 1300 to the end at present 2763,
mean rgb (238, 238, 238)in 15 of 25 captures; before that they move: (88, 102, 26), (122, 88, 77), (33, 32, 44), (150, 113, 119), (90, 72, 81). The last frames are ~860 ms each, so the game is alive, just slow.One marker I would like explained, it runs through the whole boot and was there in the earlier boots too:
25 such lines here, 23 in the 12:54 boot.
@ThatRecompDev on GitHub · 2026-11-27 11:40 UTC · original
you called it, and thanks for going back over every ending, that table is exactly what was needed. the three "window closed" ones were us handling the close badly, not losses: when the window goes away we still tried to resize the swap chain to it, windows says no (that 0x80070005), and we had already let go of our back buffers before the call, so the next frame got recorded against nothing and D3D12 removes the device for that, which is your 0x887a0001. reproduces here by destroying the window mid-present.
fixed on main as of
8bca98bc: once the window is gone we just stop showing frames, and a resize that fails for any other reason keeps the old buffers and retries a bit later instead of taking the device down. if you ever seeResizeBuffers ... failedwhen nobody closed the window (alt-tab, lock screen, UAC prompt, HDR or display switch, moving the window to another monitor, an overlay or capture tool), tell me what was going on, that would be a different trigger.great news on developer mode,
optional shaders 0.0in all 42 reports is the same as here. so the picture is: one real table loss (the 538 s boot over the cap), everything else today was keep-awake or the window. and 1082 s with the probes on is the longest anyone has run this on a 5090.on PS_VelocityFill, I stand corrected for your card: four non-finite inputs is new, ours scanned clean in the boots we looked at, but we only had two samples and your count moving 390k / 907k / 1.38M between boots says it depends on the scene. channel 1 with both signs and the first hit in the top row is useful, that's being looked at together with the depth it reads.
the 17 s frame then black: I can't tell you yet. what we know from our side is that the white PROLOGUE card is not a stall, the game keeps running behind it and our final composite stops drawing because its vertex buffer gets overwritten in game memory (finding the writer right now). a fully black plane plus a window that stops answering is a different look, and nan-scan is heavy: here it took down one boot by itself (commit memory), so I'd repeat that stretch once without it before blaming anything else. the lines around present 1200-1207 would help: any
[memory wait stall],waited for a pipeline, or[sample] stack capture stuckthere?@RubAway on GitHub · 2026-11-27 12:26 UTC · original
Answering the question about the 17 s frame then black (the nan-scan boot
run-20261127-134257, 1082 s, present numbers 1200-1207):[memory wait stall]: 0 lines in the whole log.waited for a pipeline: 0 lines.[sample] stack capture stuck: 61 lines, but the last one is at 1069 s, far from the stall, so nothing of the three sits near present 1200-1207.What does sit there, verbatim:
The part that looks decisive to me: after present 1207 the boot produced no further presents at all for the remaining 16 minutes. The game's threads stayed alive (thread samples keep coming, the last one is
#31 at 1069.6 s), there was no device removal, and the plane we could read stayed(0, 0, 0). So the window was not frozen by us, it simply had no new frame: queue #1 finished 3778 of 3804 executions and the oldest unfinished one, execute #3779, holds a single list with 0 operations, reported as finished, 0 draws, 0 dispatches, 0 indirect. Three other queues logged the same at about that time:queue #3: executions done up to 7 of 12,queue #4: 11 of 12,queue #5: 7 of 10, allno progress for 1.5 s. Only four such lines in the log total, all within this stretch.It also is not the shader tables: the table report right above the slow present is
table 0: 506880 entries = 123.8 of 512 MiB, optional shaders 0.0 of 256 MiB; table 1: 402944 entries = 98.4 of 512 MiB.The line just before it is the journal prebuild:
journal prebuild: 0 built, 4509 cached already, 417 refused; last pass 2 given back to the game's compiles, 3 with programs not made yet, and the present itself carried a texture streaming burst (576.1 MB uploaded, 1865 textures). The bigger bursts in the same boot wereupload 12562.5 ms ... 17311 written ... 2025.7 MB uploadedandupload 9632.8 ms ... 5150 written ... 3886.5 MB uploaded, and those passed without a stall, so I would not blame the upload volume alone.Taking your advice, we repeat that stretch with no nan-scan at all: two boots are set up here, one with
--map-readback-wait --trace-exposure 60for the exposure statistics, one with--skip-pipelines TAA2,postfx,ptfxfor your post-chain question, both 1500 s. And we are on8bca98bcnow (loader1.0.0+8bca98bc), so the window-close path that produced the false0x887a0001endings is out of the way. Will report both.@RubAway on GitHub · 2026-11-27 13:55 UTC · original · edited 2026-11-27 16:19 UTC
The two boots you asked for, both 1500 s, on the loader
1.0.0+8bca98bc, nothing else changed.A:
--map-readback-wait --trace-exposure 60(2190 presents, no loss markers, tables flat attable 0: 1053696 entries = 257.2 of 512 MiB; table 1: 442880 entries = 108.1,optional shaders 0.0everywhere).With the wait the exposure statistics are no longer the frozen zeros we reported:
so the
0.00390625, -8, -8from before was our own readback race, thank you for the flag. The rest I have to report as it is: across 38 readings there are only three distinct strings. One target gives1.49062, 0.575917, 13.4164for over a thousand presents without moving a bit, the other alternates1.22322, 0.290688and1.92841, 0.94741, the third float is13.4164always, everything past the third is zero. And the plane stayed white:[capture] present-2100: 2560x1440 format 28: 3686400 of 3686400 pixels not black, box (0,0)-(2559,1439), mean rgb (241, 241, 241). Exposure is alive and its values are plausible, so it is not what turns the frame white.B:
--skip-pipelines TAA2,postfx,ptfx(15:54:05 -> 16:19:06, 2675 presents, 558.93 ms mean interval, no loss markers,table 0: 922112 entries = 225.1 of 512 MiB; table 1: 436224 = 106.5,optional shaders 0.0).That is the answer to your question: the room does reach the plane. The capture at present 700 is a fully drawn, correctly coloured frame - the street with the storefronts, the character with the pistol, the letterbox bars, nothing washed out (
[capture] present-700: 3686221 of 3686400 pixels not black, box (0,0)-(2559,1439), mean rgb (146, 113, 132)). From present 1100 the plane settles at3232131 of 3686400 pixels not black, box (0,80)-(2559,1359), mean rgb (120, 92, 98), and from present 1500 to 2600 the captured PNG is the same bytes in twelve consecutive samples. So with those three families skipped we are neither white nor black: the picture is simply right. I have both screenshots, say the word and I attach them here.One artifact of the skip itself, which looks useful on its own: the dialogue lines pile up on each other. By present 2000 there are five or six subtitle lines drawn one over another at the bottom, with
?????????????? ???????????? ???????????????? ??????????????????????????on top of several older lines, while the prompt box (L - ??????????????????????????,R - ??????????????????????) stays single. So the clear, or the fresh draw, of the text layer lives inside one of the passes we skipped, and given theptfx_CS_PreRenderSpritefamily of names I would guess ptfx.That gives a cheap bisect on our card:
--skip-pipelines TAA2alone, thenpostfxalone, thenptfxalone, 1500 s each, otherwise the same boot. If one family alone already stops the white, we have the family, and the NaN hunt narrows to what feeds it. Which one first, or shall we just run all three?@RubAway on GitHub · 2026-11-27 14:40 UTC · original · edited 2026-11-27 16:19 UTC
Bisect result: one family is enough. Same boot as before, only
--skip-pipelines TAA2, 1500 s.The white is gone.
[capture] present-3000: 2560x1440 format 28: 3228389 of 3686400 pixels not black, box (0,80)-(2559,1359), mean rgb (39, 39, 52)and the same numbers for twelve samples in a row, present 1400 through 3000. Nothing was lost on the way: nodevice removed, nogiven up inside,table 0: 879616 entries = 214.8 of 512 MiB; table 1: 444416 entries = 108.5,optional shaders 0.0everywhere. 3215 presents, 464.87 ms mean interval, the fastest of all our boots.The seven pipelines the loader turned into stand-ins:
On screen with only TAA2 off: the prompt box (
L - ??????????????????????????,R - ??????????????????????) and the subtitles are drawn crisp, the letterbox is right, and the 3D picture is replaced by a flat dark plate. So postfx and ptfx are healthy - they pass whatever they are given straight to the plane - and what they are given turns the frame white. That plus the run of yesterday, where all three families were off and the street scene came to the plane correctly, points at TAA2 as the pass that makes the white, and it fits yourPS_VelocityFillfinding: the target you caught,texture ... format 34 1706x960: 390792 non-finite, first -Infinity at (470, 0) channel 1, is the motion vector target, and the resolve is the consumer of those vectors.One correction to what I wrote yesterday. The piled-up subtitles are not a ptfx artifact: they appear here too, with only TAA2 skipped, five or six dialogue lines drawn one over another while everything else stays flat. So it is the TAA2 resolve or blit that repaints the whole plane on every present, and without it the text layer keeps what the earlier presents left there. My guess about the text clear living in ptfx was wrong.
What we run next on our card, both without anything else changed:
--d3d12-nan-scan TAA2, one boot. Only those seven names, so it should stay far from the memory wall you hit with the scan on everything.--skip-pipelines TAA2_Resolve, thenTAA2_SpatialUpscale, thenTAA2_Blit, thenTAA2_UnpackEntityMask,TAA2_UpscaleEntityMask,TAA2_PrepareFrameStats.Two questions. Does the resolve alone already reproduce the white on your card, and is one of the seven the one you would like scanned first? And if you would rather see the scan aimed at the resolve's own inputs than at the whole family, tell us the names and we will pass exactly those.
One note so our reports are not read as GPU trouble: one of yesterday's boots ended at 4.8 s with no presents at all,
ERROR [memory] limit at 4.8 s: free physical memory 7.7 GB is below 8.0 GB (commit 92.7 GB). That is the loader's own gate closing the boot before the game got memory, not a device loss; we keep the machine otherwise idle while a boot runs.@RubAway on GitHub · 2026-11-27 15:29 UTC · original · edited 2026-11-27 16:18 UTC
The scan you asked for, one boot with
--d3d12-nan-scan TAA2and nothing skipped (2836 presents, no device loss, no memory gate hit). The plane went white exactly as always:mean rgb (125, 98, 116)at present 1100,(194, 194, 194)at present 1200,(241, 241, 241)from present 1300 to the end.TAA2 first runs at present 1182, and that is also the first scan report. 285 reports in total: 141 for
CS_TAA2_PrepareFrameStats, 141 forCS_TAA2_Resolve, 3 forCS_TAA2_UnpackEntityMask. Every report, the first one and all the rest, names at least one input that holds non-finite values. Typical for the resolve: 18 of 23 bound inputs clean.The slots that are dirty in every scan of both computes:
The resolve adds
table 0 entry 34andtable 1 entries 0 and 1; PrepareFrameStats addstable 1 entry 7(208 bytes, 2 non-finite, first NaN at byte 76). So: the motion vector target, the format 34 one at 1706x960, is bound toCS_TAA2_PrepareFrameStatsas entry 2 of table 1 and is dirty in all 141 scans of it. The 640 KiB range oftable 0 entry 9is worth your attention on its own: 163840 non-finite out of 163840 floats, that range is nothing but NaN.One honest caveat about the buffer records.
--d3d12-nan-scanreads a buffer record's or CBV's console range as raw float32 without knowing the view's format, so a "NaN" in a buffer that actually holds integers or pointers is possible, and the 1048576-byte extent is our read cap, not the record's size. The texture finding is not like that: format 34 is R16G16_FLOAT, and a whole 640 KiB range reading as NaN is hard to explain as integer data.The ordering is what I find most useful. At present 1182, the very first time the game dispatches TAA2, the vector target already holds 366184 non-finite texels. The next capture, present 1200, is already washing out at
(194, 194, 194), and present 1300 is white. Before present 1182 the game never dispatched TAA2 at all and the frame was not white. So the poison is in the target before TAA2's first draw, and it arrives together with TAA2. That fits the VelocityFill boot of ours, where the same format 34 target read as 390792 non-finite andPS_VelocityFill + VS_VelocityFillhad 10 inputs clean of 14.Three things would move this on, and two of them we can do here.
Can you say which pass writes the 1706x960 format 34 target? We only ever see it bound as an input, so we cannot name its writer from our side. And if you want the actual floats of one slot,
--d3d12-nan-scan-dwords <offset>:<count>prints them for every memory input: the 640 KiB range from offset 0, or the 2048-byte record from byte 756 - say which and we run it.On our card the next boot is
--skip-pipelines VelocityFill, everything else live. If the plane stays clear with the velocity writer gone, the vectors carry the white rather than TAA2's own arithmetic, and the work narrows to whoever fills that target. Does skipping it do the same on your card?@RubAway on GitHub · 2026-11-27 16:08 UTC · original · edited 2026-11-27 16:18 UTC
The follow-up you asked for:
--skip-pipelines VelocityFill, everything else live (2350 presents, no device loss,table 0: 1161984 entries = 283.7 of 512 MiB; table 1: 442112 = 107.9,optional shaders 0.0). One pipeline went to a stand-in:sgd1_07a44bd9_t32_PS_VelocityFill_4f86a26b_Wrapped.The plane still goes white:
mean rgb (150, 113, 119)at present 1100,(0, 0, 0)at present 1200, and(238, 238, 238)from present 1300 to the end. So removing the pass you caught filling the motion vector target does not stop the white. Either something else also writes non-finite into that target, or the vectors are not what carries the white at all.To tell those apart we are running the same boot with the scan on as well:
--skip-pipelines VelocityFill --d3d12-nan-scan TAA2. If the format 34 1706x960 target still reads as hundreds of thousands of non-finite texels withPS_VelocityFillskipped, there is a second writer and we will look for it. If it reads clean and the frame is still white, the vectors are innocent and the field narrows to the other inputs, starting with thattable 0 entry 9range which is 163840 NaNs out of 163840 floats.Two things from that list we would like your eye on, since you know what those records are supposed to hold:
table 0 entry 9, 655360 bytes, every float in it NaN, bound to bothCS_TAA2_PrepareFrameStatsandCS_TAA2_Resolve. Our loader reads buffer and CBV records as raw float32 without knowing the view format, so we cannot tell whether that is an HDR history, a ping-pong target, or a range whose real type is not float at all.table 0 entries 6 and 62, 2048 bytes each, 17 non-finite with the first NaN at byte 756, andtable 1 entry 7, 208 bytes, 2 non-finite with the first NaN at byte 76. Those offsets repeat run after run, which looks like a constant buffer with a real NaN in one field rather than junk.And if the second writer of the vector target is something you can name from your side - which pass binds that 1706x960 format 34 resource for writing - tell us and we will skip it here instead of guessing.
@ThatRecompDev on GitHub · 2026-11-27 19:31 UTC · original
sorry for going quiet for a few hours, a lot landed on our side and it changes what's worth testing on yours, so read this before you spend more boots on
8bca98bc.the bisect down to TAA2 is clean work, and the readback race on the exposure numbers is a good catch, noted. but main has moved under you since
8bca98bc, with three translator fixes that each touch a lot of shaders:s_mov_b32(and in a second commit_b32and/or/xor, cselect, bcnt) was translated as a 64-bit lane-mask op when the source register had held a mask earlier, so it also overwrote the next register. one cascade-shadow compute pass lost its output address that way and wrote its lists over the start of a graphics heap, which is where the quad of the final composite lives. that was our frozen white PROLOGUE card, the game was running fine behind it. fixed, the prologue yard is live 3D now.s_brev_b32or was set before a branch. about 39,000 sample sites in ~7,600 programs sampled through whatever happened to sit in that slot (point vs linear, wrap vs clamp). the composite read its colour LUTs that way, and the TAA2 passes sample plenty.so before any more scans: could you rerun your plain boot (nothing skipped, no scan) on current main,
6a03b038? it will re-translate and recompile, sorry, that's the cost of translator fixes. if the white is gone, we're done with that hunt. if it's still there, your TAA2 scan data becomes the starting point again and it's good data.to your questions, honestly: on our card the frame doesn't go white at that point, ours is dark orange with unlit strips (only the sun reaches the lit image right now, ambient/sky/indirect are missing, that's what we're on). so I can't tell you "the resolve alone reproduces it here". the only writer of the format 34 target we have named is
PS_VelocityFill; your skip shows there must be a second one or the vectors aren't the carrier, and I don't have its name. what I'd look at first in your list is the repeating offsets:table 0 entries 6 and 62(2048 bytes, NaN at byte 756) andtable 1 entry 7(208 bytes, NaN at byte 76) look like a real NaN in one field of a constant buffer, and from reading PS_VelocityFill it divides by a previous-frame w built from a row of the previous view-projection matrix in its constants. a NaN or zero there would poison everything that reprojects, TAA2 first.--d3d12-nan-scan-dwordson the 2048-byte record around byte 756 (say 736:16) and on the 208-byte one around 76 would show whether that's a matrix row. the 640 KiB all-NaN range I can't place yet.and yes please attach the two screenshots from the "all three skipped" boot, a correctly coloured street frame from your card is something we can compare ours against.
@RubAway on GitHub · 2026-11-28 06:06 UTC · original · edited 2026-11-28 07:59 UTC
Boots on
7d7fe794and2c16b3c9on the 5090: the frozen white card is gone. Numbers, and one crash in CPU BVH rehydration.Rig unchanged (RTX 5090, driver 32.0.16.2124, developer mode on,
--gpu-keep-awakeoff everywhere). We skipped6a03b038and went to2c16b3c9. Twenty boots, nothing skipped, no scan,--raytracing --rt-traversal --d3dkmt-watch --aftermath, at 1280x720 / 1920x1080 / 2560x1440.1. Your rerun request: the white PROLOGUE card is dead on this card
device removed, 0given up inside, 0 faults, 0 memory-gate hits across the twenty boots.driver background shader work off -> 0x00000000in every boot,optional shaders 0.0 of 256 MiBin every table report. The tables are flat now.mean rgb (238, 238, 238)from present 1300 to the end now read a scene:[capture] present-2400: 2560x1440 format 28: 3686400 of 3686400 pixels not black, box (0,0)-(2559,1439), mean rgb (47, 46, 41). Sky gradient, sun at the horizon, correct silhouettes, letterbox. Two screenshots attached, same moment, 1440p and 720p from two boots.What survives of the white is much smaller: a one-capture flash during the intro in 3 of the 20 boots ??"
[capture] present-1000 ... mean rgb (223, 223, 223),present-1100,present-1200 (216, 217, 219)??" and the next capture is a normal frame again. Same present range where TAA2 first ran on the old build. Different from the frozen card, and not every boot.Still here: dark bands on sunlit ground, as in your w372 note. The sun bars on shaded walls are gone on our side too.
One artifact for your eye: a hard-edged pale blue wedge at the right edge of the 1440p frame (in the attached screenshot). It sits there while everything around it is drawn correctly; it does not appear at 720p. The soft green blobs in the same frame read as lens flare, we're not reporting those.
2.
--depth-twinscloses the null-view depth writes hereOn
7d7fe794without the flag, every boot had 107 of the warnings we quoted earlier in this thread:On
2c16b3c9with--depth-twins: 0 of those, and 316depth twins: twin ... for depth ...lines. Same scene, mean rgb went from about (35, 32, 29) to (49, 45, 40), i.e. the world got lighter and flatter. So on this card the scene depth at render resolution and the 768x768 / 256x256 / 128x128 mask depths really were not being written before.3. What the frame is made of now (720p, warm cache,
--mesh-launchon)[gpu] queue #1 busy 573.7-604.7 ms/frame. Heaviest:Stubbing the whole
CascadeShadowsfamily (65 pipelines) took the settled frame median from 395.2 to 333.8 ms, so those shadows cost about 60 ms here ??" and the stub over-brightens the frame to(238, 203, 159)instead of(53, 47, 42), which is a good sign: the shadow masks are doing real work now. For scale, a boot with all draws suppressed but everything else running sits at 62.7 ms/frame of CPU.Resolution on one configuration: 720p 395-419 ms, 1080p 493 ms, 1440p 735 ms settled median.
loader:indirect-clamp +restis what grows with resolution: 25.3 ms at 720p, 78.3 ms at 1440p.4.
--mesh-launchis worth 25% here, but the first boot after enabling it is misleadingWith the cache cold for the new shape:
pipeline cache: 333 loaded (cache hits), 2658 stored (built by the driver), and the boot never got the world to the renderer (1037 presents, mean present interval 1440 ms, tables at 62.3 MiB). Run it twice more and it reads2864 loaded, 2 stored, and the settled median goes from 459.8 ms to 395.2 ms. Is that the mesh stage entering pipeline identity? If so,--helpcould say to warm the cache once after turning it on, because the first boot looks like a failure and isn't.5.
--no-rt-stand-insis a loss on this cardSame boot otherwise: settled 451.7 ms vs 395.2 ms,
queue #1 busy 630.4vs573.7, mean present interval 502.8 vs 485.1 ms. So letting the game start the held ray-tracing passes costs more than the stand-in fills do. We haven't tried--rt-stand-ins-reachyet.6. A crash we hit, in the CPU BVH rehydration of XDXR
Deterministic with
--raytracingon8bca98bcand on7d7fe794, always right after two rehydration lines. The fault block from that boot:It reads a per-structure offset (
0x4458) off a base that doesn't own that memory, right after being asked to rebuild structures this process never built. What we run locally (not upstream, our tree only): the batch builder remembers which records it actually wrote, the rehydrator refuses anything it didn't build here (WARN [bvh] rehydration skipped: source was never built here), and the descriptor copy translates with slack instead of a fixed layout. With that, 0 faults across twenty boots. YourStoredRecordschange in2c16b3c9reads adjacent to this ??" we still carry the workaround on top of it and have not re-tested the fault without it. Want it as a PR, or is the same root cause already fixed on your side?7. A NaN scan with a negative result, plus its cost
--d3d12-nan-scan PS_DeferredTextured,PS_DeferredPedTexturedNC,PS_PropFoliageDeferredToon2c16b3c9with ray tracing on: every report says clean, e.g.No non-finite inputs on the world's heavy textured passes now; the motion-vector picture from our earlier boots hasn't come back. Cost: the scan itself is about 190 ms/frame (settled 605.4 ms with it, 418.8 ms without), so it's a targeted probe, not something to leave on. We have not run your
--d3d12-nan-scan-dwords 736:16on the 2048-byte record or the 208-byte one yet ??" say which and it's our next boot.8. Three small things worth a line in the docs
--dump-framein a boot fires; a second one is silently ignored. We assumed a bug, but the help doesn't say one per boot.table 1sat at1966080 entries = 480.0 of 512 MiBand2017024 entries = 492.4 of 512 MiBthrough whole boots (table 0around 226 MiB). Does the guard watch table 0 only? On--raytracingboots the pressure is in table 1.--trace-exposure 60on our tree with ray tracing killed two boots at about 250 s (we no longer run it). Without it, the same boot runs fine for 25 minutes.@RubAway on GitHub · 2026-11-28 08:01 UTC · original
Your VelocityFill probe: we find a poisoned 2 KB constant shared by VelocityFill and TAA2, and a 640 KiB input to TAA2 that is entirely NaN
We ran the probe you asked for, on your
mainplus our local BVH-rehydration guard, on the 5090 at 1280x720 withthe usual set (
--raytracing --rt-traversal --mirror-table-records reach --depth-twins --mesh-launch):First, a reading trap in the flag itself. The summary line says everything is clean:
but under every summary line there are per-record lines, and those do report non-finite values. We first counted
only the summary lines and concluded "clean"; that was wrong -- in that boot 557 of the 1649 per-record lines name
non-finite floats. Worth a mention in the docs, because the summary reads like a verdict.
What the records show. The record you suspected, in every report of every scan pass we made -- 135 of 135
without the dword dump, 52 of 52 with it, unchanged from frame 1287 to the end of the boot:
So at byte 736 the 16 floats read
0, 0, 0, 1, 1and then eleven NaN in a row. The same record appears a secondtime at
entry 24with the same 17 non-finite and the same first NaN at 756. Next to it:also in every report. A 1 MiB record (
entry 0, 11379 non-finite, first NaN at (532840, 0)) shows up three times,only on frames 1287-1344, which looks like a buffer nobody had written yet during streaming rather than something
reaching the frame.
TAA2 is worse, and it is not only the constant. A separate boot with
--d3d12-nan-scan TAA2 --d3d12-nan-scan-dwords 736:16names the three passes, and all three bind a buffer whose every float isnon-finite -- 82 reports of each pass, frames 1168 to 2326:
CS_TAA2_ResolveandCS_TAA2_PrepareFrameStatsbind a second buffer of the same size atentry 37, alsoentirely non-finite. All three also bind the same poisoned 2 KB record as VelocityFill --
entry 6,entry 34and
entry 62,2048 bytes as float32: 17 non-finite, first NaN at (756, 0). So the same block0, 0, 0, 1, 1, NaN x11is fed both to the velocity pass and to the resolve, and the resolve additionally readsa 640 KiB input that contains nothing but NaN.
Alongside it: null views. In VelocityFill's tables, 8 of about 15 records read
null view (reads 0)-- table 0entries 0, 1, 14, 15, 16, 20 and 21 -- in 51 of the 52 reports. The TAA2 boot logs 8858
null viewrecord lines.With
--rt-traversaland the held stand-ins on our machine between 130 000 and 735 000 draws and dispatches areskipped per boot, so it may well be that these passes are reading memory whose producer never ran here.
Three questions:
tie a
table N entry M, record Rto the binding name, or at least to the resource the game created it from, sowe can say which of these is your previous view-projection rather than guess from the 2048-byte size?
655360 bytes / 163840 floats, all NaNinput something TAA2 normally reads from a pass that a stand-inholds on this machine -- i.e. are we looking at a pass we skipped, and would a
--hold-passesentry for it bethe right way to test that?
from frame 1168 on, so we can also scan only the resolve and report every 500 frames)?
One more thing, in case it is a bug on our side only: a boot with
--d3d12-nan-scan VelocityFill,TAA2plus thedword dump ended 18 seconds in,
the loader ended with -1073741819, and in stderr the last managed stack waswhich we logged as a first-chance exception, so we cannot tell whether it was fatal or whether the access
violation came from the scan itself. Scanning
VelocityFillalone, andTAA2alone, both run to completion, sowe have not been able to pin it down. The scan is not free either: 190 to 330 ms a frame on our card, which is why
we only ever run it in a boot of its own.
@ThatRecompDev on GitHub · 2026-11-28 08:52 UTC · original
heads-up for everyone building from source: I rewrote the history of main this morning to take AI-attribution trailers out of old commit messages. the code is byte-identical (same tree at the tip), but every commit id from 24 Nov on changed, so the ids quoted in this thread before today no longer exist. to get back on track:
git fetch originthengit reset --hard origin/main(or a fresh clone). if you carry local patches, rebase them withgit rebase --onto origin/main <old main id you were on> <your branch>. sorry for the churn, it won't happen again.and thanks for the twenty boots, really good news on the white card. proper answers to both of your comments (the shader-table guard at 480+ MiB, the ttmp5 parse, the BVH rehydration crash, the NaN records) are being checked against the code right now, I'll reply with what we find later today.
@ThatRecompDev on GitHub · 2026-11-28 09:49 UTC · original
thanks for all of this. the shader-table guard was a real bug: it looked up both tables once, at the first check, and on your boots table 1 didn't exist yet. that miss stuck, so it fell back to the DXIL estimate, which only warns and never got near 400. now it reads both tables at every check and says once which source it's using, so you should see a line early in the boot. that's on main now, along with the bits below.
the ttmp5 one was caught inside TableReach, so it wasn't what ended that boot. the -1073741819 is an access violation from somewhere else, so a fault record would help next time. it doesn't throw for ttmp anymore anyway. the docs now say --dump-frame is one per boot and that --mesh-launch rebuilds pipelines the first time, so warm the cache once.
the NaN line is a bit different from how it reads: "11 inputs scanned clean, 15 in all" means 4 inputs had NaN or Inf, and those are the lines under it. so the summary was right, it's just easy to misread. that's in the docs too. on the records themselves: by the disassembly, PS_VelocityFill and the hair strand vertex program have the 2 KB block bound but never read it, so that one's probably harmless. the two all-NaN 640 KB buffers TAA2 reads are still open.
on the bvh crash, yes, I think the same root cause is on main. rbx is 0x2d9 = 729 and rax 0x4458 = 72924, so that looks like the DLL reading vertex 729 at stride 24 past the end of the mapped buffer. we check strideVertexCount but never the index values or the leaf primitive indices it follows. a PR would be welcome, but refusing anything not built in this process would also skip the streamed core_bvh4 structures, which are never built here. better to check that the indices are below VertexCount and the leaf indices are in range, maybe the CRC in dword 2 too, then skip and count the bad ones. if you can share how many rehydrations your guard skips per boot that'd help.
@RubAway on GitHub · 2026-11-28 10:33 UTC · original
Answers to what you asked for, plus one measurement with a question attached.
Rehydrations our guard skips, per boot. The guard names its reason once and then prints one line per skipped
batch:
An 8-minute boot of the story-load-pad stretch: 325 skipped batches, 4008 descriptors. The same stretch run for
15 minutes: 318 batches. So it is not a couple of stragglers, the whole streamed set is refused, every boot.
Your point about
core_bvh4holds on our machine:none of those structures are built in our process, so "refuse what was not built here" drops exactly them. We have
not written your index-range version yet, because we would be guessing at the layout:
record points at?
it from the shipped packed nodes? our first minutes look like your docs: hundreds of builder dispatches a frame.
The shader-table guard fix shows up for us. Early in the boot we now get both tables, read at every check:
and table 1 grows to 3072 and 3328 entries later in the same boot. Thank you, that was the missing signal.
The NaN summary: our misreading, understood. 11 clean of 15 means four inputs with NaN or Inf, listed under the
line. That fits your reading of the 2 KB block: our worst line was a 2048-byte record with 17 non-finite values,
first at (756, 0), in
PS_VelocityFill- bound but never read is consistent with what we see, since theR16G16_FLOAT target it fills still draws. The two all-NaN 640 KB inputs of
CS_TAA2Updateremain the ones we cannotexplain, and we have not found a way to name the binding behind a
record N.One clamp measurement, and a question about the mesh path. The comment in
ClampBarriersprices the legacytransitions at 10-15 ms a frame in
loader:indirect-clamp. On our boots that pass is 38.65 ms in one boot and136.21 ms in another, same input script, 720p. So we tried lifting the "not with
--mesh-launch" ban:MeshLaunch.RecordisSetGraphicsRoot32BitConstant+SetGraphicsRootShaderResourceView+SetGraphicsRootUnorderedAccessView+DispatchMesh(1,1,1), there is no ExecuteIndirect in it, and d3d12.h putsthe mesh stages under
VERTEX_SHADING. We replaced the two legacy transitions inIndirectClamp.LaunchClampedwith buffer barriers carrying the same edges (clamp compute writes to
VERTEX_SHADING+SHADER_RESOURCE|UA,then back to compute), and let the first barrier of a recording cover the stage's reads.
The pass does become cheap: 3.02 ms and 3.86 ms, 7.25 ms with
--no-indirect-batch. But the boot then nevergets into the world. The game gives 45-50 frames in 8 minutes, frames of 10000-16000 ms, and the frame accounting
says nearly all of it is the game's own time while our submit path is 17 ms. No fault records, no device removal, no
page faults; the picture freezes at the same point in three boots in a row. Disabling indirect batching changes
nothing, so the batch is not the cause. Two questions before we push this further:
those two transitions - is there a fence or a queue wait we are missing?
DRAWorALL_SHADINGrather thanVERTEX_SHADING?We reverted the change and are keeping the numbers instead; if you tell us the right edges we will re-run it and, if
it holds, send it as a PR. For scale: these boots are warm-cache, 720p, with
--raytracing --rt-traversal --mirror-table-records reach --depth-twins --mesh-launchon an RTX 5090.@ThatRecompDev on GitHub · 2026-11-28 12:18 UTC · original
thanks, and good to see the table-1 line now.
on the bvh questions. the primitive indices the DLL follows are in the serialized structure itself, not the index buffer: the packed leaves at dword 13, 2048 triangles per 128 KiB chunk, as arrays of 3-byte geometry index, 1-byte flags, 3-byte primitive index, 3-byte paired index and 1-byte swizzle (docs/raytracing.md). the DLL goes leaf, then that geometry's index buffer, then the vertex buffer. your fault fits the last step: rbx 0x2d9 = 729 and rax 0x4458 = 72924, so vertex 729 at stride 24, just past the mapped end. today we only check that strideVertexCount and the index range are mapped, never the values (BvhRehydrator.RehydrateOne and TriangleGeometry.TryTranslate). we haven't pinned the exact byte offsets inside a chunk, so check them against the DLL before relying on them.
dword 2 is a CRC32 of the build inputs (NumDescs plus per-geometry counts and formats), and the DLL has its own ValidateRehydrateAccelerationStructureBuildDesc for it. we haven't checked whether the CPU export calls that itself, so calling the DLL's validation is probably the simplest test of whether a desc matches its structure.
skipping is the wrong end state though. the rehydration is the rebuild from the shipped packed leaves, so refusing all 4008 descs means no static world BVH at all. my main suspect is timing: we rehydrate at record time, but the console does it on the GPU when the list executes, after the streaming copies the list waits on, so we can read index data that isn't there yet. what I'd welcome as a PR: rehydrate at ExecuteCommandLists for that list, validate the desc and the index values first, skip and count only what fails.
on the clamp: inside one list nothing but those barriers orders the stage's read, no fence missing, and every ExecuteCommandLists ends with a full flush anyway. VERTEX_SHADING is right, the enhanced-barriers spec says it covers the amplification and mesh stages (DRAW and ALL_SHADING would work too, they're just wider). one catch: with the ban lifted, AfterClamp is already a barrier to EXECUTE_INDIRECT, and the next barrier on the same buffer has to include that in its SyncBefore. when I got this wrong while writing the fix, the runtime refused the list at Close with E_INVALIDARG. a list that fails Close never runs, and the game then waits on fences that never come, which would look a lot like your 10-16 s frames with no fault. could you grep those boots for "command list Close failed"?
the fix is on main now: --clamp-enhanced-barriers works together with --mesh-launch. a launched clamp gets one barrier from the clamp's writes to the stage's read (VERTEX_SHADING, SHADER_RESOURCE) and nothing after the launches, and every later barrier carries the earlier scopes. a test records that sequence and closes the list on a real device. the clamp now waits for earlier vertex shading, so expect more than your 3 ms. could you try it with --clamp-enhanced-barriers --mesh-launch, and once without --mesh-launch so we know which half matters?
(main also has upipibi's mesh hang fix from #71 now, so your next run retranslates the mesh programs once.)
@RubAway on GitHub · 2026-11-28 13:10 UTC · original
Answering the grep you asked for first, because it lands exactly on your explanation.
"command list Close failed" - present in all three stalled boots, and nowhere else today. One line per boot:
and the line right after it is our own wait diagnostic naming the list that never ran:
Same shape in the third boot with a different address. So yes: the list carrying the fence value died at Close, was
never submitted, and the game sat waiting for a value that could not arrive. That is your 10-16 s frames with no
fault, and we had the evidence in our own logs without reading it that way. Thank you - the missing part was that
the next barrier has to carry EXECUTE_INDIRECT in its SyncBefore.
The NaN inputs, now with shapes. 8-minute boots,
--d3d12-nan-scan TAA2,VelocityFill: 1050 report lines, 168scan summaries, 249 distinct record ids. Attributed by the scan header the line is printed under:
Our memory does not explain it: the page store zeroes a page when it is returned and hands out already zeroed pages,
so a fresh allocation reads as zero, not as NaN. Either something wrote these, or the scan is reading a view of
memory that has already been freed.
The census and
--clear-targets-each-frame. Never cleared targets: 22 shapes, 53 binds, and they are the postchain - the Karis bloom pyramid (426x240, then 13x7 and 6x3), auto-exposure (
PS_ComputeBilateralGridBaseLogLuminance106x60),
PS_GaussianAberrativePrePassWithVignette853x480. At frame 1200: 55 render targets bound, 8 cleared by thegame, 37 never cleared. Note 853x480 is the same shape as the poisoned half-float texture above.
With
--clear-targets-each-framethe captures go black from present 1200 on (last capture 0,0,0), and the NaN linesbarely change: 1018 lines, and the 640 KiB input is still entirely non-finite (171 lines). So the poisoning is in
bound buffers, not in render targets, and the game really does depend on the previous contents of those targets.
We are not running that key any more.
The fault record you asked for (one boot ended 20 s in, our fault reporter printed nothing):
We reran the same flags and it did not repeat (3 minutes, healthy), so we read it as a race in the build queue. Tell
us if a stack like that points somewhere you want a targeted stress for.
BVH. Understood, and skipping is indeed the wrong end state - with our guard there is no static world BVH at all
(325 skipped batches, 4008 descs per 8-minute boot;
core_bvh4.rpfis streamed from the pack and never built here).We will write the PR in the shape you described: rehydrate at ExecuteCommandLists for that list, validate the desc and
the index values first, skip and count only what fails. One question before we start: do you want us to call the DLL's
ValidateRehydrateAccelerationStructureBuildDescdirectly as the desc check, or reproduce the CRC32 of the buildinputs in C#? And if the timing theory is right, is there a signal we can use for "the streaming copies this list
waits on are done" other than the list's own fence?
Your clamp fix. We are at
69bd3950with it in the tree and will run it both ways you asked ---clamp-enhanced- barriers --mesh-launch, then the same without--mesh-launch- and post theloader:indirect-clampnumbers againstour legacy baseline (38.65 ms and 136.21 ms on two boots, same input script, 720p). We know the first run at this tip
retranslates the mesh programs once, so we will warm the cache before measuring.
@RubAway on GitHub · 2026-11-28 13:48 UTC · original
Ran the clamp both ways you asked, on a 720p boot with our usual ray-tracing set. The cheap barriers work; the run does not.
So the barrier cost really does drop (5.40 and 10.39 ms against 28.97 in the legacy form), and your explanation of the
hang was right - but with the flag on, the boot still dies, and mesh-launch is not the half that matters. Both broken
boots end in the same fault, byte for byte:
Same instruction, same register values, different thread ids and different mesh settings - so it is a fixed path in the
NVIDIA user-mode driver, not a race, and it is reached with a null object (write to offset 8 of NULL). In both boots
the
command list Close failed: 0x80070057line comes before the fault, and across all of today's legacy bootsthat line appears zero times; the only three occurrences today are in runs with the flag on.
What we would like to know: is there a barrier shape you expect us to emit instead - for example the clamp's write
barrier and the EXECUTE_INDIRECT edge as two separate BarrierByType calls rather than one with the earlier scopes
carried in SyncBefore, or a buffer subresource range instead of the whole buffer? We can try any specific shape you
name, and we are happy to keep the enhanced path behind your flag until it survives a boot on our 5090.
For the picture and speed, your mesh phase loop fix landed well. A cold run at that commit (3155 pipelines rebuilt)
still came in at 731,2 ms settled where our previous tip was 790,2 ms warm, and the slowest frame is 9,3 s instead of
55 s. With the cache warm the same boot is 684,3 ms settled at 720p - our best number yet. That is also why the
clamp matters so much to us now: on that boot the heaviest entries on the graphics queue are the clamp family
(
loader:indirect-clamp +rest 86,28 msplusloader:indirect-clamp 14,61 ms) ahead of the deferred lighting draws.On the NaN hunt we are switching to your
--watch-address texture:853x480:34- the poisoned half-float texture wereported is exactly that shape, so we should finally see who writes it: DirectStorage writes, mapped pages, and GPU
copies into it with what they read. Will post what it says.
@ThatRecompDev on GitHub · 2026-11-28 14:03 UTC · original
thanks for grepping, that settles it.
one thing that changes how to read those lines: the Close warning is printed once per boot, so one line doesn't mean one failed list. your barriers were recorded every frame, so most likely a list failed every frame.
the waits weren't forever either. a memory wait is released after 5 s and its address isn't waited on again, so a frame that runs into two or three new addresses costs 10-15 s. the "did not reach ... in 5000 ms" lines and the "released by the timeout" count in the memory wait line at the end of the boot should show that.
which call failed: at
139a62c9our code never put enhanced barriers on the clamp scratch with --mesh-launch (ClampBarriers.Attach turned them off), so the refused call was one of the hand-made barriers. my guess is the first one after AfterClamp, because AfterClamp ends in EXECUTE_INDIRECT and the next barrier on that buffer didn't name it in its SyncBefore. the runtime also refuses a sync bit with no access that bit allows.main records the whole sequence and a test closes it on a real device.
f4cca604(the --capture-dispatch copies) only matters if you had --capture-dispatch on, and your flags don't show it.your log also shows a real gap on our side. a list that fails Close still has its bottom-of-pipe writes recorded (your 0x4c7), and nothing ever lands them.
I'm fixing that on a branch: when the game submits such a list, the failed desktop list is left out, and the CPU writes those values once the queue's fence gets past it. a bad call then costs that list's work instead of 5 s waits. Close still returns the error to the game, same as now.
on the coreclr crash: I found one real race in that path, but I'm not sure it's the one you hit. at the end of a boot the cache unmaps its segment files while build threads can still be inside LoadPipeline on a library made from one of them, and that library reads the mapped file on every load.
the cache prints its summary line ("pipeline cache: N loaded (cache hits), M stored ...") right before it unmaps. if that line is in that boot's log just before the crash, the AV happened during teardown and something else ended the boot at 20 s. if it isn't there, this isn't it and I don't have a cause yet.
the fix (unmap only after the last load is done) is on the same branch. if it happens again, a minidump would show whose code read the bad address: WER LocalDumps for fivestar-loader.exe with DumpType 2 writes one. coreclr as the faulting module doesn't tell us much without the native frames.
on the TAA2 inputs, my honest read: the scan reads every buffer as float32, whatever the game keeps in it. a 640 KiB buffer that's 100% non-finite looks more like integer data than 163840 real NaNs. 0xffffffff, for example, is a common clear value for atomic-min buffers or an "empty" marker, and it reads as NaN.
our pages are zero when they're allocated, so something wrote it. on the same branch --d3d12-nan-scan-dwords also prints the raw bits next to any non-finite value. once that's on main, a TAA2 scan with
--d3d12-nan-scan-dwords 0:16would tell us which it is.the R16G16_FLOAT 853x480 one is at render resolution (2/3 of 1280x720), and you said VelocityFill fills an R16G16_FLOAT target, so I'd check first whether it's that one. a share that grows every frame looks like it feeds on its own history. next we'll look at what writes the 640 KiB buffer and at that target's history.
the BVH questions. please call the DLL's export rather than reproduce the CRC. we already call ValidateRehydrateAccelerationStructureBuildDesc on the CPU in the export self-test (ExportCallCatalog, BvhRecipes.ValidateRehydrateDesc) with a stand-in
this, and it returns S_OK for a matching CRC and E_INVALIDARG for a wrong one.it also runs XMemVirtualQuery on the destination and the source, and our xmem answers that for plain process memory. so it should take the same CPU-address copy of the desc that BvhRehydrator passes to the rehydration. ConsoleBvhModule only binds the prebuild and rehydrate exports today, and the mangled name is in BvhRecipes.ValidateRehydrate.
one correction to what I wrote earlier: our self-test only covers NumDescs (it uses zero geometries), so "per-geometry counts and formats" is a guess I haven't verified. one more reason to let the DLL do it.
for the timing there's no separate "streaming is done" signal in our code. our DirectStorage shim reads and inflates on a worker thread straight into memory and completes the game's status array entries, and the game never uses EnqueueSignal.
work on the copy queue reaches the direct queue only through the game's own fences and memory waits, which we turn into queue waits at submission. so rehydrating at ExecuteCommandLists, as I suggested, beats record time, but those waits may not have held yet when the CPU gets there. the list's own fence is too late, since it only signals after the BLAS was needed.
the point where everything is in place is the GPU reaching the rehydrate in the list. the pieces exist: ListSplits splits a list at a memory wait, and MemoryWaits holds a queue on a shim fence that a watcher thread signals. so you'd split at the rehydrate, wait for a fence after the segment before it, rehydrate on the CPU, then signal the fence the rest of the list waits on.
that's a bigger change, so I'd be happy with the validation and index checks as a first PR and the timing as a second.
and thanks for doing the clamp runs both ways, warming the cache first is exactly right. looking forward to the loader:indirect-clamp numbers.
@ThatRecompDev on GitHub · 2026-11-28 14:17 UTC · original
quick follow-up: the fixes I mentioned are on main now (
16e9d191).a list that fails Close no longer loses its fence writes. once the game submits it, we land those values from the CPU when the queue gets there, so a wait like yours shouldn't sit there anymore.
the pipeline cache also keeps a segment mapped until the last load on it is done, which closes the race I found at shutdown. not sure yet it's the same crash you hit, so a dump would still help if it comes back.
and
--d3d12-nan-scan-dwordsnow prints the raw bits next to each non-finite value, so we can see whether that 640 KiB buffer is real NaNs or just 0xffffffff fill.@RubAway on GitHub · 2026-11-28 14:54 UTC · original
Your two questions answered, and the target's history found. Moved onto
16e9d191with our BVH work on top: healthy boot, 1863 presents, no fault, no Close failure, settled 603 ms at 720p even with the watch readbacks on.The 640 KiB TAA2 input is integer data, exactly as you guessed. We printed the raw bits ourselves an hour before yours landed, and your version confirms it:
Every one of the 163840 dwords of the 640 KiB input is
0xffffffff. The 1 MiB input starts as-2(0xc0000000) and its first non-finite is0xffffffee. Histogram of the bits reported as "first" over one boot:0xfffffffbx256,0xffffffffx254,0xffffffeex160,0xffc00000x68,0xff800000x44,0x7f800000x4. So out of 795 scan reports only about 116 carried a genuine float special; the rest were integer fills read as float32. The three "poisoned shared buffers" we described are the same two buffers: TAA2 Resolve, TAA2 PrepareFrameStats, TAA2 SpatialUpscale, ComputeBilateralGridBaseLogLuminance, DownSampleBloomFilterKaris (+WithOpticalMask) and DownsampleColorAndCoC all bind them, record 331485 and 331476 in each of them, which is why the same numbers appeared under every pipeline.Small suggestion: the scan already knows what it is reading (it prints
format 34 853x480and a channel number), so for a view it knows is not a float format it could say so instead of counting non-finite floats. That would have saved us a day of reading.The R16G16_FLOAT 853x480 target: your watch tool found its history.
--d3d12-watch-target 853x480:34 --d3d12-watch-rendered:The game clears it to -10000 twice per frame, and at the first bind of the next list - before any writer of that frame - 115589 of 409440 texels are already at least 65504 in size, while only 37 are NaN (20, 34, 542, 586 in the other frames). So the
mean (NaN, NaN)in that line is the aggregate being poisoned by a few dozen NaN texels, not the whole target: the real number is the 28% of texels sitting at or above the half limit. In the same boot the scan counted 240047 non-finite texels in it at draw time, and onlyPS_BlitColourwrites it in the captured frame.Two things we would like your read on:
format 34 not converted, and we are not sure what that caveat covers.If the clear is fine, then the sentinel itself is the source: -10000 times -10000 is 1e8, which is nowhere near half range, so one multiply or dot product of that fill turns it into plus/minus infinity. That fits what we see downstream: the same -Infinity in TAA2 PrepareFrameStats, in TAA2 Resolve, in the bilateral luminance grid and in the Karis bloom downsample at once, instead of a poison that grows pass by pass.
Close warning, your correction. With your wording the two enhanced-barrier boots give 32 and 35 memory wait lines, and the line you described is there:
0x29c0417ff70 (op 7) did not reach 0x522 in 5000 ms (it holds 0x51c): released, and not waited for again; 2 so far. Our older boots at139a62c9print the previous form (still waited for after 1500 ms; writer: list 0x3046e602080 recorded 0x4dd there 7703 ms ago, submitted to queue #4 2078 ms ago (fence 3 of 8)). Your guess about the refused call is right: our barriers were the hand-made ones, and the one after AfterClamp did not name the indirect execution in its SyncBefore. Landing the lost writes from the CPU is the better fix, and it also takes the 5 s cost away from us, so we have dropped our barrier patch.The pipeline cache race. In that boot's log there is no summary line: the only
pipeline cachelines are the two opening ones (3257 pipelines in 33 segment(s),33 segment(s) opened in 0.9 s), and nothing printed "N loaded (cache hits), M stored". So by your test the AV was not during teardown, and the unmap-after-last-load fix is not the cause of our crash. We will enable WER LocalDumps for the loader so the next one brings a minidump.The clamp cost you asked for, from the gpu timings of a warm-cache control run at 720p: in a light window
queue #1 busy 95.03 ms/frame (loader:indirect-clamp 9.21 ms, PS_DeferredPedTexturedNC 8.64 ms, PS_DeferredTexturedStdNC_48fb7423_Wrapped.trim2 7.86 ms); in a heavy street windowqueue #1 busy 880.61 ms/frame (loader:indirect-clamp +rest 153.47 ms, PS_DeferredPedTexturedNC 92.67 ms, loader:indirect-clamp 84.51 ms). So in the windows that decide the frame time the clamp itself is 17% of the queue.BVH: we will not reproduce the CRC. PR 1 will call the DLL's
ValidateRehydrateAccelerationStructureBuildDescthrough the mangled name from BvhRecipes.ValidateRehydrate, at the point where BvhRehydrator decides to rehydrate, with the same CPU-address copy of the desc it passes to the rehydration, and count only the descs that fail rather than refusing the batch. PR 2 can then be the timing one (split at the rehydrate, wait the fence of the segment before it, rehydrate on the CPU, signal the fence the rest of the list waits on).@ThatRecompDev on GitHub · 2026-11-28 14:58 UTC · original
thanks for running it both ways, and sorry I skipped this comment in my last reply. 684 ms settled at 720p is great to hear, and the mesh loop fix paying off cold too is a nice bonus.
we hit the same thing here. one of our own boots with --clamp-enhanced-barriers --indirect-gather (no --mesh-launch) had the same pair: Close failed with 0x80070057, then the write to 0x8 at nvwgf2umx.dll+0x849a05 inside a Dispatch, with rcx=0 and rdx=5 like yours.
the shape you're emitting is fine, and so is one barrier per edge over the whole buffer. the bug was mine, in the clamp fix on main. the first barrier of a recording on the scratch always named VERTEX_SHADING (and SHADER_RESOURCE) in its SyncBefore, and with --mesh-launch every later one did too. a compute list can't name that scope. with the debug layer on, the runtime says it straight out:
the game records indirect dispatches on compute lists, so every such list failed Close. that also explains why --mesh-launch wasn't the half that mattered. it lines up with our own boot history too: our boots with enhanced barriers before that commit closed fine (apart from one with --capture-dispatch, a separate bug fixed since), and every one since has had the failed Close.
the fix is on a branch: VERTEX_SHADING and SHADER_RESOURCE are only named with --mesh-launch on a direct list, which is the only place a launch reads the scratch. a compute list gets COMPUTE_SHADING | EXECUTE_INDIRECT | COPY, as before that commit. if you want to try it before it lands, that's the whole change, in ClampBarriers.BeforeClamp and the Earlier/EarlierAccess scopes.
a device test now records gathered and clamped records with enhanced barriers on a direct and a compute list, with and without --mesh-launch, and closes them. it fails on main and passes on the branch. one boot with the fix and w406's flags (prologue save, --clamp-enhanced-barriers --indirect-gather, --max-driver-compiles 1) ran the full 600 s: 2391 presents, no failed Close, no fault. loader:indirect-clamp was 1.3-2.2 ms a frame on our compute queue.
the driver fault: I can't prove which list it was, since we don't have the native frames resolved. my best guess is that the runtime only reports a bad barrier at Close, so the list keeps recording until then, and the driver choked on a Dispatch recorded after the bad barrier. either way it never showed up without that barrier.
I also tightened what happens after a failed Close. we now leave that desktop list alone until the game resets it, then swap in a new list at once instead of trying the dead one on every spare allocator. main already leaves it out of the submission (
16e9d191). and a list split at a memory wait no longer keeps recording into the half it just closed if the new half can't be reset.so please keep the flag off until this is on main. after that it would be great to see your clamp family numbers on the graphics queue again. and thanks for switching to --watch-address on the 853x480 texture, looking forward to what it shows.
@RubAway on GitHub · 2026-11-28 15:33 UTC · original
Your enhanced clamp barrier fix works on the RTX 5090, and it is worth more than the crash it removes.
The crash is gone. On the current main,
--raytracing --rt-traversal --mirror-table-records reach --depth-twins --mesh-launch --clamp-enhanced-barriers --output 1280x720, 8 minutes of the same input script:command list Close failed: 0x80070057appears 0 times,ERROR FAULT0 times, 1710 presents. Before your fix, the same two flags gaveERROR FAULT: 0xc0000005 access violation, write to 0x8,rip = nvwgf2umx.dll+0x849a05twice, and 53 and 57 presentsin the same eight minutes. The debug layer line you quoted is exactly what we had:
SyncBefore bits D3D12_BARRIER_SYNC_VERTEX_SHADING are incompatible with command list type D3D12_COMMAND_LIST_TYPE_COMPUTE.The clamp numbers on the graphics queue you asked for. Per-frame cost in the heaviest
--gpu-timingswindows, ourmachine, queue #1, windows of 41-48 frames where the queue is busy 634-742 ms/frame. The window named
loader:indirect-clampis the clamp pass itself, the windowloader:indirect-clamp +restis the aggregate that alsoholds everything not attributed to a named pipeline:
loader:indirect-clamploader:indirect-clamp +restSo the clamp pass itself is about four times cheaper with enhanced barriers, and in the
+restaggregate the clamp isno longer the part that matters. Whole-frame effect, same tree, warm pipeline cache, same input script, 8 minutes:
How we got there before your fix landed. We had written the same fix locally from your description: keep the
D3D12_COMMAND_LIST_TYPE the list was created with in our list wrapper (set at
CreateCommandList, read at the barrier)and name
VERTEX_SHADING/SHADER_RESOURCEonly when mesh launch is on and the list is direct. Your version isbetter:
ID3D12CommandList::GetTypeat slot 8, no extra field, andEarlier(list)/EarlierAccess(list)derivingfrom the same test. We dropped ours, so there is nothing of ours to merge here, only the measurements above.
One thing that costs on this merge. The first boot on the new main reads
pipeline cache: 2759 loaded (cache hits), 208 stored (built by the driver), 0 refused, 3326 pipelines: 208 pipelines rebuilt because the translatorchanges changed their identity hash. One-off, but worth a line in the status notes so people do not read the first run
as a regression: the same boot settled at 629.5 ms against 602.0 ms on the previous tree, and the two runs were in
different parts of the world (last capture mean rgb (71, 63, 54) against (93, 91, 89)), so that difference is the world
and the rebuild, not the barrier change.
What we are running now, so the number is a fair one: two boots on the same tree with a warm cache, same keys, one
with
--clamp-enhanced-barriersand one without it. Will post the pair.Question for the status notes: with this fixed, should
--clamp-enhanced-barriersbe the recommendation on adaptersthat support enhanced barriers, or stay opt-in? On our card the flag is a 12 percent frame time win and it does not
change what is drawn: same capture sequence, same black-frame points, no
Close failed.@RubAway on GitHub · 2026-11-28 15:55 UTC · original
The matched pair we promised, same tree (
588e8706), same input script, 8 minutes, warm pipeline cache in both runs(
0 stored (built by the driver), 2832 and 2840 cache hits of 3326), the only difference being--clamp-enhanced-barriers:loader:indirect-clampwindow on heavy framescommand list Close failed/ERROR FAULTHonest caveat: the two runs walked slightly different parts of the world, the legacy run reached a bright street (first
capture with min channel >= 200 at present 1300, mean rgb (203, 207, 210)), the enhanced run did not. So we do not
compare the whole-frame medians (837.8 against 622.9 ms); the comparable numbers are presents (+12.5 percent), mean
present interval (-11 percent) and the cost of the clamp pass itself (-60 percent). The drawn picture does not change
with the flag: same capture structure, no black frames in either run.
We are keeping
--clamp-enhanced-barriersin our working configuration from now on: on this card it removes the loss,makes the clamp pass about three times cheaper and takes nothing out of the frame. Next we are running it for 15
minutes to see whether the gain holds on the longer stretch of the world.
@ThatRecompDev on GitHub · 2026-11-28 16:16 UTC · original
thanks for confirming the integer data, and for the bit histogram. 116 genuine specials out of 795 reports is a much smaller hunt than it looked.
your suggestion is on a branch now. a buffer record's dword 3 says what the view is. a typed view of an integer or normalized format is now named in the report and not scanned, and a typed float view is read in its own format, so halves are read as halves. raw and structured views don't carry a format, so they're still read as float32, but their line says so. it's not on main yet.
on the velocity target, I went through the code, and the short answer is that the clear is fine and the label misled you. that one's on me.
when the frame's first bind of a watched target is a clear, the trace takes its readback right there, recorded in the list before the clear runs. so "first bind (cleared) ... before the frame's writers" is what the clear is about to overwrite, i.e. what the previous frame's writers left. the 28% at or above 65504 is last frame's output, not the result of clearing to -10000.
the clear itself is passed through untouched. we forward your four floats to the desktop ClearRenderTargetView on the desktop texture's RTV, and the driver converts them. -10000 is exact in half. render targets are never refreshed from console memory either (anything created with render target, depth or UAV flags is GPU-written and skipped by the upload path), so a stale upload can't land on top of the clear.
your second question: the watch reads the desktop resource, a copy of subresource 0 into a readback buffer, not console memory. R16 channels are read as halves. "format 34 not converted" only means there's no RGBA8 summary or PNG for that format; the float stats after it are the real half values. "at least 65504 in size" counts |v| >= 65504, so 65504 itself and ±infinity, while NaN is counted separately.
on the same branch the label now reads "read before its clear", and the frame's first clear gets a second readback after it runs, so the clear's own output shows up. in our older traces of that target the frame goes clear, PS_BlitColour, PS_VelocityFill, PS_AlphaVelocityDepthResolve, so the big values come from one of those. VelocityFill is my first suspect, since it reprojects with the previous view-projection and a bad matrix overflows a half target in one step. we haven't confirmed which one yet. that also fits your sentinel point: a -10000 fill squared or dotted is out of half range in one step.
thanks for the clamp numbers too. 17% of the queue in the heavy windows makes it the next thing worth speeding up. the enhanced-barrier fix is on main now (
588e8706), so --clamp-enhanced-barriers should be safe to try again.and thanks for checking the summary line. so it wasn't teardown, and the pipeline-cache AV is still unexplained on our side. a minidump from WER LocalDumps is the best next clue when it comes back.
@ThatRecompDev on GitHub · 2026-11-28 16:27 UTC · original
quick follow-up: I ran that branch once with the watch on the velocity target (1280x720 here, since we output 1080p). the clear is confirmed fine. right after it, every texel reads -10000, with no NaN and nothing near the half limit.
the interesting part is the very next draw. PS_BlitColour rewrites the whole target, and afterwards the stats match the pre-clear readback exactly: 61440 texels at 0.0 and 150583 at or above 65504 in both, with max and min at ±Infinity. so the saturated values come back in through the blit, from a source that holds what the target held before the clear, and from there they carry into the next frame.
next we'll check which texture that blit's source view actually resolves to on our side. if it resolves to an older copy of the target instead of the memory the console blit reads, that would explain both the carry-over and the share growing frame to frame. we haven't confirmed that yet.
@ThatRecompDev on GitHub · 2026-11-28 16:35 UTC · original
thanks for the matched pair, that's exactly the number I needed.
with 12.5% more presents, the clamp pass three times cheaper and no change in what's drawn, I flipped it: enhanced clamp barriers are on by default from
46589e62, where the device has them.--no-clamp-enhanced-barriersgets the legacy transitions back if anyone needs to compare.we see the same here, no Close failures and no faults since the compute list fix.
and good point on the first run after a translator change. I added a line to the status page that the first boot rebuilds a few hundred pipelines and is slower once.
curious what the 15 minute run shows.
@RubAway on GitHub · 2026-11-28 16:38 UTC · original
Your VelocityFill suspect does not reproduce on our traces, and we think we know who does. The missing piece was
--d3d12-watch-limit: at the default 16 the readbacks of the first bind eat the whole budget, which is why our earliertrace named only
PS_BlitColour. Raised to 64, the same boot gives named writers per frame.One watched target, one instance of the shape (853x480, format 34), counts of
at least 65504 in sizeout of 409440texels, six frames sampled:
PS_VelocityFill_4f86a26bPS_AlphaVelocityDepthResolve_ab6941f7VS_Blit+PS_BlitColourVS_screenTransformFSQSo the reprojection pass is not the one that puts big values there: after it there are fewer. The jumps come from the
deferred G-buffer passes, and the largest ones all carry alpha clip:
PS_DeferredPedTextured_AlphaClipNC_Tint_97…: 53 → 117 954;PS_DeferredTextured_AlphaClip_c5fd36bb: ~66-72 k → 94 248 / 100 238 / 100 144 / 100 441;PS_DeferredTextured_a9c57b97_Wrapped.trim2: → 114 351 / 116 328 / 116 925;PS_TexturedDeferred_62941270: → 102 273 / 105 307;PS_DeferredPedTextured_AlphaClipNC_Tint_6a40bffdandPS_DeferredTextured_AlphaClip_942fcba4: → 83 108 / 95 069.Caveat we want to state rather than hide: the readback is recorded into the list the pass belongs to, and the game
records several lists in parallel, so the order of these lines is not the GPU timeline. Each line is still a snapshot
after the first write of that named pass. NaN is only visible at the "before the frame's writers" snapshots in this
boot (41 and 75 texels), after no named writer at all, which fits overflow in one frame showing up as NaN in the next.
While we are in that area, the hair question.
--d3d12-nan-scan smh: every hair program is clean on the inputs thescan can read, 37 of them (
smh_pose_*~CS_PreSkinSimNodes/Guides/UpdatePosePosition,smh_sim_*~CS_InitSimBuffer / CachePrevPosition / SolvePerVertConstraint / SolvePerSplineConstraint / WavePerSplineConstraint_32 / LodBlend / EstimateStartPosition,smh_gen_*~CS_InterpolateStrandsat 14 LODs,smh_modify~CS_InterpolateStrandStyle,smh_draw_128~CS_VisHair,bvh_skinning_smh~CSGenerateHairVB/IB) - 14 to 16 inputs read out of 29 to 48, the restblock-compressed or non-float. The non-finite values are in the memory bound through their indirect records: 1941
report lines, 113 different record ids, 62 / 46 / 107 / 161 / 2052 / 4862 non-finite per bound buffer of 998400 /
448000 / 300000 / 188416 / 153600 bytes and 1 MiB. So the hair simulation is not reading NaN from its own textures; it
receives it through the arguments the game writes. We will rerun the hunt with
--d3d12-watch-limit 128to see whetherthe same alpha-clip passes hold up in more frames.
@RubAway on GitHub · 2026-11-28 17:02 UTC · original
The rerun you asked for, and a correction to our own previous comment. The new labels on
46589e62settle it.With
--d3d12-watch-target 853x480:34 --d3d12-watch-rendered --d3d12-watch-limit 128, the readback after the frame'sfirst clear:
Every texel at -10000, no zeros, no NaN. The very next draw:
Second sampled frame:
at least 65504 in size (72713, 72713)after the same blit. So on our machine too: the blit iswhat puts the saturated values back, 72 713 to 149 347 texels of 409440, with max and min at the infinities.
One more angle, from
--watch-address texture:853x480:34now that it follows every texture of the shape: in this stretchthere is exactly one such texture (
texture 853x480 format 34 made at ..., watched as range 0, 28 pages mapped), and itsconsole side never receives anything: at presents 300, 600, 900, 1200 and 1500 the range reports 229376 zero blocks,
0 other blocks, and no DirectStorage write or GPU copy is logged into it at all. So the saturated content the blit reads
is not console memory fed from disk; it is whatever the blit's source view resolves to on the desktop side, which is
where you said you would look next.
Correction to what we wrote an hour ago. At limit 128 we get 76 to 87 snapshots per frame, and the per-pass deltas are
noisy, because the readback lands in the list that owns the pass and the game records several lists in parallel. With
that in mind,
PS_AlphaVelocityDepthResolve_ab6941f7is not a reducer: it adds +19 474 / +21 747 / +26 044 in threeframes and removes 4 388 in another. And the
PS_DeferredTextured_AlphaClip_*jumps we blamed are them rewriting partsof a target that the blit had already saturated: after the blit it is at 72 713-149 347 before any deferred pass runs.
What still holds from that comment is the VelocityFill part - its own delta is 0 to -4 835 on our traces - and the
hair result: 37 hair programs clean on every input the scan can read, the non-finite values living in the memory bound
through their indirect records.
Answering your question about the 15 minute run: 2595 presents, median of the last 60 frames 569.2 ms, and the clamp
pass stays at 3.4 to 6.3 ms/frame from the first window to the last, so nothing accumulates over a long run; one hitch
of 6612 ms, no faults, one queue stall. And on
46589e62with no flag at all our log now readsindirect-argument clamp: enhanced barriers on the scratch, which is how we will run it from now on.@RubAway on GitHub · 2026-11-28 18:14 UTC · original
We measured
--warm-load-cachedproperly: two boots without it and one with it, all three starting from an almost emptydriver shader cache. Our adapter's shader cache folder had 82 files / 2566 MiB; we moved 65 of them (2564 MiB) into a
backup folder next to it, and the 17 files the driver service still held open stayed (1.8 MiB), so every boot below
started from the same near-empty cache. Same build, same flags, 8 minutes each, no diagnostic flags at all, same scripted
input.
--warm-load-cachedSo: +4.4% presents, -15% median frame, -22% on the last 60 frames, with nothing taken away from the picture (no white
or black frames,
0Close failures,0faults, no device removed in all three, one queue stall in each). The twono-flag boots differ by about 1%, so run-to-run spread does not explain it. The control we care about most: the second
no-flag boot ran after the warm one, when our disk caches had already been warmed by it, and it was still about 15%
slower.
Two things we did not expect, maybe worth a line in the docs. First, after each of these three boots the driver cache
held only about 35 MiB in 23-24 files, so the win is not about filling the cache with a lot of machine code. Second, the
boot with the flag ended with four more pipelines in the pipeline cache (3328 -> 3332 entries) and 4 of them counted as
built by the driver, while the no-flag boots ended with 1 and 0: the warm-up makes the loader build a few pipelines the
game never asked for. We do not see a startup cost for that - the first logged frame was 423.3 ms without the flag and
450.9 ms with it.
On a driver cache that is already warm (our usual state) the flag changes nothing we can measure, which matches the
correction you pushed today about the driver cache being shared and keyed on content:
2510 loaded (cache hits), 0 storedwith and without it. Our guess is that the gain is largest exactly in the case you described on the status page - the
first boot after a translator change, when a few hundred pipelines change hash and the driver has to build them while the
game is already waiting. Do you want us to run that case deliberately, on the next translator change, with and without
the flag?
@ThatRecompDev on GitHub · 2026-11-28 18:31 UTC · original
thanks, that's a much cleaner measurement than ours, especially the repeated no-flag boot after the warm one.
yes please, run the translator-change case with and without the flag. there's a translator change coming soon that touches a lot of pixel shaders, so that would be a good real-world test. I'll mention it here when it lands.
the small cache size matches what we saw, the driver keeps very little after a boot. I'll add a line to the docs that the gain shows on a cold driver cache and is close to zero on a warm one.
and good catch on the four extra pipelines. the warm-up builds from the whole used set, so a few the game didn't ask for in that run get built too. harmless, but I'll note it.
@RubAway on GitHub · 2026-11-28 18:42 UTC · original · edited 2026-11-28 18:45 UTC
On the translator-change test: yes, we will run it. Our watcher follows
main, so as soon as a change that rehashes manypixel shaders lands we build once and boot twice - with
--warm-load-cachedand without - on a cleared driver shadercache, and post the numbers here the same way. We also have the reference case from the change you already shipped: on
that build the first boot re-translated and stored 208 pipelines, the second boot of the same build stored 0, so the
effect should be visible in both the counters and the frame time.
While we were at it we checked our old blue-wedge report at a higher output size, and found something that seems worth
asking about. Output
2560x1440, same flags as our normal runs: 1654 presents in 8 minutes, median frame 869.8 ms, GPUlocal memory 16.18 GiB, no faults, no
command list Close failed, no device removed, no black or white frames - theworld, the characters and the post chain are all drawn. But every internal console texture in that log is still
853x480(allocation info: 1 console textures (first 853x480x1, ...), 342 such lines, formats 10, 24, 26, 28, 34, 41,42, 49, 54, 57, 61, 62), and there is no larger intermediate target anywhere in the log. So the 1440p present is a three
times upscale of an 853x480 image, and that is what the frame looks like: on a shot through a window the depth of field
falls apart into blocky steps, and inside the blurred area we can see hard rectangular boundaries between reprojection
tiles.
Two questions:
where the game asks for a bigger internal target that we currently clamp?
149 347 saturated texels into a target that the clear had just left clean. Do you want the pass-by-pass numbers from
that scene, or is the source view resolution enough for now?
@ThatRecompDev on GitHub · 2026-11-28 19:31 UTC · original
thanks, the translator-change run will be a good test. that pixel shader change isn't on main yet, I'll post here when it lands.
on 853x480 at 2560x1440: that's not what
--outputshould give you. the patch writes the size into the game's live settings and the game then renders at 2/3 of it, so at 2560x1440 I'd expect 1706x960 targets, and at 1280x720 you get exactly 853x480. so either the patch didn't take, or something brings the game back down to the 720p size.could you check two things in that log? first, whether the
output-sizepatch lines say they were applied (it checks the exe hash and every byte, and logs if it skips). second, whether any 1706x960 texture shows up at all early in the boot, before the world loads. if they do and then disappear, it's the game picking a lower size on its own, maybe its dynamic resolution reacting to 800+ ms frames, and that's something I'd want to look at.on the tile boundaries: the source view resolution is enough for now. there's a second thing going on that might be part of it. we found today that about 85% of the game's cross-queue memory waits got released early at every present, so some passes read memory before its writer ran. forcing proper ordering cleared the exploding hair and the red wash here. that fix isn't on main yet, and we're checking whether the velocity blit changes with it. if it does, your pass-by-pass numbers on the new build would be the best check.
@ThatRecompDev on GitHub · 2026-11-28 20:48 UTC · original
thanks for the 15 minute run. 569 ms median with the clamp steady at 3.4-6.3 ms from first window to last is exactly what I hoped to see, and nice to know nothing piles up over a long run.
I chased where the blit's source resolves, and it turns out the blit isn't the culprit at all. I'm sorry, my last two comments sent you down that path.
in our traces VS_Blit + PS_BlitColour is draw 17155 and the clear is draw 17156, on the same list. so the blit runs before the clear, not after it. the "after first clear" readback just lands later in the log, which makes it look the other way round.
the blit also reads no texture. its only bound table entry is a 6-record constant buffer (float4s like 0,0,0,0 and 1,1,1,1), so it fills a colour. in one of our runs it left exactly 61440 texels at 0.0, which is 1280x48, a letterbox band. the readback after it is mostly whatever the previous frame left, plus that band.
I added a small trace option (on a branch, not main yet) that logs every watched writer's bound views and which registered texture each one names. across two boots, every texture view any writer of that target bound was the current texture at its address. none was an older one kept at a reused address, so that lead is ruled out.
what really fills the target are the G-buffer passes after the clear. from all -10000, the deferred indirect draws take it from a few thousand texels at ±65504/±Inf to tens of thousands within one frame, and past 200 thousand in a Move around frame: PS_DeferredTextured_c5fd36bb and its AlphaClip variant, PS_TexturedDeferred_62941270, _942fcba4 and a few more. the order caveat you found still applies, since readbacks land per list, but the rise happens after the clear either way.
we also tried a test build that makes every queue wait for the others' submitted work before it runs. there are fewer saturated texels, but still tens of thousands, and the orange tiles stay, just smaller. so it looks like a separate problem from the queue ordering.
my read now: the G-buffer shaders write velocity from the current and previous positions, and somewhere the previous-frame data they read (instance or skinning transforms) is zero or garbage, so the divide blows up. your hair result points the same way, with clean textures and the non-finite values only in memory bound through indirect records. that's where we'll look next. we haven't confirmed it yet.
@ThatRecompDev on GitHub · 2026-11-29 00:30 UTC · original
got to the bottom of the velocity infinities, and it was two things stacked on top of each other.
the first part is already on main. with your watch flags (1280x720 here since we output 1080p), our older boots had 240k-345k texels at or above 65504 before the frame's writers, and current main has 72k-84k at the Move around prompt, with the orange tiles already gone from our capture. I think most of that drop is the memory-wait fix (readers running on per-draw data another queue hadn't finished writing), but I didn't isolate it.
what was left came from just three pipelines: PS_TexturedDeferred_62941270 with MS_VS_TransformLit (about 67k on its own), PS_DeferredTextured_4dbafe93/1d195d65 with MS_VS_Transform_4dbafe93 (about 8k) and PS_TexturedDeferred_062b2704 with MS_VS_TransformD (about 5.5k). the ped and hair writers were clean.
that part was a translator bug. we sent a vertex or mesh program's
exp paramNto the N-th non-system register of its output signature, but the FSSM header has a parameter table at 0x1DC that says which register each param writes. if a register is packed into another param's f16 halves, or a clip distance is also exported as param0, every later param shifts by one.MS_VS_TransformLit does the second one. its param13 (xy, w = 0) landed in TEXCOORD14, which the pixel shader reads as the previous-frame clip position and divides by. the real previous position (param14) wasn't written anywhere, hence the ±Inf.
it stayed hidden until the pixel side started reading the register its interpolant table names. before that both sides were wrong the same way, so most pairs happened to line up. 5,149 of the 8,754 vertex and mesh programs that have a table don't follow the N-th rule, so this touches more than velocity. MS_VS_TransformD c5fd36bb for example was giving its pixel shader the previous position as TEXCOORD3 and a zero previous position.
the fix is on a branch, not on main yet. with the same watch flags it's 0 texels at or above 65504 in all three watched frames, the largest velocity around 90 px, and no tiles at the Move around screen. it changes translation output, so the first boot after it lands re-translates a few thousand programs (the warm-up took 14 minutes here).
might be worth another look at your 1440p window shot once it's in, since some of those hard tile edges inside the blur could have come from the same wrong inputs. not sure yet though.
@RubAway on GitHub · 2026-11-29 06:16 UTC · original
a correction to our own numbers in the 1440p comment above.
we wrote that every internal console texture in that log is 853x480. that was a counting mistake on our side: 342 is how many times the log mentions 853x480, not the size of the main targets. the same log mentions 1706x960 634 times, and 334 of those are
allocation info: 1 console textures (first 1706x960x1, 1 mips, format 10, layout 0x0): 0xd20000 byteslines sitting next totexture at ...: 1706x960x1, 1 mips, format 10, layout 0x0, 0xd20000 bytes, GPU-written. 426x240 appears 49 times.so with
--output 2560x1440the game's internal view is 1706x960, two thirds of the window, and 853x480 and 426x240 are its half and quarter, the sizes a downsample chain would use. our 720p boots really do have an 853x480 internal view (two thirds of 1280x720), which is why the--watch-address texture:853x480:34work made sense there; it is the 1440p conclusion that was wrong.what changes because of it: the frame is not an upscale of an 853x480 source, so the blur and the hard tile edges in that window shot are not explained by a small internal target. the post chain and the depth of field run at 1706x960, and the ±Inf velocity texels you found are the more likely cause of those edges.
@RubAway on GitHub · 2026-11-29 06:53 UTC · original
numbers for the first boots after the translator change. the param-table fix is on main now, so these are all on it: RTX 5090, 64 GB,
--output 1280x720, our usual set (no skipped pipelines, no keep-awake, raytracing + rt-traversal + mesh-launch + depth-twins + mirror-table-records reach, 32 prebuild jobs, frame log), and we dropped--capture-on-changefrom our copied line since it is gone.first boot with the driver shader cache cleared: 775 pipelines built by the driver, about 1300 presents in the first 84 s, then minutes of waiting on compiles (pipelines
built after 300 s), and the loader died at 326 s inside its own thread snapshot:Windows shows it as exception 0xc0000005, faulting module "unknown"; we kept the crash dump. In the log there were three
fivestar thread snapshotthreads running at 100 % of rounds inside ntdll. This was with--profile-threadson; with only--sample-threadsthe same boot runs to its timeout, so we left the profiler off for the rest of the morning.later boots on the warmed cache: 1793 presents in 8 minutes with 162 slow compiles, then boots with 0 compiles.
the part we want to correct ourselves before it misleads anyone: the 32-34 ms frames are the story intro, which is a Bink video (
bink2scarlett.dll, and the heavy passes in those short boots arePS_BlitColourandPS_BinkNoAlpha). in the world the frame is 702-752 ms at this output.a 20-minute boot on the warm cache: 1329 presents, pipeline cache 1437 hits and 2 new, so compiles are no longer the cost. queue 1 busy 685 ms/frame. heaviest:
loader:indirect-clamp +rest70.14 ms,PS_DeferredPedTexturedNC69.78 ms,PS_DeferredTexturedStdNC_48fb7423_Wrapped.trim266.57 ms,MS_VS_CascadeShadows_draw +rest35.95 ms,indirect_diffuse_lighting~CS_ScreenProbes_Evalu…. driver shader tables at the end: table 1 1438976 entries = 351.3 of 512 MiB, table 0 657664 = 160.6 MiB, against 480 MiB on table 1 after our usual 8-minute boots.memory, since the guard bit looks alarming at first: streaming at those frame rates trips
--min-free-memoryabout 40 s in (free physical memory 7.8 GB is below 8.0 GB (commit 95.8 GB), the process itself only 16.1 GB private, the gpu's system-memory segment 11.0 GB, local budget down to about 27 GiB). a longer boot with the same flags instead sits at 29-31 GB free the whole time with the process private plateauing at 26 GB, so it is a peak in the first minute, not a leak, and--no-texture-convert-oncedoes not change it. with--memory-censusthe game map is one 24576 MiB pages reservation (StorageWrite 149242, GpuRead 135994, Remap 210781, and 21805 DirectStorage requests in the first 30 s) plus a 6236 MiB pool whose 99776 counted blocks all sit idle; by use: Idle 8716 MiB, ReadsUnknown 7148 MiB over 78516 texture blocks, GpuOnly 2268, CpuToGpu 2211, CpuReads 78.the picture in the airport shot we sent before: the orange tiles are gone and the in-focus area is clearly larger than in our older build, but the foreground and the left half are still under the blur, and the right side now has vertical light streaks. we are running our previous build through the same 20-minute protocol now, so the 702 ms has a control instead of a comparison against a different evening.
@RubAway on GitHub · 2026-11-29 08:16 UTC · original
one condition we see on both of our builds and want to check, because it quietly changes what our screenshots mean:
the same three names fail the same way on the build from before the translator change (there the waits were 5 s, 116 s and 697 s, so the wait length is not a new thing either). nothing else in our runs is skipped: the loader reports no stand-in fills and no other failed pipelines.
what this means for us, and why we are reporting it rather than shrugging: indirect diffuse lighting from the screen probes never runs in our runs, and neither does the water temporal resolve. every shot we have been sending has been missing that lighting, not by choice, and some of our frame time is "free" for the same reason, since those dispatches never reach the queue. the two probe names are the ones we would expect to matter for the way interiors and shaded ground look in our frames.
two questions:
0x8007000ehere the driver saying it ran out of memory while compiling these — all three are_Wrapped, so presumably the largest of the set — and if so, is a retry at a lower tier or a smaller wave64 pinning worth trying, or is the loader right to give up?for scale, these are 20-minute boots on an RTX 5090 with 64 GB,
--output 1280x720, nothing skipped by our own flags, pipeline cache warm from earlier runs, and the driver shader tables ending at 399 of 512 MiB.@RubAway on GitHub · 2026-11-29 08:45 UTC · original
a second crash, not the thread-snapshot one, from the same new build. it ended one boot about 80 s in, in the middle of the intro:
Windows reports it as 0xc0000005, faulting module "unknown", fault offset
0x00007ffd0182380e, bucketStackHash_03aa; we kept the 50 MB dump.the shape looks worth a look because of the pipeline failures above.
RectangleListSlots.SetPipelineStateends withand
MeshLaunch.Hasonly checkspipeline == 0before it reads the vtable slot forGetPrivateData.desktophere is whateverstandIns.Desktop(desktop, out pending)returned: if the real pipeline was never created, the pointer handed back is not null, but it does not have to be a COM object with that slot either. In the run that crashed the log already carried onefailed after …: 0x8007000e; its draws and dispatches stay skipped, and the last lines before the process died were BVH refusals (skipped so far: geometry unreadable or in an unsupported format 472; by cause: index outside the vertex count 471).we cannot aim this at a scene: it happened in one boot out of four on the new build, and
RectangleListSlots.csandMeshLaunch.csare byte-identical between that build and the older one we have run for 20 minutes twice without this crash, so it is a state rather than a new code path. if the stand-in table is allowed to hand out a placeholder for a pipeline that failed,Hasprobably should ask that table instead of the object. rerunning the identical boot now to see whether it repeats, and we will say so here either way.@RubAway on GitHub · 2026-11-29 09:39 UTC · original
a question about the frame we keep sending, because we cannot tell whether we are looking at a broken pass or at a pass that never runs: in the world (not the intro) the frame is built out of rectangular zones with different sharpness and different exposure. The borders between the zones are stair-stepped, the zones are the same size everywhere in the frame, and their size scales with the output resolution: at 1280x720 the in-focus block covers about a third of the width, at 1920x1080 about two fifths, and the small rectangles that appear along the edges of that block scale too. Everything outside the in-focus block is one smooth blur, so this is not the depth-of-field falloff we would expect from a scene: the sharp region is a rectangle, not a plane at a focus distance.
what we ruled out on our side:
--no-texture-convert-oncechanges nothing about the borders, and the same frame shape appears on two builds 55 commits apart;PS_DeferredTexturedStdNC_48fb7423_Wrapped.trim2,PS_DeferredPedTexturedNC,MS_VS_CascadeShadows_draw,indirect_diffuse_lighting~CS_ScreenProbes_EvaluateRayRequests_RayBinning, so the frame really is a 3D scene;three questions:
--d3d12-watch-targetgives us the passes writing a target of a given shape), but we do not know which shape and format to ask for; the only 853x480 UAVs our log names are formats 41, 56 and 62.indirect_diffuse_lighting~CS_ScreenProbes_ActivateProbesand...ActivateRaysnever run in our runs at all?numbers for context, same build, same flags, three 15-minute boots: median frame 534-782 ms at
--output 1280x720, queue 1 busy 440-750 ms/frame, and going to--output 1920x1080costs only about 10 percent (723 ms against 657 ms median) for 2.25 times the pixels, which is why we do not think the frame is limited by shading cost.@RubAway on GitHub · 2026-11-29 12:44 UTC · original
three measurements from
37394813(and one from73d3e9a4), all of them about the loader's own code, no screenshots and no timings that depend on our machine settings.1. the ray-tracing geometry decoder refuses most of the geometry, and the records look inconsistent to us
a 900 second boot at
--output 1280x720with nothing skipped ends witha second boot of the same build gave 72804 skipped, 72799 of them
index outside the vertex count. The refusal isthe
vertex >= geometry.VertexCounttest in the triangle decoder: one corner the vertex count cannot reach dropsthe whole structure, so these are not partial builds, they are no shadow or ray-tracing geometry at all.
we dumped the raw record of the first refusals. one of them reads as 1585 vertices of stride 8 (12680 vertex bytes),
6624 indices, and the first twelve index values as our format reads them are
that is 30 times past the declared vertex count, and several of the values sit in pairs with a zero word between
them, which is what a 16 bit read of a 32 bit index buffer looks like. so we suspect we are reading the record
wrongly rather than meeting bad data: is the vertex count field at
VertexCountOffsetthe corner count for theserecords, or a byte size, or does the index buffer need a base offset because the title shares one vertex buffer
between several geometries?
for completeness, the thing we tried and reverted: a mode where an unreachable corner skips only its own triangle
and the rest of the surface still builds. it did recover 862 structures and 755971 triangles, and the boot then
never reached the world - the driver shader table stopped at 69 of 512 MiB and the deferred lighting passes never
appeared, while the same boot without the mode reached the world at 345 of 512 MiB. so we are not proposing it,
we are reporting the counts.
2. rectangle list draws whose pipeline has a mesh stage are drawn as half a rectangle, and they are the cascade shadows
the summary line on
37394813readsrectangle lists: 348160 draws expanded, 10544 drawn as triangles, 19 skipped while their variant built(another boot: 331776 expanded, 10157 as triangles). the WARN names only the pipelineaddress, so we added a counter keyed by program name; the busiest entries are all shadow passes:
that follows from the recipe path refusing any pipeline with an
NggorGeometrystage, which is reasonable - sucha pipeline cannot take the geometry shader that adds the fourth corner. question: what is the intended path for a
rectangle-list draw under a mesh pipeline? today the draw goes through as a triangle list, which covers half of each
rectangle, and the borders of those half-rectangles are visible in the shadow maps.
as a control we booted with those passes skipped (
--skip-pipelines CascadeShadows): the frame rate went from660 ms to 516 ms a frame, and the frame artifact we are chasing stayed exactly where it was, so this is a real defect
but not the cause of the frame shape we asked about above. the picture without cascade shadows is unusable anyway -
it blows out to a near white frame, so we are not going to keep such a skip.
3. without
--mesh-launchthe title never reaches the worlda 900 second boot of
73d3e9a4with every other flag identical, only--mesh-launchleft out: 1347 presents, thedriver shader table at 31 of 512 MiB, no
rectangle lists:summary line in the log at all, and the screen still onthe loading art at present 1300. the same boot with the flag reaches the world (345 of 512 MiB in the table). so the
flag is not optional in our runs, which matters because it is also where our one crash today was: an access
violation inside the mesh-launch pipeline check, reached from the rectangle list
SetPipelineStateslot, where thecheck only tests the pipeline handle for zero before reading its vtable.
@ThatRecompDev on GitHub · 2026-11-29 14:56 UTC · original
thanks for both corrections, the 1706x960 one and the Bink one. 32 ms in the intro against 702-752 ms in the world is a far more useful pair than what we had, and the 20-minute boot with 1437 cache hits and 2 new puts the cost on the GPU rather than on compiles.
on your two questions.
--host-pipelinesand a compile it expects won't fit in your RAM, and both print their own line before the "failed after" one.the probe ones are big. ActivateProbes is 3.9 MB of DXIL in the form your build makes, and on our 4090 it takes 3.5 to 6 minutes and about 3 GB in the driver. ActivateRays takes a minute or so here. I tried a pinned wave64 form overnight and it was worse (5.6 MB, 16 GB peak, 8 to 10 minutes), so the form main has is already the lean one, there's no smaller one to fall back to.
the water resolve is only about 0.5 MB and builds here in under 15 s, so its failure isn't about size. that points at memory being short at the moment the driver asked for it, and your commit at 95.8 GB on a 64 GB box fits that. so no, giving up for good was wrong. the loader now queues an out-of-memory build again 2 minutes later, twice at most, and logs each try. if it still fails after that, the commit limit (RAM plus pagefile) around that time is the number I'd want to see.
ScreenProbes_EvaluateRayRequests_RayBinningwith--skip-pipelines, so we're not a clean reference for that lighting either.the thread snapshot crash: the profiler read the stack bounds straight out of the other thread's TEB. a thread that exits after we open its handle keeps its TEB address but loses the TEB, and reading it faulted. that fits
--profile-threadscrashing and--sample-threadsalone not, since the profiler walks every thread including pool threads that retire. it reads those two fields through ReadProcessMemory now, which just fails for a thread that's gone.the three snapshot threads at 100 % were our own snapshot workers stuck in a suspend that never came back. the profiler then snapshotted those stuck workers too, got stuck on them, and left a new one behind each time. it skips its own workers now.
the MeshLaunch.Has crash: you were right that Has shouldn't ask the object, and it doesn't anymore. it looks up our own record of which pipelines were built with the launch stage. I checked the stand-in path though, and for a pipeline that failed or is still building it hands back 0 with pending set, so Has never gets one of those. a fault inside Slot means the pointer it got was already freed or was never a pipeline, and I couldn't find how our side hands it one in your 80 s case.
so that fix stops the fault in Has, but if the pointer really was dead, the driver's SetPipelineState is the next thing to touch it. if it comes back with a different top frame, the dump would help a lot.
related, and maybe the bigger one: our own boots have been dying 80 to 90 s into the intro too since texture convert-once became the default this morning. in ours it's always a write from game code into its own heap, and every faulting address sits inside the memory convert-once guards. that feature makes texture pages read-only and relies on a small fault stub to let the first write through, and an arming racing a disarm of the same page could leave a page read-only without its guard bit, so the stub passed the fault on and the game died. that's fixed on the same branch: arming and disarming are serialized, and the stub now lets any write in the guarded range through and reports it. your Has crash was a read inside our code, so I can't say it's the same thing, but if you see game-code write crashes around that time,
--no-texture-convert-onceshould make them go away until this lands.on the rectangle zones from your 09:39 comment, the honest answer to 1 and 2 is that I don't know yet. we haven't pinned down which pass does the depth of field or the final sharp/blur composite in this game, so I can't give you a name from the heavy list or a target shape and format to watch, and I'd rather not guess one and send you after the wrong target.
on 3, I don't think the three missing pipelines make that shape. the screen-probe passes feed indirect diffuse light, so without them the picture should come out darker or flatter in shade, not split into sharp and blurred rectangles. the water resolve only touches water.
what you describe, the same shape two builds 55 commits apart and scaling with the output, sounds like a screen-space pass reading something we fill wrong, more than a pass that never runs. it doesn't look like the bug we're chasing right now either (on our side geometry from the current frame goes missing in some frames since
7740c5be, Lucia's torso or a building through a window), but if you ever see whole objects drop out instead, that one is being traced.and the three measurements from 12:44, thanks, those are the kind we can act on.
the BVH refusals I haven't dug into yet, so I can't tell you whether the count field means corners or bytes for those records. one thing though: read as 32-bit, your first values come out as 0x80000012, 2208, 1932, then garbage, so it isn't a clean case of 32-bit indices read as 16-bit either. I'd guess at a layout we read wrong rather than bad data too, and it's noted. good call not proposing the skip-one-triangle mode, that table stopping at 69 MiB is a useful data point by itself.
the rectangle lists under a mesh pipeline: there's no intended path for those yet. the recipe refuses Ngg and Geometry pipelines because a geometry shader can't sit behind a mesh stage, and the fallback draws them as triangle lists, which is exactly the half-rectangle you see in the cascade shadows. my guess is the mesh program will have to emit the fourth corner itself, but nothing is written for that yet. thanks for the control with CascadeShadows skipped, that keeps it off the list of suspects for the frame shape.
related to missing geometry in the world: we found today that the indirect clamp's work budget runs out at about 1,000 mesh draw records a frame in the move-around scene, so objects drop out. that's being worked on, it isn't on main yet.
--mesh-launchnot being optional for you surprises me. our usual prologue line doesn't have it and reaches the world, so it's probably some combination with your other flags (raytracing, rt-traversal, depth twins). if you can, try leaving out one of those along with mesh-launch, so we know which one it pairs with. either way the Has crash you hit with it on is the one fixed on the branch.all of this is on a branch for now, not on main yet.
@RubAway on GitHub · 2026-11-29 15:28 UTC · original
Re-ran the same options on
a26164d8(current main), 1280x720, 15-minute boot, no changes to our side but the loader build. Three of the things we posted here are gone, and one new thing shows up.1. The BVH refusals are gone. Our last two runs on
37394813ended with 75 861 and 72 799 records skipped asindex outside the vertex count. On current main:[bvh] batched build: 4 of 4 structures written, no skip tally at all, and the rehydrations report0x00000000. The 1 585-vertex descriptor whose indices reach 46 965 — we no longer have a case of it on this build.2. The two compute pipelines that never built, build.
...sr_denoising~CS_TemporalResolve2_Water...and...indirect_diffuse_lighting~CS_ScreenProbes_ActivateProbes...used to return0x8007000eafter 5 s and after 110-122 s, and their draws and dispatches stayed skipped for the whole boot. This run:journal prebuild: 1303 built, 11074 cached already, 0 refusedandpipeline cache: 470 loaded, 1548 stored, 0 refused.3. The missing patches are gone. Our earlier frames had patches of the world missing, a different set each frame, which we measured as 10 544 and 10 157 rectangle draws skipped for lack of a mesh variant. The story scene now draws whole: the house, the car, the character, the palm line, the sunset all in place, sharp over the whole frame. Frame time went to
median 375.2 msover 57 logged frames (mean present interval 657 ms, 18 of 57 frames inside the 34 ms budget) where the same options gave 620-685 ms steady for us before.What we still see, and one crash to report.
--snapshot-self-check 16ends the run about two minutes in:ERROR FAULT #1 on thread 28216: 0xc0000005 access violation, read from 0x1f6f0400148. The same options without the self-check run the full 15 minutes on the same build, so it looks like the check reads something it should not. Before the crash it had found:[self-check] present 1430: records past the programs' reach stale at the draw 42 in 1 pipelines (sgd2_1036053c_t32_FTexTGEAlpha_a43f54bc_Wrapped + sgd2_102abfa3_t32_VTexTGDith...), same line at present 1431 at draw 44.@ThatRecompDev on GitHub · 2026-11-29 16:08 UTC · original
thanks for rerunning everything on
a26164d8and for the numbers, 620-685 ms down to a 375 ms median is a nice thing to read.quick update on what I said was on a branch: it's all on main now as of
fec2cdd0. that's the write-guard fix for the startup crashes, the thread-snapshot and MeshLaunch.Has fixes, and the out-of-memory retry. we ran three boots of it to the move-around screen with no crash, where before about one in four died.the other big one from today is in
7a608278: the objects flickering in and out were our indirect clamp emptying about 1,000 draw records a frame. the world frame should be a lot steadier with it. could you look at the rectangles/zones question from this morning again on that build? it may look different now, and I'd rather not chase it on old frames.the
--snapshot-self-check 16crash is ours. the check compared the descriptor records in title memory with our mirror by reading title memory directly, and a page that isn't mapped at that moment faults. the fix is on a branch: every read of title memory from the check (and the other diagnostics that read records) goes through ReadProcessMemory now, and an unreadable record is skipped or shown as unreadable instead of ending the run. I'll say here when it's on main.the stale-past-reach findings it logged before the crash (FTexTGEAlpha + VTexTGDith, draws 42 and 44) are worth keeping, thanks for including them.
on the posterized palette I don't want to guess. our 1920x1080 captures from the prologue (the yard through the window) don't show it: down a column of sky the values step by one with some noise, no flat bands. but that's a different scene and output size from yours.
can you tell me the full flag line and
--outputfor that run, and crop a region where it shows, say a bit of sky with a band edge, at native size, no rescale? if it's in the intro cards too, one card crop would be great, since that rules lighting in or out quickly.@RubAway on GitHub · 2026-11-29 16:23 UTC · original
Two things from the same set of boots on
a26164d8— one crash that repeats exactly, and a correction to what we showed you earlier.1. Three boots, one and the same access violation, inside the title's BVH builder.
We have it three times. The instruction offset differs once (
+0x26,RVA 0x16446), the three-frame chain is the same each time (0x1606e->0x15746->0x16485/0x16446). The faulting reads were0x1f6f0400148,0x25cab1613d8and0x20a91d70000; the last one is exactly one page past an allocation the loader's own report shows (allocation 0x20a91d60000 (+0x10000)), the dump next to it reads as texture data rather than a pointer table.The three runs that died had one extra debug option on:
--snapshot-self-check 16in one,--d3d12-trace-draws --dump-frame <present>in the other two. A run with--d3d12-trace-draws --dump-frame worldand a plain run both went the full 15 minutes, so we cannot blame the option, only say it has been present every time it happened. All three died between present 1100 and present 1400 of the same script, no device loss, no GPU fault in the log.2. What we posted as a "posterized palette" is the intro movie, not the rendered world.
Every frame we showed you from this build — the sunset street, the figure by the car — is
intro_mgfx_sequence_16b.bk2. The census for presents 1000-1100 still listssgd2_1035ac5b_t32_PS_BinkNoAlpha_e9aa19fd_Wrapped + sgd2_102a8c9e_t32_VS_Bink_e9aa19fd_Wrapped -> 0x267b7478120 3840x2160 format 29, and the same frame content appears at presents 900, 1100 and 1300. At our speed the boot reaches 1361 presents in 15 minutes, so a 20-minute boot is still inside the intro. The flat bands and speckle we described belong to the movie path; we have no evidence about lighting or the tonemap from these frames, and we should not have phrased it as a frame-wide picture problem.3. What
--dump-framegave us, in case the target list is useful to you.--dump-frame 1100 --dump-frame-min-width 80 --dump-frame-max 160wrote 15 PNGs, in one batch. They are: 6 targets of 2048x2048 named after..._t3c_decoration_blend_CS_DecorationCopy_c8599a44_Wrapped(formats 27 and 28), 2 of 256x256 depth and stencil named after..._t32_texturecompression_CS_CompressBC3Mip0_fe9b3daf_Wrapped, and 7 of 1280x720 named afterpostfx_splines_CS_BakeLUT_2DBezier_3Segment_LinearShap...,exe_..._VS_Clear_f05fef9c + PS_Clear(colour, depth, stencil),sgd2_1036bd28_t32_FVertexCxformEAlpha_dc4780adandsgd2_10358291_t32_default_ps_tex_c32788bc. No target at 853x480, which is the size the frame is rendered at for a 1280x720 output, and the 3840x2160 movie target the census lists in the same window is not among them — so the dump missed the largest target of the frame as well as every pass we would have wanted to look at.@RubAway on GitHub · 2026-11-29 16:28 UTC · original
Follow-up on the
xboxbvhbuilder.dllfault: it repeats unchanged on0bc88674, and the guarded-read work did not cover it.Same instruction offset as the earlier run we posted (
0x25cab1613d8); the two addresses differ only by the base of the allocation, the offset inside it is+0x13d8both times, which reads like a fixed walk off the end of one buffer rather than a random pointer. Options were the same as the run that died for us before:--snapshot-self-check 16 --d3d12-trace-draws, 1280x720, no other debug switches.What
b20739b0did fix: the self-check itself no longer dies reading title memory. This run reported findings at presents 1191 and 1192 (records past the programs' reach stale at the draw 30, inpostfx_splines~CS_BakeLUT_2DBezier_3Segment_LinearShaperand the 2-segment partner) without faulting; the only fault in the log is the one above. The last capture the run wrote is present 1100, so it died shortly after present 1192 — we still never get to the rendered world inside a 15-minute boot at our speed.@RubAway on GitHub · 2026-11-29 17:18 UTC · original
We think we have the reason for the
xboxbvhbuilder.dllfault we posted, and a change that stops it.What we found. The fault only happens when the shipped DLL rehydrates a serialized BLAS whose source bytes were never produced by our CPU builder. The game asks for rehydrations of descs that no build of ours wrote (the same descs show up after a batch reported as
0 of N structures written), and it hands the DLL whatever its allocation happened to hold there. The DLL's CPU walk then runs off the mapped range: the faulting address we kept seeing is exactly one page past an allocation (allocation 0x20a91d60000 (+0x10000)), and the instruction is always the same one (RVA 0x16485,+0x65into the function starting at0x16420). On the console the read lands in the next page of video memory and returns something harmless; over our mapping it faults.What we run. Two small guards, both in the loader's BVH shim:
TriangleGeometry.TryTranslategets a variant that takes a copier, and the rehydrator answers it withAppendCopy(cpu, size, 0x1000); a range larger than 64 MiB keeps its own address rather than failing the desc.Measured. Same command line, same machine, four-minute boot at 1280x720 with
--raytracing --rt-traversal --mesh-launch --depth-twins --mirror-table-records reach --prebuild-jobs 8:0bc88674, nothing changed by us:ERROR FAULT #1 … xboxbvhbuilder.dll RVA 0x16485, the run ends after 110 s at about present 1150. We have it 7 times out of 7 on this build and ona26164d8.[bvh] rehydration skipped: source was never built hereonce — one such source was enough to kill the boot.46589e62, which carries these guards) never showed the fault today: 0 faults, 2539 presents in 15 minutes. Checked out clean at the same46589e62, without the guards, it faults the same way. So this is not a regression across the last weeks of the tree; it is a missing guard that every build without it hits.If you want the change as a patch we can format it against the current
src/FiveStar.Loader/Shims/Bvh/files; we applied it by hand there because the BVH files moved under us. The second guard is probably the one you would rather keep — it is what makes the DLL's own over-read harmless — and--d3d12-watch-target/--dump-frameruns are the easiest way to see the fault on purpose.@RubAway on GitHub · 2026-11-30 06:31 UTC · original
Twelve linked pipelines never build, and their draws are cut in every frame
On the current main, a stable set of twelve pipelines fails at the link step and stays a stand-in for the whole
session, so every draw that uses one is skipped forever, not just during the load:
The summary counts of a five minute run in a settled world:
The twelve fall into six families, all of them shading characters or vehicles:
PS_VehicleLiveryOffOnlyDeferredand..._NoDeform, linked toMS_VS_TransformD,MS_VS_TransformSkinD_NoDeform,MSR_VS_TransformSkinD_NoDeformPS_TexturedDeferredandPS_TexturedDeferredNoDeformationwith the same mesh producersPS_PedAlphaPrepasswithMSNC_VS_PedTransformSkinAlphaPS_PedTextured_Eight_DecalswithMSNC_VS_PedTransformSkin_DecalsTwo more programs fail on their own, without a link, and they carry a lot of work:
MSNC_VS_MirrorReflectionPedTransformSkinDecalsD(two variants). In a sample taken in the street scene that oneprogram was responsible for 1369 skipped draws, and the vehicle livery pair for 614.
What I checked, in case it narrows it down:
MSNC_VS_PedTransformSkinAlphagivesstatus: ok, stage: ms, wave32 variant ok. It is the linked pair that isrejected.
sm6.8-w32-32-Tier1-ms32form;the pixel shader side of the same pair is never reported as failing on its own.
with
--wait-pipelinesnaming them the boot still ends with the same twelve..failmarkers in the program cache are not the cause. I removed all 102 of them, some of which were writtenfive days ago by an older translator, and the boot rebuilt the same twelve and wrote the markers again.
link dxc-fail: error: validation errors. If the link path could keep the validator's own lines, that would be abig help; the standalone failures at least reach the same text, so the validator is not saying anything here.
Happy to test any build that logs the validator output for the link step, or to try a variant that skips the
32 lane mesh form for these pairs.
@RubAway on GitHub · 2026-11-30 06:31 UTC · original
Numbers from our machine on
0be31e0d, all passes on (shadows, sun, ray tracing), same input script and the same300-second run each time. The settled median is the median of the last 60 logged frames, in the loaded scene.
--indirect-gatheris the largest single win we have found: 660 ms without it, 468 ms with it, at 1280x720. With--gpu-timingson,queue #1 busydrops from 648 to 456 ms a frame, and the lineloader:indirect-clamp +rest 76.9 msleaves the ten most expensive passes altogether. The picture does not change. Could this become thedefault, and is there a case where the gather is unsafe?
--ring-pinning(and--mirror-whole-heap) the settled median in the same scene is 241-272 ms at1280x720, 259-316 ms at 1920x1080 over two twenty-minute runs, 350 ms at 2560x1440. So output resolution is nearly
free on this hardware; the frame is not fill-bound. The hitches are uploads: one run logged
texture upload ms a frame: <1 565, <4 79, <16 105, <64 131, <256 76, >=256 252, worst 17 283 ms for 228 MiB, and5808x5808 atlases are still being filled during gameplay.
-PrebuildJobs 16instead of 8 changed nothing(346 against 354 ms, same histogram).
--capture-presents 700..707, camera still) I10 passes:most hot blocks 0, worst block 9.9in a run of presents 700-707. The gate still says=> FAILon four hard rows:I4 guard hits without a bit 36 / refused 807,I5 D3D12.X slots 1274(all of themID3D12Device.X::Slot81, arguments like 0x74/0x11100, 0x84/0x11100),I6 cpu timestamps 5100.--texture-convert-oncedoes not change the I4 rows (29/845 against 36/807) and costs nothing. Are non-zero I4 andI6 normal on a consumer machine, or should we be able to drive them to zero? Also
draws under a sample mask not honouredis 71 102 over a twenty-minute run - is that the next fidelity item after the slots?--memory-censusat 300 s, rendered withfivestar memory census: the shape is the same at 1920x1080 and2560x1440 - 357 492 against 371 356 blocks with counts,
ReadsUnknown15 070 against 15 525 MiB, of which"its pages were never armed (pages, cached, no GPU access declared)" 9 215 against 9 557 MiB, and the home
DesktopTexture8 090 against 8 205 MiB. Most of it sits in one 24 GiB page-backed allocation (157 231 blocks,152 918 of them reads-unknown). On our 64 GiB machine one 2560x1440 run was ended by your own guard at 43.6 s
(8.0 GiB free, 91.9 GiB committed, exit 5). Is that expected, and is there a knob besides
--min-free-memory?@RubAway on GitHub · 2026-11-30 06:31 UTC · original
Three loader crashes tonight, taken from the Windows application journal rather than from our own reading of the
dumps. Build
0be31e0d, .NET 10.0.15,coreclr.dll10.0.1526.53008, exception0xc0000005in all three cases; thegame kept drawing until the loader process died, and there was no
device removedin any of them.Two of them, in pipeline library loading:
Both runs had been running for a while (31 and 468 presents) and the last things in the log were large texture
fills, so we could not tell them apart from slow loading until we looked at the journal.
One, 165 seconds into a 1920x1080 run with
--indirect-gather --mirror-whole-heap --ring-pinning, in therectangle list slots:
Fault offset
0x35916fincoreclr.dll. The run had reached present 274 with the scene drawing. Repeating the samecommand line for twenty minutes finished cleanly (3323 presents, settled median 259 ms), so this one we have not been
able to aim at: it happened once in about ten long runs. We would rather not report it as a reproduction than
describe it as one - if you want, we can keep the same configuration running in long sessions and report the journal
lines each time it happens.
@RubAway on GitHub · 2026-11-30 06:31 UTC · original
Two measurements on our machine that may be worth acting on, both without skipping any pass - shadows, sun and ray
tracing stay on.
--indirect-gatheris the largest single win we have found. On the same tree, same input script, same 300-secondrun at 1280x720: median game frame 660 ms without it, 468 ms with it. With
--gpu-timingson,queue #1 busydropsfrom 647 to 456 ms a frame and the line
loader:indirect-clamp +rest 76.9 msleaves the ten most expensive passesaltogether. The frame content does not change: the same shot with the same characters, fence, smoke and lens flare.
Question: is there a case where the gather is unsafe, and could it become the default (it is opt-in now)?
Output resolution is almost free on this hardware. With the window at 1920x1080 the title renders its scene into
1280x720 targets and the median frame was 664 ms; at 2560x1440 it renders into full 2560x1440 targets and the median
was 831 ms. After your newest merges the 1080p and 720p runs cost the same (273 and 272 ms). What is not free is
texture upload: one run logged
texture upload ms a frame: <1 665, <4 135, <16 185, <64 125, <256 76, >=256 248,worst 10 995 ms for 253 MiB, and seven 5808x5808 atlases still being filled several minutes into gameplay.
Your own stub report names two device slots the title calls that we do not implement:
ID3D12DeviceSlot71(5,896 to 12,448 calls a run) and Slot81 (1,326 calls, arguments of the form 0x74/0x11100, 0x84/0x11100, ...).
About the mirroring options. Before your last two merges, our runs showed translucent copies of the whole scene
layered in one frame, and
--mirror-whole-heapremoved them;--mirror-table-records fullinstead turned somepresents black. After
2af69203(ring widened to 524,288 descriptors) and22b10e66(hold a ring descriptor while anolder recording is unsubmitted) those ghost layers are gone without any extra mirroring, which looks like the ring
work closing the same hole from the other side.
--ring-pinningstill helps our frame time, and--mirror-whole-heapstill removes a small mosaic region on the right of the frame in some shots.
Where we are now: a twenty-minute run at 1920x1080 with
--indirect-gather --mirror-whole-heap --ring-pinningfinished as asked - 3323 presents, settled median of the loaded scene 259 ms, no device removal, and your own gate reports I10 (picture stability over eight consecutive captures) as a pass.presents, median game frame 324 ms, 410 of 1864 frames inside the 30 fps budget, no device removal and no crashes.
The Russian HUD prompts ("L - move", "R - look around") draw correctly, and the cutscene characters draw again since
DispatchMeshwas bound.@RubAway on GitHub · 2026-11-30 06:31 UTC · original
Small thing about the start flow after the lane-cleanup merge (
c005f511).Two runs of our usual set stopped on the title screen and never reached the world. The capture at the point where they
usually stand in a scene shows the title with the prompt "ВЫБОР УЧЁТНОЙ ЗАПИСИ Y PLAYER A". Our scripted input only
ever pressed A, which is what the old first-run notes suggested, and it got into the world on the previous tip.
Adding a single Y about 25 seconds into the boot fixes it: the run walks into the world and the picture there looks
good - a street scene with a pink flamingo sculpture, the VICE CITY OF LEONIDA emblem, murals with people, statues, a
dog, correct depth of field, no visible artifacts. Frame cost over 20 minutes on this tree: 3998 presents, median game
frame 429 ms, p90 468 ms, no device removed, no faults.
Is the account-selection screen intended to need Y now, or is that an input regression at the title? If it is intended,
it is worth saying so in the input docs, because a script that only presses A now sits at the title until its budget
runs out, which reads like a load hang rather than a menu we never dismissed.
@RubAway on GitHub · 2026-11-30 06:41 UTC · original
The same twelve pairs, with the compiler's own words
Follow-up to my previous comment. The loader keeps only the first line of the compile output, which is why my earlier
report could only quote
error: validation errors. I kept the rest in a local build (one line inLinkedProducers.Run, not pushed) and reproduced the whole thing without the game, with the two commands thetranslation page describes:
Eleven
ms+pspairs, all setup-fail, and the validator says what is wrong:That is eight of the eleven, across every producer family:
MS_VS_TransformD,MS_VS_TransformSkinD,MS_VS_TransformSkinD_NoDeform,MSR_VS_TransformSkinD_NoDeform,MSNC_VS_PedTransformSkinAlpha.Two more die inside dxc rather than at validation:
Both of those are
MS_VS_TransformD_7095f810_Wrapped, one withPS_TexturedDeferred_7095f810_Wrappedand one withPS_VehicleLiveryOffOnlyDeferred_7095f810_Wrapped.And one of the pixel shaders does not compile at all on its own, before any link:
I also checked whether the unlinked pair is an escape hatch, with
--unlinkedon the same eleven pairs and thisadapter (RTX 5090): all eleven are refused by the runtime with
0x80070057,E_INVALIDARG, which matches the commentin
ProducerLinksthat the unlinked pair does not work either. So today these draws have no path at all and staystand-ins for the whole session.
Reading the comment above
ProducerLinks, the trimmed pixel shader is there because "its full layout passes the32 KB a mesh program has for the outputs of its 128 vertices". For these eleven the trimmed layout still lands over
32768, and the note "a mesh program with more than two params exports no f16 halves" looks like the reason nothing
gets packed down. If it helps I can attach the twenty program files and the linked HLSL of one pair (165 to 600 KB
each), or test a branch that packs those outputs, trims further, or runs these particular pairs through the mesh
fallback compute form.
@RubAway on GitHub · 2026-11-30 08:56 UTC · original
BVH coverage: most declined builds are meshlet geometry whose vertex bytes are not in host memory
With
--raytracing --rt-traversalthe batched build reportsX of N structures written, and the ratio sits at19-20% whatever the length of the run: 1063 batches wrote 2543 of 13496 structures, a run four times as long made
13882 batches write 36116 of 181854. So this is not a streaming warm-up we can outwait.
I counted the decline reasons and dumped the geometry descs that decline. Almost all of them are one pair of formats:
2048 descs
vertex format 6, index format 53, stride 12and 1024 descsvertex format 16, index format 53, stride 8,against 3072 declines in a two-minute boot.
The bytes at the desc's index address are a meshlet buffer exactly as the model tooling describes one:
u32 0x80000000 | meshlet count,u32 triangle count,u32 remap length. Six samples: meshlet counts 1-3, trianglecounts 32-310 (always
IndexCount / 3), remap lengths 54-269 (the desc'sVertexCount). So the format is not whatstops us:
Meshlets.Triangles,VertexChannelTableandPackedPositionsalready decode this shape, and the loaderproject already references those types.
What stops us is the vertex side. For three of the six dumps the declared vertex range reads as all zeros; for the
other three there are bytes but no 23-word stream table at the start (the words are far too large for offsets), and
successive vertices differ only in their lowest byte (
05 60 CF DB,05 60 CF BF,05 60 CF 1C, ...), which iswhat a mid-block pointer looks like rather than the start of a vertex buffer. The same three differ in nothing else
about the desc: type 0, flags 1, transform pointer 0, counts and addresses self-consistent.
Two questions, then:
reads succeed (the ranges are mapped) but the contents are zeros or a slice of another block, which suggests the
meshlet pages only hold their real bytes on the video-memory side.
kind supposed to end up as a rehydration of the archived structure instead? Rehydration works for us - 300 calls,
3858 descs, every one returning
S_OK- while these builds only ever decline, so the structures behind them stayabsent and the ray-traced passes that walk them (screen probes, indirect diffuse lighting) never arrive: with
--wait-pipelines indirect_diffuse_lighting,ScreenProbesboth are reported as2 past the limit, each waitingthe full 60 seconds.
For what it is worth, the numbers say this is where the missing bounce light is: with those passes absent an interior
lit only through a window renders its walls as almost pure black, while the sun-lit rim and the window itself are
fine.
@ThatRecompDev on GitHub · 2026-11-30 11:36 UTC · original
Thanks for all of this, and sorry for the silence, I was heads down on the unstable picture. Going through your comments in order.
The twelve pairs that never link: fixed on main in
5c12e8ec, and your validator output is what cracked it, so thank you for keeping the full text. Those pixel shaders read a lot of attributes packed two 16-bit values to a channel, and on the desktop each one became two float4 inputs, which pushed the linked mesh shader past the 32 KB of output a 128-vertex group gets. When a pixel shader is over the limit the halves now travel as one raw uint input and the pixel shader interpolates them itself with SV_Barycentrics. Anything under the limit translates exactly as before.In my boot that went from "875 pairs needed a linked producer, 17 failed" to 0 failed. PS_PedTextured_Eight_Decals compiles on its own now too (it was over the 32 input registers). The loader also keeps the whole compiler report for a failed link instead of the first line.
One caveat: the mirror reflection program (MSNC_VS_MirrorReflectionPedTransformSkinDecalsD) has a fix but only a unit test behind it, because it never shows up in the scene I boot. If it still fails for you in the street, I'd like to see the report.
The crashes. The two in DesktopPipelineLibrary.Load are fixed in
9b9dda87. Two build threads could load the same cached pipeline at the same moment while the game is loading, and a library doesn't allow two loads of one name to overlap. I found the same stack three times in my own event log, so it wasn't just you. Loads of one name now wait for each other, different pipelines still load side by side.The RectangleListSlots.SetPipelineState one I couldn't pin down from the code. The coreclr offset is only where .NET ends the process after an access violation, so the real fault is in that method or in the driver call under it. If it happens again, a dump would settle it (DOTNET_DbgEnableMiniDump=1 and DOTNET_DbgMiniDumpType=2), or just the FAULT block from the loader log. There was also a read of a command list the game had already freed, fixed in
eedd19fb, which could show up as a random access violation in our code.The Y at the title: I don't think it's a regression. A fresh save folder with only A presses went straight through here on current main (subtitles, legal, terms, story load, no account screen), and the cleanup didn't touch any input code. So the account screen seems to depend on the profile state. docs/input.md now says what the screen is and that PadY passes it.
--indirect-gather: I run it in every boot and haven't seen it change the picture. It only takes an ExecuteIndirect whose records nothing earlier in the list segment can have written, and it stops at the first thing that could. The relaxed variant is the unsafe one, it drew lights as squares in some boots, so that stays off. Also new since your numbers: G-buffer, textured-deferred and cascade-shadow mesh draws now run on the game's own indirect records by default (--direct-indirect), so less goes through the clamp at all. I want a few more gated runs before I flip gather to default, but that's where it's heading.
Slot 71 is bound now (buffer UAVs the game makes at an address), and slot 81 turned out to be the frame statistics query. The game asks about the frame it presented four frames earlier and only files the answer in its own frame timing records, so it's answered from our present timeline since
0ae45ed1.On the gate: the I5 row should read 0 for you on current main. The I4 number was my sweep over-counting pages that were mapped read-only from the start, that's narrowed. I6 is the CPU timestamps and is still real, the GPU version sits on a branch. So
--allow I4,I6is the honest setting for now. The gate also got a one-frame check, and it immediately caught something on main: a bright horizontal sliver across a character for a single frame, every so often. If you see that, it's known and being worked on.Your resolution result matches what I see, the frame isn't fill-bound, and most of what the GPU queue calls busy isn't shading. One thing to try on the 5090:
--bar-graphics-memoryworks since59f018cc(it's still off by default). It puts the game's 2.2 GiB graphics heap in video memory instead of system memory, and here the main queue's busy time dropped from about 165 to about 95 ms a frame at the same point of the prologue. I'd love to know what it does on your card, and whether the device survives.The texture upload hitches are real, I see the same histogram (one frame near six seconds in my last log). Nothing done there yet.
And the BVH question, which is a good one. No, for those descs the vertex bytes are not expected to be there at record time. The skinned geometry gets its vertices from the bvh_skinning compute programs on the GPU, and the console's builder records its own dispatches onto the same list, so it builds from vertices that only exist once the list runs. Our
--raytracingpath builds on the CPU while the list is being recorded, so it reads zeros or whatever the last frame left there. I'd guess your stride 12 and stride 8 streams are exactly those skinned outputs, and the "mid-block" look fits an offset into a shared output pool, but I haven't checked that against your dumps. It's also worth looking in your log whether the bvh_skinning~CSComputeSkinning* work is reported as skipped, in my ray-tracing-off boots it is held as a stand-in, and then nothing ever writes those bytes.So the intended route isn't copying pages back, it's running the builder's own GPU programs after the skinning dispatch. docs/bvh-builder.md has the plan (all 52 builder programs translate and compile offline, nothing runs them yet). Rehydration keeps covering the static world. I have ray tracing parked until the picture is stable without it, but your counts (20% however long the run) are the clearest statement of the gap so far.
@RubAway on GitHub · 2026-11-30 14:59 UTC · original
We moved our tree onto your current main and re-measured. Three things, one of them a confirmation, one a follow-up on the BVH thread, and one that looks like a separate bug worth its own issue.
The link fix works on our machine. The line that used to read "825 pairs needed a linked producer, 0 linked, 12 failed, 12 pairs kept as stand-ins after a failed link" now reads:
So the raw-uint-with-SV_Barycentrics route covers our twelve pairs too. The material passes that were stand-ins before now really run: the frame gained about 450 executing programs and the frame got heavier accordingly, which is the expected direction.
BVH: the meshlet buffer decodes, and coverage is not 20% any more. Your note that these descriptors point at skinned outputs fits what we see:
bvh_skinning~CSComputeSkinning*do run in our ray-tracing boots (they show up in the GPU timing pass list at 0.08-0.53 ms each), the CPU builder only reads those bytes at record time, and rehydration then has nothing to read.The bigger part of the gap was our own counting rule. Index format 53 is a meshlet buffer: the vertices are not index-count/3, the buffer holds a header, 16 bytes per meshlet, one u32 per triangle and one u16 per vertex, and the descriptor's vertex count is the vertex count of the position stream, while the remap table behind it is usually longer (555 entries against 547 declared, 1500 against 1492, 517 against 468, 5556 against 5523). Accepting
remap entries >= declaredand decoding the meshlet triangles throughMeshlets.Triangles, plus reading the packed position stream from its header at 0x20 bytes before the stream, changedinto
and that holds on your current main. The refusals that remain report their reason and are mostly the skinned streams you described.
One number we cannot explain yet: every structure address our builder writes has bits 32..39 set (20993 of 20993, lowest
0x27b1097e300, highest0x27b66b4f100), that is above 1 TiB, while the traversal side reads the base as descriptor dword 0 plus dword 1 bits 7:0 holding address bits 47..40, and in all 716 instructions of the 64 tracing programs dword 1 is0x80000000, which asks for a base below 1 TiB. We tried to read a real T# from a traced dispatch and never got one: the tracedsr_tracing~CS_RaytraceVBuffer_*dispatch holds twelve table records and all of them are V#, no T# at all. So we cannot tell whether the game's tracing programs get the address we wrote.Separate bug: two compute programs never become real, and part of the light chain stays empty. What we can measure is the pass dump of one frame, not the mood of the scene, because the camera lands in a different place from boot to boot. In that frame albedo, normals, cascade shadows, the ambient map and the scene color after
TAA2_Resolve(0.672 mean, 221231 of 921600 pixels above black) are all alive,scattering_transmittance_system~CS_SkyRadianceCacheis alive (9.875/7872/70.79) andtiled_lighting~CS_CacheScreenSpaceRadianceis alive (0/62.5/0.775), while the irradiance cache writes exact zero:those programs are not skipped, they run and write zeros, so the probe request bins are empty before the trace starts. The screen probe chain does run in the same frame (
CS_ScreenProbes_GenerateShaderBins31-48 ms,CS_ScreenProbes_EvaluateRayRequests_RayBinningup to 67 ms) except for two programs, each 3 MiB of DXIL:With the pipeline host they die like this:
peak 0 GB against a 24 GB limit is what looks wrong to us: the estimate for these programs is 10 GB, so the host seems to end the build from the estimate rather than from what the child used, and the program is then a stand-in for the rest of the boot. Without the host the same compile is still running 285 s later ("… ActivateRays (3 MB of DXIL) 285 s"), so within one boot it never arrives either. Every affected dispatch is then logged as
and the frame ends with 85068 stand-in pipelines with only 34 of them used. What also surprised us: a boot that runs for seven minutes leaves "pipeline cache: 2990 loaded (cache hits), 0 stored (built by the driver)", so whatever the driver did build during the boot is not carried to the next one, and an offline warm-up run reports "warm-up done in 10 min 12 s: 0 built (0.0 min of driver time), 1175 loaded from the cache, 5384 skipped" with these two in warm-failures.
Questions, in the order we would try them: should a build the host killed for memory fall back to an in-process compile instead of staying a stand-in for the whole boot? And is there a way to make a pipeline the driver built during a boot land in the cache, so the next boot loads it instead of compiling again?
--bar-graphics-memoryon our card. You asked what it does on a 5090, and whether the device survives. Two boots of seven minutes at 1920x1080 through the same scripted walk, same flags, one with the option and one without:So about +20% frames and a third off the queue busy time, on top of the same picture: no pass is skipped for it, the stability rows only show the ones you named as expected in the honest mode (
read-only without a bit16,cpu timestamps9916), and nothing is lost visually in the captures we compared. The device was not lost at any point; the boot ended by our own time limit. We did lose a device once while we were trying this, but that run was cut short by us and we do not count it as a result of the option.One more thing about warm-up: it deletes segments a game boot loads happily. An offline
--warm-pipelines … --warm-used-onlyrun removed 302 segments ("… .psolib deleted (not a segment of this build)") from a cache that the game boots of the same loader build had opened as "4684 pipelines in 302 segment(s)" and read 2982 pipelines from as cache hits. After the warm-up pass the cache held 5 files, and the next boot had to build 3183 pipelines itself. The warm-up itself is good: with the shader archive argument it built the light-chain programs in 30 s ("warm-up done in 30 s: 31 built"), which is far from the 285 s the same program sits "in flight" during a boot, so the warm path clearly has more room for these compiles than the live path does.@ThatRecompDev on GitHub · 2026-11-30 15:34 UTC · original
Thanks, this is a useful batch again.
Good to hear the link fix holds on your side, and thanks for the 5090 numbers on
--bar-graphics-memory. A third off the queue time with the device surviving is in line with what I see here. One thing to know if you keep it on: with that heap in video memory a one-frame smear across the picture became much more frequent for me (a mesh draw reading its indirect records before the culling pass had finished writing them). That is fixed on main inf55c3fb1, so pull that before judging the picture with the option. Once a few more captured runs are clean I intend to turn the heap on by default.The two screen-probe programs that never become real: you read that right, "peak 0 GB of 24 GB" should not end in KilledMemory, and a build that was given up should not stay a stand-in for the whole boot. I'm looking at why the host ends it and why the live path needs minutes for something the warm-up builds in seconds. Same for "0 stored": pipelines the driver builds during a boot should land in the cache.
The warm-up deleting 302 segments that boots of the same build load is a plain bug, and a nasty one since it costs you the whole cache. Until it is fixed I'd keep a copy of the cache folder before running a warm-up pass. I'll say here when it is in.
On the BVH side, nice work getting to 85%. I can't answer the address question yet. The structure addresses being above 1 TiB is expected, title memory sits up there in our mapping, but I haven't traced how the tracing programs form their base from the record, so I don't know whether they see what your builder wrote. I'd rather look than guess, and ray tracing is still behind the picture and speed work in my queue.
@RubAway on GitHub · 2026-11-30 16:07 UTC · original
We chased the empty light-probe chain with your
--probe-pipeline, and it says the data, not the mapping, is missing.We probed the three programs that build the shading arguments:
indirect_light_probes~CS_IrradianceCache_GenerateShadowTraceArgs_17b68bb5_Wrapped,…_GenerateShadeArgs_dd7b4baa_Wrappedand…_GenerateShadeSignalArgs_5d7d2ce6_Wrapped. 512 groups each (509 for the last).Nothing is mis-mapped. At all 32 load sites of every one of the three programs: range 0, unmapped 0, null record 0. The head pointer arrives as a real address and through the descriptor window cleanly — the first site of
GenerateShadowTraceArgsloads0x1c243da0in all 512 groups, with window record indices in the 0xc4b6a range. The site texts are structured-pointer loads,SPtrLoadAt(_t3, 0u|4u|8u|12u, …)andSPtrLoadAt(_t7, …), plus onebuf_fits(_t9, fmt_limit(_t10, _t8)), so the programs walk a list of probe records through 32-bit pointers.The list itself is empty. In
GenerateShadeArgsthe entry loads read0x0for 495 of 512 groups (the few others are values like0x5652065b,0xc0a88375, which do not look like addresses either); inGenerateShadeSignalArgs, 494 of 509 read0x0. InGenerateShadowTraceArgsthe entry loads give small values instead of addresses:0x0x108,0x7x50,0x1x50,0x4x48 and 71 more. After that the programs are already non-finite: 512 of 512 waves carry a NaN or infinite value, the earliest one from site 0, and each value they take from then on is derived from that.What that produces downstream, measured in the pass dump of one frame: the primary probe shading output is exact zero bytes,
5308416and4194304bytes with 0 non-zero bytes in them, andCS_IrradianceCache_GenerateShaderBinsandCS_IrradianceCache_RadianceCopyare exactly zero too. We then checked a pass dump we took some time ago from a much older build, and the primary shading buffers are zero there as well, byte for byte, same sizes. So this is not something recent on our side, and none of these programs was a stand-in: the log does not name them once as skipped.Our reading is that these programs are fine and are being handed an empty placement list: something on the CPU side (or a resource we do not see being asked for) should put probe records there first. Our DirectStorage and BCPack counters look clean in the same run — 224747 requests run, 0 failed, 7915 exact pages, 0 approximate, 0 placeholder — so the data that is asked for does arrive.
Two questions, then: what normally fills these probe lists, a placement job of the game on the CPU or a streamed light-probe resource? And if it is a placement job, is there anything about our title-memory mapping or its page state that would make the game's own writes into these lists not happen — a range that the game treats as not present, for instance?
@ThatRecompDev on GitHub · 2026-11-30 16:34 UTC · original
That's a clean piece of probing, thanks. Short answer: I don't know yet what fills those lists, I haven't traced the irradiance cache's producer side.
My first suspect would be your other finding rather than the memory mapping. The two programs that never become real are the "Activate" steps of the screen-probe chain (ActivateProbes and ActivateRays), and their dispatches are skipped for the whole boot. If probe requests for the irradiance cache come out of that chain, nothing ever asks for a probe, and three programs downstream walking an empty list is exactly what you'd see. That would also fit it being byte-for-byte the same in your old dump, since those two were stand-ins back then too. It's a guess from the names and the order of the passes, not something I've verified.
So I'd hold the mapping question until those two build. The fixes for the host giving up on them, for built pipelines not being stored, and for the warm-up deleting segments are written and being verified now, and I'll post here when they are on main. If the lists are still empty with ActivateProbes and ActivateRays really running, then it's worth looking at what the game's CPU side writes there, and your question about a range it treats as not present becomes the right one.
On the mapping itself, for what it's worth: a load from a page without a view reads zero and a store to it is dropped. You reported "unmapped 0" at every load site, which is the same check from the reading side, so I agree with you that the readers are fine.
@RubAway on GitHub · 2026-11-30 16:49 UTC · original
Two measurements that may be useful, both with your own tools.
The ray-traced distance shadow programs read our built structures cleanly. With
--probe-pipeline rtdirectionalshadows…we instrumentedCS_RTDistantShadowTrace32_Tiled_d6296256_Wrapped,…_TemporalUpsample4X32_Tiled_d6296256_Wrappedand…_LeakPlug32_Tiled_d6296256_Wrapped. 3819, 249 and 28 waves respectively, and for all three: "no NaN or infinite value at any float site", and at every load siterange 0, unmapped 0, null record 0. So in these programs the node reads go through the descriptor window without a single failure. We cannot yet say they hit triangles, but nothing in their addressing looks wrong, which is the part of the address question we could test.For contrast, in the same scene
CS_RTShadowTrace*(the 25 programs) andCS_TraceShadowRays_*(the 7) are never named in a boot at all: not in a skip line, not in timings. We skip nothing ourselves, so it looks like the game does not put those up in this section rather than us holding them.One more case of the heavy-compile problem: when we probe the irradiance cache programs instead, the probe variants of
CS_IrradianceCache_GatherVBuffer_WithFarandCS_IrradianceCache_ShadowTrace_WithFarare still in flight at exit ("(0 MB of DXIL) 3 s"), so a seven minute boot never gets their records.Where the frame goes on our card.
--frame-timelineover 30 frames starting at present 2000, 1280x720 rendered, 1920x1080 out,--bar-graphics-memoryon. Queue #1 carried 10778 ms in an 11.25 s window, 359 ms per frame; the other four queues together another 5.4 s. Grouped by pass name:Waiting is not what costs here: on queue #1 the "(memory wait)" spans add up to 1 ms over the whole window, 300 "wait: after the writer's segment" marks and 90 cross-queue waits. The CPU side is small too,
ExecuteCommandLists653 ms over the window, about 21.8 ms per frame. The single heaviest programs we saw werebvh_skinning~CSComputeSkinningPedBlendShapesSecMotionVelocityat 13.4 ms per run (90 runs, up to 45.4 ms) andCSComputeSkinningDefaultVelocityat 2 ms per run over 518 runs, up to 50 ms.With the whole boot measured this way,
--bar-graphics-memorygives 2535 presents in seven minutes, 163.6 ms mean interval, "queue #1 busy" median 271 ms.@ThatRecompDev on GitHub · 2026-11-30 17:01 UTC · original
The three pipeline fixes are on main (
de1149fe).The "KilledMemory, peak 0 GB" turned out to be a wrong label. The driver itself refused the compile with out-of-memory while the host process was using under 1 GB, and we filed that as a memory kill. The retries sent it back to the host, got the same answer, and after that it was a stand-in for good. Now a refusal far below the limit is its own outcome and the loader builds that pipeline itself, and a build that only ran past the host's time limit is also built in-process instead of being given up. I can't hit that refusal on my card, so this one has unit tests only. I'd like to know whether ActivateProbes and ActivateRays become real for you now.
Why the live compile takes minutes where the warm-up needs seconds I haven't proven. The live one runs on the game's device with the driver's background work off, at normal priority next to the loading threads, one heavy build at a time. The warm-up has an idle process and a fresh device. I left that alone until I can measure it.
The warm-up deleting your cache: a segment belongs to a build by a salt made from the cache format and the root signature, and a couple of options change the root signature (
--user-data-constants,--mesh-launch; the first is also dropped silently when programs on demand don't start). So your warm-up ran with a different root signature than your boots and threw away everything made with the other one. Segments of the same format made with other options are now kept, just not used, with a warning that names the options. Only other formats and damaged files are deleted."0 stored": I found nothing that drops results on that path, here boots do store what they build. In your boot everything it used was a cache hit except the two that were wrongly marked failed, and the rebuild afterwards came from the warm-up deletion. Two places could lose a store without a word though (a refused store, and a library that couldn't be made again after a save), and those are logged and counted now, the summary says "N built but not stored".
@RubAway on GitHub · 2026-11-30 17:56 UTC · original
You asked whether ActivateProbes and ActivateRays become real for us now. Yes, but only near the end of a boot, and not for the next boot.
Four boots with your three fixes, same scripted walk:
So they do become real on our card, roughly six to eight minutes into a boot. That already changes what we can measure: our frame dumps at world+300 and world+1100 all landed while Activate was still a stand-in, so we still cannot say whether the irradiance cache's lists fill once those two run.
Two things get in the way:
The next boot starts the driver compile again ("(3 MB of DXIL) started"), four boots, four refusals. So the build the loader did for itself does not seem to reach the pipeline cache. If it did, the boot after a successful retry would be a cache hit, and this would stop being a per-boot problem.
--max-driver-compiles 12does not help either: the refusal still comes about three minutes in.CS_TemporalResolve2_Water_357e0818_Wrappedis refused at 12 s, then at 1 s, then at 1 s: "(2 of 2)" and "its draws and dispatches stay skipped". Two retries are not enough for us, and the second and third refusals come after a second, which does not look like a real compile attempt running out of something.The warm-up cannot cover these two at all.
pipeline-cache/warm-failures.txtholds 6 lines for ActivateProbes, 4 for ActivateRays and 6 for TemporalResolve2_Water, all 0x8007000e, and sinceWarmOutcome.Skippedalso means "an earlier run saw it refused", a warm-up with--warm-match ScreenProbesreports them as skipped without trying. That is also why the warm-up you asked us to keep using builds nothing for this chain: with--mesh-launchmatching our boots it says 125 candidates, 0 built, 125 skipped.What would let us answer your question about the empty lists: the pipeline the loader builds for itself should be stored like a driver-built one, so a boot starts with those two real. Meanwhile, in every frame we can dump the chain is empty at the same three points:
CS_Primary_Shadeoutputs are all zero (5308416 and 4194304 bytes, byte for byte, in the old dump and in today's),GenerateShaderBinsandRadianceCopyread as black, andIrradianceCache_GenerateArgswalks the empty list you know about.@ThatRecompDev on GitHub · 2026-11-30 18:34 UTC · original
Thanks for running it four times, that's exactly the detail I needed.
So the fallback works but arrives too late to be useful, and it forgets everything by the next boot. All three points are on my side:
The pipeline the loader builds for itself after a refusal should be stored like any other. That it isn't is a gap in the retry path, not a decision. Once it is, the second boot should start with ActivateProbes and ActivateRays real, and you can finally dump a frame with the chain running.
A refusal that comes back after one second isn't a compile running out of anything, agreed. I want to know what state the host is in at that point before I change the retry rule, but "2 of 2 and then skipped for the boot" is too strict either way.
And the warm-up treating a recorded refusal as permanent is why it builds nothing for this chain. A line in warm-failures.txt should expire or be retried on request, and the summary should say how many candidates were skipped for that reason.
I'm on these now and will post when they are in. Until then, if you want to try the chain running: deleting the three programs' lines from pipeline-cache/warm-failures.txt should make a warm-up attempt them again, though I haven't tested that by hand.
@RubAway on GitHub · 2026-11-30 18:42 UTC · original
Thanks — and one result that goes with your "a compile the driver refuses is built by the loader" work: we tried the same idea on the other side of the loader, the acceleration-structure builder, and it failed in an instructive way.
The symptom on our side is that some geometry descs are refused because their vertex stream is blank. We kept copies of the refused descs and rebuilt them later in the run, which is the obvious move. It is wrong, and the log shows how wrong:
A copy of a desc stops being a claim on the geometry a few batches later: the game has already reused the array of geometry descs and the destination. So a late build writes bounds of something else into title memory. We removed the retry and left a comment saying why.
What the watcher did establish, before we removed it: the lateness is real but bounded. Re-reading the 128 most recent refused descs every 512 declines, 106 of 128 decoded later 111 s into the run, and in another boot 53 of 128 at 101 s; over a whole boot 156 of 1921. Later in the run it is 0 of 128, and the sampled vertex range is still mostly zero (355-552 non-zero words of 4096), so for those the data never arrives. So this wants waiting inside the call that asked, while the desc and its buffers are still the game's promise — not a rebuild from a copy afterwards.
A smaller thing in the same area, in case it matters to anyone: meshlet geometry descs we do not read correctly. They come out as "meshlet geometry with vertex stride 32776" or 32780, while the vertex stream is clearly not blank (3566-3905 non-zero words of 4096 sampled). One or two per boot, so it is not what keeps the other 13% unbuilt.
Per your hint we removed the 16 lines of the three programs from the refusals journal, so the warm-up will try them again. Will report whether the chain starts real from the next boot.
@ThatRecompDev on GitHub · 2026-11-30 21:36 UTC · original
The follow-ups are on main now (
5f79e287).On "the loader's own build doesn't reach the cache": I couldn't find a path that skips the store. Every pipeline the loader creates goes through the same store call, and there is a test now that builds one through a refusing host and loads it from a second cache on the same folder. What I did find is on the loading side. A key whose segment was still being opened at start got "pending" as its answer and was simply compiled again, and with your cache size that window is real (here 377 cached pipelines came back pending in one warm run). A heavy pipeline now waits for its segment instead. And when the driver refused to load a cached pipeline, that was final for the process and logged once without a name. It is named now, with the HRESULT and the memory numbers ("is cached but was not loaded"), and an out-of-memory one is offered again. So I can't promise your next boot is a hit, but the log will say which of the cases it is.
On the one-second refusals: there is no leftover state in the host, every build gets a new process and a new device. And I read my own log line wrong last time. "(n of 2)" is only printed after the loader's own create was refused as well, so for the water pipeline both processes were refused inside a second, three times, and "built again in 120 s" is the retry delay, not a compile time. What the driver runs out of there I can't see from our side. What changed: no cap any more, the waits double from 2 minutes up to 64, a pipeline whose host was refused far below its limit goes straight to the loader the next time, and the retry line carries private, free and commit memory and the shader table size.
The warm-up: a recorded refusal now only holds for the same loader build, driver and options, for 7 days, and never for out-of-memory.
--warm-retry-failurestries everything again, and the summary counts the candidates it skipped for a recorded refusal on their own.My card refuses nothing, so all of this has unit tests and one boot here that shows nothing else broke. The retry and "cached but was not loaded" lines from your next run would tell me the most.
@RubAway on GitHub · 2026-12-01 05:29 UTC · original
On
7e7f3c1b. We found a case where our own loader change was hiding the console's prebuilt structures, and removing it is worth a boot: the mean present interval went from 239.66 ms to 137.61 ms on the same build, same scene, same 420 s.What we had: the CPU rehydrator refused any source that none of our own builders had written. Measured cost of that rule, straight from the new sample line: 24160 BLAS and 1938 TLAS built, 555550 instances without a built BLAS left out, 0 rehydrated, and 3882 descs skipped as "source was never built here". The game streams serialized structures of its own; the rule threw all of them away. Without the rule: 47799 BLAS and 4025 TLAS built, 3763 rehydrated, 342437 instances without a built BLAS, 3004 presents at 137.61 ms mean.
The part we have not pinned down. Three boots that rehydrated, three faults, all inside xboxbvhbuilder.dll: a read at RVA 0x16485 from base + 0x7a00, a read at 0x15cb6 from base + 0x6a00, and a write at 0x16046 to 0x2812e91804, which is 1.2 MB past the start of the allocation that holds that thread's stack. In all three the frames above the DLL are in the title itself, and in the last one our rehydrator had written nothing yet - so this is most likely the title's own CPU path through the DLL, not our rehydration. We are running the gate back on as a control to be sure. Does the title build some BVHs on the CPU through this DLL directly, and do those RVAs ring a bell?
Two things we could not read from our side:
@RubAway on GitHub · 2026-12-01 07:32 UTC · original
Ray tracing, CPU rehydration: our faults were ours, and the module's own validation declines everything we hand it.
The fault was in our arena, not in the builder. Each serialized BLAS goes through the shipped
xboxbvhbuilder.dllCPU path using a copy of the build desc: the destination, the geometry buffers and the serialized structure itself are copied into one arena of ours, and the module is handed pointers into it. We grew that arena withreallocwhile a desc was in flight — appending a later geometry's vertex buffer moved the block under the source copy the module had been given. Every fault since then sat at one instruction:xboxbvhbuilder.dllRVA0x19c06,test dword [rax], 0x100, and the address it read was exactly theSourcepointer we passed. Reserving one desc's worth of arena before the first copy takes the whole class away.A boot that rehydrates and does not fall over. With the CPU rehydration on, a whole boot (world loaded, story walk, 2497 presents) ran with zero faults and wrote 3725 serialized structures:
The same boot with rehydration held back, for comparison:
So the instances that still have no BLAS to trace against go from 1.30 M to 0.63 M once the structures the game streams are rehydrated rather than skipped. What we have not managed yet is to show that on screen: the two dumps we took at the same world-relative point drifted to different parts of the scene, so they are not a fair pair.
What the descs the title hands
RehydrateRaytracingAccelerationStructureBatched2Xlook like (all 72 of one boot, and the same everywhere we looked):DestandSourceinside the desc name the same structure, while the separate source array of the batched call names a different address — so it is not an in-place rehydration of the structure the desc points at;Scratchis zero in every desc, and the rehydration runs that way; replacing it with our own buffer changes nothing except that it is one more thing that can be wrong;0x81020006in dword0, and(dword1 + 1) * 64is exactly the span the following bytes occupy;The validation export. We now bind
?ValidateRehydrateAccelerationStructureBuildDesc@XboxBvhBuilder@@QEAAJPEBUD3D12_BUILD_RAYTRACING_ACCELERATION_STRUCTURE_DESC@@@Z, which the title calls before rehydrating. It answersE_INVALIDARGfor practically every desc we build: in one boot 4650 descs, none accepted. We kept the call behind a switch and left it off, since skipping everything it rejects also skips every rehydration.Two questions we would like guidance on:
ValidateRehydrateAccelerationStructureBuildDescaccept a desc? Our reading of it is a page query on dest and source and a CRC32 overNumDescsagainst something near the start of the header; dword2 of these headers does look like a checksum, but we never make it match for a structure that arrived through the streaming path.@DariuszTom on GitHub · 2026-12-01 09:38 UTC · original · edited 2026-12-01 09:40 UTC
@RubAway threat this this as hypothesis not fact as I dont have game files to check with only can check this repo code:
On question 1 (reads past the declared span).
I don't think the CPU path walks into a neighbouring structure; it looks like the rehydration is in-place and expanding, and the two-copy arena breaks that.
• Dest == Source in the desc is the point: it is an in-place rehydration. The separate source array of the batched call is the CPU alias of the same streaming range (the caller at 0x142490A20 puts the GPU address of the header in Source and the CPU alias of the same bytes in the extra array), not a different structure.
• (dword1 + 1) * 64 is the span of the serialized form (11-byte packed leaves, level table at the end). The rehydrated result is larger: 64-byte triangle nodes, parent-pointer table, box nodes. That is why the structure sits at offset 0x100 of a resource segment of console (post-build) size. The reads and writes past the header's span land in the rest of that segment.
• Check: compare dword14 (copy size; 144·n² + 64 when it is 0) with (dword1 + 1) * 64 for a few headers. I expect the difference to be exactly how far the DLL reads past the span.
• So, rather than the whole streamed region, hand over the whole physical segment of the resource as one buffer with Dest == Source, or simply run it on the CPU alias in game memory as the title does (the module does not free what it is given, so the arena is not needed). The fault at RVA 0x19c06 (test dword [rax], 0x100, a node flag test through Source) fits a read of a node that in-place would already have been written to Dest, and with two copies is only zeroed slack.
On question 2 (ValidateRehydrateAccelerationStructureBuildDesc).
Three cheaper suspects before the CRC, most likely first:
On the CRC itself (header dword2), two things that make a "CRC32" never match:
• If the DLL uses the x86 crc32 instruction (SSE4.2), it is CRC32C, polynomial 0x82F63B78 (Castagnoli), not IEEE 0xEDB88320. In the disassembly: look for crc32 r32, r/m8|32 (F2 0F 38 F0/F1), or a 256-dword table starting 00000000 F26B8303 E13B70F7 (Castagnoli) rather than 00000000 77073096 EE0E612C (IEEE). Init and final XOR are usually 0xFFFFFFFF on both ends, but not always.
• The input is probably not NumDescs alone but everything address-independent per geometry: Type, Flags, IndexFormat, VertexFormat, IndexCount, VertexCount, VertexBuffer.StrideInBytes, probably the build Flags. Hashing over our translated geometry array loses nothing, since those fields are copied unchanged; but if the validator also hashes DescsLayout or the whole D3D12_RAYTRACING_GEOMETRY_DESC including addresses, zeroing the layout and swapping the addresses breaks the sum.
The cheapest way to be sure is an offline test on one header from a local dump: compute a dozen candidates (IEEE vs Castagnoli, with/without XOR, field ranges) and see which one hits dword2. That fits the planned PR #3 ([DumpFact], the DLL as oracle): instead of guessing the CRC, call Validate on a dumped desc and bisect the fields.
@RubAway on GitHub · 2026-12-01 10:53 UTC · original
@DariuszTom three of those could be checked on a real boot, and one of them settles the validation question.
Alignment was worth ruling out first: everything we hand the module — the desc copy, the source copies, the geometry array, the scratch — came from a plain allocator, which gives 16-byte alignment. All of it is now allocated on 256 bytes, and the validator's answer did not change:
E_INVALIDARG. The low bits are not what it looks at.The differential check decides it. In one boot we ask the validator about the same structure three ways: our translated desc; our desc with the title's element layout field put back, since it is one of the four fields we change; and the title's own desc with its console addresses still in it. All three answer
0x80070057, and the call does not fault — so it is not reading through those addresses, and nothing in our translation is what makes it refuse. The title's own desc gets the same answer, so on PC the export cannot be satisfied, and leaving it off is the right call. What that costs, for the record: a boot with the validator on rehydrates nothing, and the same scenario leaves 786 582 instances without a built BLAS against 220 165 with it off.(dword1 + 1) * 64is exactly the range we already hand over:0x107gives 16 896 bytes and the rehydration is asked over0x4200,0xcbgives 13 056 and0x3300,0x697gives 108 032 and0x1a600. Sodword1is the serialized length and your reading there is right.dword14is not the copy size, though. Over the headers of one boot it is a small negative —0xfffffdc0,0xfffffe40,0xfffff140, that is −576, −448, −3776 — and it grows with the structure, which reads like a signed offset inside the segment rather than144*n² + 64.The cheap offline pass at
dword2came up empty: IEEE and Castagnoli, the field zeroed or dropped, start 0 and0xffffffff, with and without the final xor — none of the eight gives the field. A sum over the whole serialized body is still possible; we log the header words, not the body, so that one stays open.@RubAway on GitHub · 2026-12-01 10:53 UTC · original
Where the frame goes when the streamed pages sit in video memory.
Same build, same flags, same walking scenario, three boots. Two controls: the GPU queue that ends the frame takes 401.4 ms and 401.3 ms. With the streaming pool's pages copied into video memory every second present — 6 GiB of the 7.1 GiB the heaps are open over — the same queue takes 329.1 ms: −18%. Presents in the same window: 2082 and 2425 against 2588; median slow frame 424.2 and 424.5 ms against 378.5. No faults and no device lost, because the copies are capped and stop when less than a gigabyte of the local budget is left.
The cost the copies pay for, measured from a replay of dispatched calls rather than from the game: one dispatch out of a real frame, the hair tile classify, takes 0.014 ms when the buffers it reads sit in video memory and 2.048 ms when they are imported from system memory, over ten runs each. Two others in the same frame — skinning and a cull — do not change: 0.005 ms either way. So it is what a dispatch reads once per frame that pays, not every dispatch that touches a system buffer.
This is a measurement, not a feature: the copies go stale, since nothing refreshes them. The honest version would keep the pool's pages resident in video memory and refresh them when the storage stack brings a page in.
The other half of the frame is not memory: in the control boot the queue is about 220 ms of things under 12 ms each, and the indirect gather records 4 168 555 of them across the run. The batches open early and often — 554 737 of 556 252 batch passes opened because the batch was closed under it, about 2.5 records per batch where the gathered batch would carry fifteen.
@RubAway on GitHub · 2026-12-01 12:26 UTC · original
Pool twins, the honest version
My earlier post about twins was a measurement, not a feature: the video copy was refreshed on a timer, so a frame could read bytes that were already stale. It has become a mechanism: the storage stack says which page it wrote, and at the next present only those byte ranges are copied into the video copy.
What happens now:
CopyBufferRegiontakes;Same build, runs back to back, 420 s, 1920x1080, the same input script, no other differences:
The cost is measurable and small: 21.6 GiB copied over the run, about 50 MiB/s, as 97 086 small copies. Of the 473 170 reported writes, 439 013 fell inside a window that has a video copy; six windows of the pool are twinned, 6 GiB of the 7.1 GiB the pool opens.
One bug is worth naming in public, because it hid the answer for a while. The routine that marks a dirty range takes an offset and a length, and we were passing the end offset as the length. Every range therefore grew to the end of its window: 1.45 TiB of copies in a run instead of 21.6 GiB, which made the honest version look far more expensive than it is.
Two honest caveats:
The 401 ms control from the earlier post belongs to an older build - on this build a control without twins sits near 380 ms, so the comparison above only holds within one build.