memory: inventory of application-memory paths and next steps for the #1914 hybrid model #3676
Open
opened 2026-12-01 00:14:37 +00:00 by Leyukaka
·
8 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#3676
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 Leyukaka on 2026-12-01T00:14:37Z.
Context
This issue does not reopen that decision. It lists the paths that exist on
maintoday, what a start-up run shows about them, and small work items that can be claimed separately.Inventory
Read from
mainatd5970858. Bare:Nissrc/startup_stubs/d3d12_xs_device.cpp;drawisd3d12_draw.inl,cdispisd3d12_compute_dispatch.inl, both insrc/startup_stubs/. "Desktop copy" means a separate D3D12 resource.:6688-6720D3D12_FEATURE_EXISTING_HEAPSquery on this path:6724-6732:6564-6608,draw:2002-2005frame_copydraw:1940, calldraw:4003draw:3919-3921); 256 MiB ringupload_from_title:3216-3221,:5238-5239X2W_TRANSLATED_TITLE_INPUT_SNAPSHOT)draw:2890-2902,cdisp:1514-1519X2W_D3D12_TITLE_COPY_SNAPSHOT)list_copy.inl:214-226X2W_D3D12_LINEAR_BUFFERS, #2218)ExecuteCommandListslinear_buffer_backing.h:3-30,linear_buffer_backing.h:473; hooks:5462,:5553COMMONstate only; no copy for GPU-written buffers (linear_buffer_backing.h:106-107); a write after submission is not seen (#1914)X2W_MESH86_XMEM_SRV,X2W_MESH_INDIRECT_XMEM; #2280, #2303)mesh_xmem_handoff.inl:6-12,mesh_xmem_handoff.inl:204d3d12_memory_srv.inl:358-372,d3d12_memory_srv.inl:399-449,d3d12_memory_srv.inl:336-343d3d12_memory_srv.inl:279-297)list_upload_pages.h:24-37X2W_TRANSLATED_INDIRECT_ADDRESS_ALIAS):6465-6500Two rules sit above the table.
MapandGetGPUVirtualAddressreturn the application's own memory and address when the resource has them (:5710-5725,:5737-5746). The desktop objects stay alive for the process unlessX2W_D3D12_RELEASE_RETIRED=1(:1239-1241, #2379), and buffers are outside that class (:1068).Not wired into the stand-in:
src/era_gpu_alias.h(one buffer over a whole allocation),src/era_title_va.h,src/era_title_gpu.h,src/title_va_lookup.hlsli.Observed gaps
One start-up run of 900 s on one adapter, aggregate counts only.
Measured
0x887A0006. The same run was stable for 900 s with that one compute program excluded.Read from the code
:3937-3939).QueryVideoMemoryInfois only logged (:8371);MakeResidentandEvictare forwarded (:1576-1585). Nothing bounds video memory (#2379).Inferred, not confirmed
:6618) matches their number, but the default log line prints neither the memory type nor the reason. #1914 says "mostly mapped sections" and its field report says "the rest fail the 64 KiB offset rule"; both classes exist, the second by count and the first by bytes.uploadcategory (resource_budget.h:9,resource_budget.h:156), so it cannot say.Proposed work items
Each is one small PR with a source-built test. Comment here to claim one.
Already taken, do not duplicate
a. Snapshot at submission (row 6). A PR is in preparation. Reserve at record, copy in
queue_executebeforeExecuteCommandLists(:5486-5493), under thedraw_lockalready held there.b. Placement and read-path census. Add
range.typeand the refusal reason to the default slot 133 line (:6733-6735), as the linear line already does (:6646-6650). Add a five-second line next to:8679:c. Split the
uploadbudget category by creator (follow-up to #3491). Creators onmain: ring and snapshot pool (:3153), slot 27/127 committed (:1161,:8167), slot 70 fallback (d3d12_memory_srv.inl:449), slot 148 pages (list_upload_pages.h:37), linear staging (linear_buffer_backing.h:1158), Mesh86 cache (mesh86_cache.inl:490).d. One adapter-facts line at start-up.
src/,tools/andtests/have noD3D12_FEATURE_ARCHITECTUREquery.existing_heaps=1.e. Design proposal, for the maintainer to accept or reject: one desktop buffer per existing heap. For a buffer below 64 KiB at an unaligned offset in an allocation whose heap is open, stop creating a fallback. Keep one buffer over the heap, as
era_gpu_aliasdoes, and give the placement an offset.GetDesc); state tracking becomes per heap; GPU reads go to system memory.f. Measure before coding.
Mapcalls on READBACK-heap resources, copies and resolves whose destination has application memory, and the refusals logged for copy destinations backed by application memory. Open an issue with the counts only if they are not zero.Hardware
Recommendations, not measured.
DispatchMesh.D3D12_FEATURE_EXISTING_HEAPSis 0, which leaves only the copy path.Refs #1914, #3640, #3474, #2379, #3639
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-12-01T00:24:33Z.
Claiming (b) placement and read-path census.
Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.
Scope: add
range.typeand the refusal reason to the default slot 133 placement line, and a five-secondx2w-d3d12 placed buffers by backingline (shared / unaligned / mapped / uncovered / create-failed, count and bytes, with the GPU-written share of each). Test: a source-built fixture that places one buffer of each class on WARP and checks the counters, with a negative control that misclassifies one class. Logging and counters only; no change to which path a placement takes. Leaves (a), (c), (d) and (e) alone. PR will targetmain.Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-12-01T00:26:14Z.
Claiming (d) one adapter-facts line at start-up.
Environment: Windows 11 Pro 10.0.26100, in-box WARP (the hardware adapters here are an NVIDIA Quadro M1000M at D3D12 FL 11_0 and an Intel HD 530), VS 2026 BuildTools, Windows SDK 10.0.26100.
Scope: query
D3D12_FEATURE_ARCHITECTURE1andD3D12_FEATURE_EXISTING_HEAPSonce where the runtime creates its desktop device. Log onex2w-d3d12 adapter facts:line with uma, cache_coherent_uma, existing_heaps, and the local and non-local video memory from the adapter. A fixture will check that the line appears exactly once on WARP withexisting_heaps=1. Rows 1–2 are not changed in this PR.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by RomainROCH on 2026-12-01T05:27:43Z.
For item (e), an independent MIT-licensed D3D12 fixture provides a preliminary check of the proposed single-buffer geometry (not a claim or a runtime integration).
On Windows 11 build 26100, system WARP 10.0.26100.9818, one placed buffer over an existing 64 KiB heap exposes two overlapping logical byte ranges. CPU-to-GPU visibility passes, and after an explicit fence both GPU readback and direct CPU observation return
10111213a0a1a2a3a4a5a6a7. The one-byte shifted-write negative control fails both post-fence checks (exit 2). On this particular shared cross-adapter heap, omitting the resource cross-adapter flag also returns E_INVALIDARG despite existing-heaps support.Reproduction commands and scope · Raw log
This covers one queue and logical subranges, not two runtime placement wrappers, resource-state integration, physical adapters or Windows 10. It may be useful as an independent control for the proposed fixture.
Physical adapter follow-up for (e). On Windows 11 build 26100 and in-box D3D12 10.0.26100.9818, a GTX 970M (driver 32.0.15.8253) reproduced the WARP bytes in the original 64 KiB fixture. An Intel HD Graphics 530 (31.0.101.2115) reported feature level 12.1 and
EXISTING_HEAPS=0, so the test skipped it before allocation or queue submission.WARP and the GTX both passed a DIRECT → COPY → DIRECT handoff with explicit fences and
COMMONat each handoff. After the final fence and release, recommitting the same virtual address returned zeroed backing. The second generation read50515253e0e1e2e3e4e5e6e7through both paths. Shifting that write by one byte failed both checks while the first generation stayed clean. The scope is two logical ranges inside one buffer.Reproduction and capability matrix · Raw output
Imported from R0Y00/Xbox2Windows. Originally posted by lukaslw-lab on 2026-12-01T05:46:27Z.
Data point for row 12 / the
uncoveredclass, from one native Mesh86 run (main1c634037,X2W_REFUSE_FIXED_MESH=1,X2W_NATIVE_MESH86=1, 600 s, row 12 alias off):Two Mesh86 pipelines are refused at binding for a mesh
t0read through a descriptor table, root 1 at table offset0x40, 8 bytes needed:The descriptor's address is in application memory that no placement covers. This is not the #3640 shape (root 0,
0xAC0, a 174 MiB placed buffer). The same run's census line ends atuncovered 50/1094444, so these may be among those 50. Log lines are capped, so the counts are samples.I haven't tried
X2W_TRANSLATED_INDIRECT_ADDRESS_ALIASon it yet. Counts only.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T08:38:37Z.
I'll take (c): split the
uploadbudget category by creator (upload ring / snapshot pool, slot 27/127, slot 70 fallback, slot 148 pages, linear staging, Mesh86 cache, plus an explicit other bucket so totals don't change). Each creator gets its own column in the budget log and instartup_resource_budget, with a sum check against the old total. I'll keep it clear of #3491's report line. Fork first, then a PR, plus a test-PC game run so we can see who owns the ~16,000 UPLOAD objects.AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-12-01T08:46:44Z.
I'll take the GPU-to-CPU half of (f): counters for Map calls on READBACK-heap resources, copies and resolves whose destination has application memory, and the refusals of those destinations (ResolveQueryData already refuses "destination has title memory"; Copy* currently forwards them). Logging and counters only; the #3640 top-10 GPU-written buffers stay with that trace. A source-built fixture will exercise each class, and a test-PC game run will show whether any count is non-zero (a follow-up issue only if so).
AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-01T10:21:29Z.
Claiming item (e) first PR (standalone fixture only): one desktop placed buffer over an existing 64 KiB+
MEM_PRIVATEheap exposing two unaligned overlapping logical buffer ranges, verifying bidirectional CPU->GPU and GPU->CPU visibility plus negative controls on both WARP and hardware (no runtime integration yet, per the design proposal above).Environment: Windows 11 (26200), MSVC 19.44, Ninja, Windows SDK 10.0.26100, NVIDIA GeForce RTX 5080 (driver 621.40) + WARP.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by timbot103 on 2026-12-01T10:53:58Z.
The standalone D3D12 fixture for item
(e)(no runtime integration) is up in #3723.Verified in both Debug and Release on WARP (
10.0.26100.9818) and NVIDIA GeForce RTX 5080 (32.0.16.2140, Windows 11 26200,D3D12_FEATURE_EXISTING_HEAPS=1; D3D12 debug layer unavailable on this host,0x887a002d): CPU→GPU, GPU→CPU, GPU→GPU UAV-barrier echo, and displaced-offset negative control (--offset-control/--corrupt-offsetexit code 3) all pass on both adapters.AI-assisted.