supply coherent backing for large placed Mesh86 buffer SRVs #3640
Closed
opened 2026-11-30 19:13:51 +00:00 by R0Y00
·
13 comments
No Branch/Tag specified
main
codex/indirect-large-backed-views
codex/word3-preflight-check
codex/vertex-table-two-records
codex/live-index-alias
codex/copied-vertex-buffer-srv
codex/windows-stage-test-output
codex/preserve-live-srv-retirement
codex/share-render-target-tracking
codex/sgd5-negative-offset-fixture
coverage-dashboard
codex/mesh-loose-root
codex/mesh86-cache-padding
codex/xmem-scatter-preflight
codex/mesh-depth-ps
codex/indirect-dispatch-refresh
codex/compute-container-index
codex/startup-compute-formatted-load
codex/compute-indirect-producer
codex/compute-atomic-soffset
codex/mesh-dual-handoff
codex/startup-run-sh-watcher-control
codex/queue31-page-alias
codex/indexed-indirect-compute-root
codex/typed-buffer-view-metadata
codex/translated-indexed-address-alias
codex/fixed-mesh-create-result
codex/xmem-section-lease
codex/startup-slot86-mesh-cache
codex/restore-mesh-barrier-iteration
codex/translated-indirect-upload-index
codex/xapu-completion-opt-in
codex/translated-indexed-rect
codex/translated-indexed-indirect
codex/startup-mesh-lds-integration
codex/startup-console-ms24
codex/startup-slot57-mesh-request
codex/indirect-copy-provenance
codex/present-color-producer-trace
codex/compute-dispatch-binding-trace
codex/translated-indirect-table-buffers
codex/indirect-copy-provenance-base
codex/mix-half-literal-source
codex/translated-indirect-draw
codex/xmem-scatter-diagnostics
codex/slot148-recording-upload
codex/slot70-loading-art-verified
codex/command-list-upload-arena
codex/recover-failed-command-list
codex/startup-heap-timing-notes
codex/align-audio-input-timeline
codex/synthetic-depth-export-control
codex/startup-texture1d-on-windows
codex/1629-packed-position-fixture
codex/cpu-srv-refresh
codex/stream-root-srv-draw
codex/audio-mixer-timer
codex/startup-reload-published-shader
codex/priority-integrate-1284
codex/guest-sixteen-page-record
codex/aot-placed-dxr-batch
codex/guest-directory-selection
codex/gamesave-enumerate-read
codex/readme-archive-to-pixels
codex/pe-placed-view-draw
codex/archive-directory-gpu
codex/slot133-dxr-build
codex/materialize-placed-vertex-view
codex/dstorage-directory-offsets
codex/xg-nine-bc-copy
codex/xg-slot10-bc64-arrays
codex/dxr-guest-address-readback
codex/gpu-va-high-bits
codex/clarify-diagnostic-startup-scope
codex/xg-six-levels
codex/typed-derived-blend
codex/english-legal-text-progress
codex/address-bc-4ks
codex/dstorage-bounded-file-read
codex/wide-srv-offsets-menu
codex/startup-memory-srv
codex/bound-view-tail
codex/language-selector-readback
codex/setup-menu-progress
codex/cpu-plane-refresh
codex/startup-ubyte-vertex
codex/presenter-window-selection
codex/startup-uniform-buffer-lane
codex/intro-loop-timing
codex/static-clzero-loops
codex/document-rtx-intro
codex/startup-insertq
codex/nv12-startup-texture
codex/stream-stage-draw
codex/startup-null-uav-format
codex/startup-draw-capture
codex/shorten-windows-checks
codex/dstorage-rfc1950
codex/startup-dump-fence
codex/pr1135-review-base
codex/startup-stream-requests
codex/startup-chroma-view
codex/readme-graphics-pipeline-streams
codex/static-crt-free-tls
codex/arc-140t-rtx-5080-laptop-gpu-reports
codex/main-startup-progress-entry
codex/signed-dxil-catalogue
codex/reloc-free-preferred-base
codex/quad-dpp-bit-mask
codex/raw-srv-bounds
codex/rx9070-31044-hardware-report
codex/gpu-page-source-provenance
codex/runtime-placeholder-interior
codex/gpu-copy-queue-tile-order
codex/pe-pin-external-providers
codex/xmem-placeholder-reservations
codex/xmem-shared-physical-pages
codex/pe-package-startup
codex/xmem-tools-memory-query
codex/cpu-stack-output-import
codex/pe-load-security-cookie
codex/record-three-bvh-retests
codex/cpu-rbp-frame-anchor
codex/xmem-default-startup
codex/record-rtx-3050-ti-9597
codex/docs-readme-start-here
codex/check-compute-mad24-truncation
codex/docs-discord-community
codex/bound-rcx-branch-mutants
codex/rtx5060ti-bvh-62114
codex/837-neutral-readme-disclaimer
codex/record-rtx-3070-ti
codex/title-neutral-public-wording
codex/exe-shadow-frame-submissions
codex/exe-shadow-runtime-chain
codex/readme-polish
codex/gpu-coverage-nov23
codex/spirv-minlod
codex/shadow-shim-device
codex/exe-two-shadow-frames
codex/shim-dispatch-cleanup
codex/fix-spirv-cache-probe
codex/sampler-use
codex/ballot-bit-extract
codex/packed-fma-release
codex/cpu-packed-fma-o2
codex/publish-coverage-dashboard
codex/mesh-cbv-binding-order
codex/spirv-window-fixture
codex/ps-e32-float-uint
codex/ps-cbuffer-reads
codex/fixed-profile-rescan
codex/shim-compute-integration
codex/readme-visible-coverage
codex/readme-research-navigation
codex/integrate-pr-256
codex/indexed-mesh
codex/sampled-coverage
codex/first-ms
codex/dual-ps
codex/ps-attribute
codex/compute-first
codex/ps-export
codex/readme-research-status
codex/ps-layout
codex/blast-window
codex/chart-caption
codex/reviewer-roles
codex/blast-aot
codex/archive-program
codex/crc-stream-program
codex/exe-image-data-chain
codex/local-cpu-fixture-coverage
codex/exe-bound-frame-chain
codex/exe-mapped-comparison
codex/contribution-dependencies
codex/exe-entry-aot
codex/bink-frame-heap-integration
docs/hardware-seven-reports
codex/bink-custom-heap
codex/bink-heap-callers
codex/discussions-entry-points
codex/gpu-community-batch-64
codex/ffx-scratch-writers
codex/generic-project-documentation
codex/ffx-dispatch-rcas
codex/four-windows-gpu-reports
codex/title-neutral-project-wording
codex/community-coverage-provenance
codex/rcas-packed-texels
codex/community-gpu-retests
codex/community-build-and-gpu-reports
codex/ffx-provider-loop
codex/ffx-recurrent-views
codex/ffx-recurrent-resource
codex/amd-wave64-reports
codex/ffx-backend-slots
codex/upscaler-device-init
codex/ffx-context-lifecycle
codex/ffx-version-query
codex/ffx-provider-contract
codex/typed-object-callback
codex/cpu-ordinal-import
codex/chained-cpu-ranges
codex/cpu-import-call
codex/cpu-direct-call
codex/cpu-leaf-aot
codex/community-project-status
codex/script-state-path-replay
codex/script-state-evidence
codex/bc7-resident-tail
codex/bcpack-mip-tail
codex/bc7-texture-draw
codex/asset-ranges
codex/pixel-constants
codex/pixel-aot
codex/pre-exe-workloads
codex/root-signature-device-coverage
engineering/packed-bvh-leaves
engineering/bvh-build-and-update
engineering/intake-root-roundtrip
community/gpu-check-release
community/english-contributor-entry
gpu-check-v0.1.0
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
R0Y00/Xbox2Windows#3640
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-30T19:13:51Z.
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
DispatchMeshhandlers and refused the same first material view, mesht0, root parameter 0, table byte offset0xAC0. 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.Performance and code quality
Keep public evidence title-neutral and use source-built fixtures.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-30T23:31:58Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T00:18:32Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-01T03:04:02Z.
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).Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T19:40:09Z.
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.
Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-12-01T20:00:05Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T20:07:23Z.
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 (#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.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T20:14:03Z.
@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 #3725 both ran the full 300 s, and both #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.
Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-12-01T20:19:27Z.
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.Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T20:46:46Z.
@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 #3725. It says nothing about #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.
Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-12-01T20:54:31Z.
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!Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T23:46:11Z.
@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.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T23:57:54Z.
@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.
Imported from R0Y00/Xbox2Windows. Originally posted by Holastor on 2026-12-02T00:21:48Z.
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!