Repository navigation
Description
Placed-buffer review
#3776 is under review. Its current page tracker can treat a failed or unsubmitted copy as current, and the same-list range check can accept a disjoint page. The placed-buffer fix still needs controls for retry, reset or unsubmitted lists, disjoint spans and queue visibility. #3763 tracks first rasterization.
Status update · 2 December 2026
The sampled direct dispatches passed this binding stage in a local C++ working tree. Keep this issue as the implementation record until branch coverage and integration are verified. The active scene blocker is now tracked at #3763. See #870 for the measured checkpoint.
Refs #870, #3545, #1914 and #3638. Target main.
Three native Mesh86 PSOs reached their direct DispatchMesh handlers and refused the same first material view, mesh t0, root parameter 0, table byte offset 0xAC0. The view spans 45,613,056 dwords (about 174 MiB). It passes the desktop raw SRV size check. The desktop placed backing does not alias guest memory, and the binder has no verified producer for the range.
- Trace a representative buffer subrange through CPU or GPU production and the consumer queue. Reuse the runtime's placement/backing and fence tracking where it can establish the authoritative copy.
- Add a source-built test with two GPU-selected SRVs that read distinct values. Include a stale or wrong-type descriptor and an out-of-range control. Verify the expected color or data changes and that unrelated memory is never read.
- Measure refresh bytes and VRAM growth. Reuse or refresh the backing with correct ordering instead of copying the full view per draw.
- Report the first remaining refusal or a correlated Mesh86 record/close/submit chain for the matching local inputs.
Performance and code quality
- Keep the large-view path fast on a VRAM-constrained adapter. Reuse the backing, refresh only the ranges that need it, and keep queue waits tied to producer and consumer dependencies. Report GPU copy bytes, peak local VRAM usage against the DXGI budget, CPU submission time and median and 95th-percentile frame time on the same scene and hardware.
- Use the existing placement and fence ownership rules. Keep range validation, refresh and retirement easy to follow, and exercise overlapping writes, cross-queue visibility and backing reuse after retirement in focused source-built tests.
Keep public evidence title-neutral and use source-built fixtures.
Activity
Not-Saii commentedon Nov 30, 2026
I'd like to take this. One question first, @R0Y00. @Kawiu reported on #3639 that their capture creates Mesh86 pipelines only when
X2W_REFUSE_FIXED_MESH=1refuses the slot 57 fixed mesh creations, and that loading goes much further without that switch. Is the Mesh86 path still the priority, or should this wait until slot 57 is settled? I'll start with the trace (step 1), which is useful either way, and hold the backing change for your answer.Plan.
Trace the range on a native-only local run that reaches the refused
t0view (root parameter 0, table byte offset0xAC0). I'll report counts only:list_copied_gpu_rangeand the GPU-written tracking);DispatchMeshcalls.Bind according to what the trace shows, using the existing placement and fence ownership rules:
Source-built tests, as the issue lists:
Each test gets a mutant (skipped refresh, missing fence wait, full-view copy) that it must catch.
Measurements on the same scene and hardware, before and after:
Then the first remaining refusal, or the correlated Mesh86 record/close/submit chain.
Coordination. @Leyukaka, your #3639 work changes the root-SRV bind path in the same material binder. I'll stay in the table-SRV path and rebase onto yours if it lands first. If we'd end up editing the same function, I'll say so here before I do.
I expect this to be two or three PRs: named refusals with the trace counts, then the backing change with its tests, then the measurements.
Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP for the source-built tests.
AI-assisted.
Not-Saii commentedon Dec 1, 2026
Trace results for step 1. Counts only, from local runs. The backing change is still on hold until @R0Y00 answers the priority question above.
Build.
mainatd5970858plus a local diagnostic patch, not pushed. The patch is turned on byX2W_MESH86_TABLE_TRACE=1and changes nothing else:Setup and runs. Two 300 s native-only runs from a local save, both with the patch. The second adds the whole-buffer sampler. Windows 11 build 26300, NVIDIA GeForce RTX 4090, driver 32.0.16.1088, debug layer off, Series S profile.
The pack held 1,249 prepared compute requests, with 1,875 unsupported and 0 errors. Each run logged 27 distinct native Mesh86 PSOs. The creation and selection lines stop at their log caps of 32 and 24.
Which views.
0xAC0view is a raw SRV with first element 0 and 45,613,056 elements: the whole placed buffer of 0xAE00000 bytes (174 MiB). One pipeline has it, in its mesh and pixel stages.0xAC0has 15 such views. Each of the other 14 has 2 (64- and 416-byte minimum reads).Placement and backing.
0x20004, which include UAV access.X2W_D3D12_LINEAR_BUFFERSwas not set. Its copy path would not take this buffer either: it refuses a UAV-capable buffer that cannot be shared.Who writes the range.
Reading.
Single host, one title state. I'll stay in the table-SRV path, as before.
AI-assisted.
d3d12: label the census's ALLOW_UNORDERED_ACCESS counts uav-capable
R0Y00 commentedon Dec 1, 2026
Thanks for tracing the buffer, @Not-Saii. Mesh86 stays P0. Please continue #3640 in parallel with #3639. VIC-NV builds its mesh PSOs through slot 86 and returns
E_NOTIMPLon slot 57. Kawiu’s default-path measurements are useful for slot 57 work, and Mesh86 can move ahead independently.The trace shows changing bytes in application memory. Keep the producer classified as unproven where untranslated compute leaves a gap. For ranges with verified ownership, please use the native C++ placement and fence tracking, reuse the desktop backing, and refresh only the necessary ranges. Measure copy bytes, peak VRAM against budget, and frame times on matched runs.
The first milestone is one real scene
DispatchMeshtraced through binding, recording and queue submission, with a readback showing its contribution to the presented frame (#3641).runtime: refresh large placed Mesh86 material SRVs
[-]P0: supply coherent backing for large placed Mesh86 buffer SRVs[/-][+]supply coherent backing for large placed Mesh86 buffer SRVs[/+]d3d12: wire coherent placed buffer refresh into compute root SRVs (R0…
tests: cover compute root SRV dirty-page refresh in startup_coherent_…
d3d12: refresh unaliased ExecuteIndirect argument and count buffers (R…
Not-Saii commentedon Dec 1, 2026
Thanks, @R0Y00. Before I start a backing change: two open PRs already target this path. #3725 (@lambirou) adopts the placed backing and refreshes changed 4 KiB runs. #3776 (@Holastor) refreshes dirty 64 KiB pages. A third implementation would only add review load, so I won't open one unless you want a different approach.
Two points from my trace above apply to both PRs:
What I can take, without overlapping either PR: matched local runs on an RTX 4090 of
main,main+ #3725 andmain+ #3776, from the same save and input. I'd report:@Leyukaka, the geometry stream SRVs on #3763 are yours. I'll stay on this material buffer. If your trace reaches it, I'll compare notes here first.
AI-assisted.
ci: register new compute refusal reasons in triage_run and drop unuse…
d3d12: deduplicate coherent placed buffer refresh per command list (R…
Holastor commentedon Dec 1, 2026
Thanks @Not-Saii — matched runs on the RTX 4090 comparing
main,#3725, and#3776will be super helpful!Two updates on
#3776based on your notes:f221c455): I just updated#3776to deduplicate(cmd_list, resource, offset, bytes)refreshes within a recording command list (cleared on command-list reset/close). When the 174 MiB buffer is bound across 28+ dispatches in the same list, the 64 KiB page scan andCopyBufferRegionnow run once per list instead of once per draw/dispatch.is_gpu_writtenonly tracks translated/known GPU writes, so ranges touched by the 1,875 untranslated compute dispatches are not yet marked as GPU-written. Happy to add anunproven_gpu_writtenrange taint for refused compute UAVs if needed, or keep it scoped per @R0Y00's guidance.Not-Saii commentedon Dec 1, 2026
Matched local runs of #3725 and #3776, as offered above. @lambirou, @Holastor: these are your PRs, so please check the numbers against your own runs. Counts only. One run per build, so run-to-run variance is not separated. Two of my earlier trace runs on one build ended with 107,511 and 241,277 completed DirectStorage requests, which gives an idea of the spread. The host was not idle: another process used about 21% of the GPU before the first run, and I did not check before the other two.
Builds. The baseline is
mainat158ef794plus a local measurement patch, not pushed. The patch adds two things:X2W_FRAME_TIME_FILE, which writes the time between presents, one line per present.#3725 (
715b84f0) and #3776 (5ac55a68) were each merged onto that baseline locally. Neither PR changes the native shader revision, so all three builds used one compute pack: 1,303 requests prepared, 1,908 unsupported. CPU time per category and per command-list slot comes frommain's existing 5 s report.Runs. The command is the one in my trace comment above, on these builds, with
X2W_FRAME_TIME_FILEadded andX2W_MESH86_TABLE_TRACEleft out. Each run is 300 s, native-only, withX2W_NATIVE_MESH86=1,X2W_REFUSE_FIXED_MESH=1andX2W_D3D12_TRACE_DIRECT_MESH=1. They use the Series S profile, the same local save and the same input: A once a second from 20 s to 100 s. Windows 11 build 26300, NVIDIA GeForce RTX 4090, driver 32.0.16.1088, debug layer off.main0x887A0006) at about 173 s; the title stopped at 176 sDispatchMeshrecorded throughExecuteIndirect(log capped at 24)Dispatch(slot 14) /ExecuteIndirect(slot 61), 5 s windows of 20 ms or more onlyFrame times up to 170 s are capped by present pacing (median 33.3 ms in all three runs), so they say nothing about either PR.
#3725.
mainto 3.5 per second over 200–300 s. That frame-time figure also includes the newly recorded Mesh86 draws, whichmaindoes not record. The queue time is the cleaner measure.#3776.
The placed-buffer refusal is gone, and Mesh86 dispatches are recorded.
It also changes compute: by 173 s, 4,705 compute dispatches were translated and none refused, where
mainrefused all 4,888.Its refreshes run at bind time inside the list slots.
DispatchandExecuteIndirecttogether spent 24.5 s up to 173 s, in the 5 s windows of 20 ms or more.Because the compute work differs this much, this run is not matched to the other two beyond the binding itself:
main;I have not traced the cause of the removal. It is one run.
First remaining refusals with either PR:
t1root SRV (resolve the 128-byte mesh root SRV for slot 86 #3639);t0view at root parameter 1, offset0x40, in title memory outside any placed buffer;t0(root parameter 1, offset0x40) and pixelt4(root parameter 0, offset0x640).AI-assisted.
tests: update x2w_d3d12_compute_census line anchor in standin_exports…
Not-Saii commentedon Dec 1, 2026
@Holastor, a rerun of #3776 at
19ee9193(which includesf221c455). The setup is the same as above, with the same baseline, compute pack, save and input. It is one run, and another process was using about 41% of the GPU when it started.DispatchMeshwas recorded at about 161 s. On this setupmainand runtime: refresh large placed Mesh86 material SRVs #3725 both ran the full 300 s, and both d3d12: coherent page-tracked backing for non-aliased placed buffer SR… #3776 runs ended between 168 and 176 s, shortly after the first Mesh86 dispatch. I have not traced either end. With two runs this could still be chance.Dispatch(slot 14) took 2.2 s, against 18.2 s up to 173 s at5ac55a68.ExecuteIndirect(slot 61) took 2.3 s, against 6.3 s, and all of that 2.3 s fell in the last window before presents stopped. That window spent 6.2 s in list slots, against 0.4 to 2.2 s in the windows before it. So the per-list deduplication removes most of the earlierDispatchcost.AI-assisted.
Holastor commentedon Dec 1, 2026
Thanks @Not-Saii for the rerun at
19ee9193! Great to see0x887A0006is completely gone andDispatch (slot 14)CPU time dropped ~8x (18.2 s -> 2.2 s) with stable33.3 msmedian /34.1 msp95 frame pacing.Two quick observations from your numbers:
1 bufferat168 s):coherent_placed_buffererases tracker entries on resource retirement/release so long runs do not leak memory; by168 sthe transient buffers had been retired, leaving the persistent 174 MiB buffer live.161 s(5,207translated compute dispatches): Unlikemainand#3725(where all4,888–6,133compute dispatches were refused, keeping the title in an earlier loop up to300 s),#3776actually executes those compute passes and advances past the161 sMesh86 submission into the next unimplemented stage around168–203 s.CI on
#3776is green as well, so it's ready for @R0Y00's review.Not-Saii commentedon Dec 1, 2026
@Holastor, thanks for explaining the tracker count. That accounts for the single buffer at 168 s.
Three points from the logs, so the summary doesn't go further than the runs do:
0x887A0006didn't recur in one rerun. With one run each way, I can't say it's gone.mainand runtime: refresh large placed Mesh86 material SRVs #3725. It says nothing about d3d12: coherent page-tracked backing for non-aliased placed buffer SR… #3776's cost either way. TheDispatchslot drop is the real measure, and it's a good result.If it helps, I can rerun #3776 with a stack sample of the stalled threads.
AI-assisted.
Holastor commentedon Dec 1, 2026
Fair points, @Not-Saii — agreed on keeping the claims strictly within what the single rerun shows (the
18.2 s -> 2.2 sdrop inDispatchslot time is the concrete win here, while33.3 msis just the present cap and one run isn't enough to call0x887A0006resolved).A thread stack sample around the
168 sstall (and the203 saccess violation) would be super helpful to see whether it's hitting a lock/wait or an unhandled path once those ~5k compute dispatches run. Appreciate the offer!Not-Saii commentedon Dec 1, 2026
@Holastor, here is the stack-sample rerun, on #3776 at
c7a96c0d. The setup is the same as before, and the stand-in DLL frames are named from a map file of the same build. It is one run, and another process was using about 11% of the GPU when it started.DispatchMeshwas recorded at about 170 s. Presents slowed after 176 s: 94 frames in the 6 s up to 176.4 s, then 5 frames in the 7 s up to 183.8 s. The device was removed with0x887A0006and noticed after 183.8 s. The process kept running until the 300 s timeout.Across the three #3776 runs, two logged this device removal and one stopped presenting at 168 s without logging it.
mainand #3725 had none on this setup. Which command hangs is still open: it could be the Mesh86 draws or the newly translated compute.Next, I can rerun with
X2W_D3D12_DRED=1, which logs the auto-breadcrumbs of the command list that was executing when the device was removed.AI-assisted.
Not-Saii commentedon Dec 1, 2026
@Holastor, the DRED rerun of #3776 at
c7a96c0d. The setup is the same, plusX2W_D3D12_DRED=1andX2W_STOP_AFTER_DEVICE_REMOVED=20. It is one run, and another process was using about 13% of the GPU when it started.0x887A0006after 267.4 s (7,781 frames). DRED reported no page fault, so this is a GPU hang, not a fault.DispatchMeshwas recorded before the hang.Dispatchon the direct queue. The unfinished node is a list of 25 ops with 14 completed, and the first op not completed is aDispatch. The last marker before it names a natively translated compute shader with 4 inputs and 4 outputs. Earlier in the same list there is anExecuteIndirectof translated compute. One of the dispatch's inputs (20 bytes) came from a GPU copy recorded in the same list. The compute queue's 5 nodes had all completed.mainthis setup refuses every compute dispatch, because their buffers are placed buffers that don't alias title memory.So in this run the hang comes from compute work that #3776 newly lets through, not from the Mesh86 binding. The other two #3776 runs had no DRED, so I can't say they hung on the same shader. I don't know yet whether the cause is the translated shader or the bytes refreshed into its inputs.
If it would help, I can re-run with this one compute pipeline refused, or capture its inputs.
AI-assisted.
Holastor commentedon Dec 2, 2026
Thanks @Not-Saii — that DRED trace pins down the picture completely!
Key takeaways from the
c7a96c0dDRED run:#3776's page-tracked backing and fence ordering are sound.mainand#3725refuse all ~18k compute dispatches, this translated compute pipeline (with the 20-byte input coming from an intra-list GPU copy) was never exercised before.Yes, re-running with that single compute pipeline refused (and capturing its inputs if helpful for filing a separate issue on that shader) would be great!
shader: lower pixel alpha-test kills and coverage re-application Part…
shader: lower pixel alpha-test kills and coverage re-application
shader: lower pixel SAVEEXEC lane-mask expressions (#3826)