cpp-migration: compile a VS/PS pair on first draw through the ordinary graphics runtime #2978
Closed
opened 2026-11-27 01:50:49 +00:00 by R0Y00
·
7 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#2978
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-27T01:50:49Z.
Target branch
main. Refs #2935. #2958 wired the first native compute dispatch. This issue covers the first native graphics draw through the stand-in. #2914 and #2946 provide stage-level regression fixtures.Status. @Not-Saii claimed the first-draw work. #2981 is now on main at
c827d8baad, after independent review of3440edff. The source-built triangle draws 16 red and 16 clear pixels with cold and warm caches on both WARP and RTX. The published disk pair retains precedence and stays byte-identical. After an unsupported native manifest is rejected, the later draw recovers when the disk pair becomes available in the same process. The exact main tree passed 3 focused tests in Debug and Release /O2, with one expected inbox WARP wave32 Compute capability skip per build. Independent review.Remaining main acceptance. PSO creation failure is a later step than manifest rejection. #3139 passed that negative control on the #3094 runtime stack. This issue stays open until the applicable PSO failure control is also verified on main. WARP and RTX results above refer to the source-built fixture.
Scope. Wire the existing C++ graphics pair compiler and binding information into the ordinary graphics pipeline/draw path for one supported VS/PS pair, with the native route enabled. Reuse the existing request identity, PSO creation and cache logic. Start with one render target, a known format and a simple source-built triangle. Keep mesh and additional RTV variants in separate work.
Reproduction and acceptance
The deliverable is one reproducible end-to-end graphics path on this branch. The older CLI/cache work is tracked in #2933 and the compute work in #2934.
Imported from R0Y00/Xbox2Windows. Originally posted by Not-Saii on 2026-11-27T01:55:10Z.
Claiming this.
Environment: Windows 11 build 26300, NVIDIA GeForce RTX 4090 (driver 32.0.16.1088), Windows SDK 10.0.26100, plus WARP.
Part I will do, on
cpp-migration: on the first draw of a graphics pipeline withX2W_NATIVE_SHADERSset and no<key>.txtin the cache, the stand-in reads its ownreq_<key>.*files and compiles the pair in-process with the existing pieces (read_graphics_request,prepare_direct_graphics,format_graphics_runtime_manifest,ShaderDxilCompiler::runtime_worker). It then publishes<key>.vs.cso,<key>.ps.csoand<key>.txt(in that order) and loads them through the existingload_translationand PSO path. A fresh process with that cache loads the entry without recompiling. A refusal is logged with its stage and reason, and no<key>.txtis written.The fixture is a source-built constant-colour triangle, one RTV with a known format, drawn through the stand-in. It compares one interior pixel and one exterior pixel against a clear-colour control and a skipped-draw control, does a second-process cache-hit run, and has an unsupported-pair case. Hardware run on the RTX 4090, WARP reported separately.
Shared interfaces I expect to touch:
cached_translationinsrc/startup_stubs/d3d12_draw.inl, and the graphics request job intools/startup/compile_dxil.cpp, which I plan to move into a shared function so the tool and the runtime run the same code. Mesh and RTV variants stay out of scope. I will say here if tracing shows otherwise.AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T01:26:36Z.
The remaining PSO failure control has now passed independently on #3139 at
dbca1851, on top of #3094. The source-built fixture enters the native compiler, injects a PSO creation failure, publishes a valid disk pair before fallback, and then reads back 16 red and 16 clear pixels. Native-only and missing-pair controls refuse, and the ordinary delayed RTV manifest still recovers. All six selected tests passed in both Debug and Release /O2 on inbox WARP and RTX 4060 Laptop with the D3D12 debug layer enabled.Not-Saii's original #2981 remains linked and has green Windows CI at
850aba86; the new head is awaiting independent review. #3094 and #3139 are still stacked. This issue stays open until the first-draw path and its applicable controls are verified on main.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-28T04:23:41Z.
Not-Saii’s #2981 is now on
mainatc827d8baa. The independent review of3440edffreproduced the ordinary cold and warm draw on WARP and an RX 9060 XT. With an invalid generated manifest, the first target stayed clear. Publishing the valid disk pair let a later draw in the same process read back 16 red and 16 clear pixels, with all three cache files byte-identical. The early missing-DXC refusal was tested separately.The later PSO-creation failure control is still tracked in #3139 on top of #3094. A local combined candidate passed that control, and the refreshed candidate
d86ea977passed seven focused Release regressions, including the WARP and hardware draw fixtures. This remains open for verification of the PSO recovery onmain. All of these results are from source-built fixtures.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T12:39:19Z.
Current-main check at
5770f14e: #3094 has merged tomain, but #3139 merged into the former integration branch. Thestartup_native_graphics_drawfixture onmainstill injects only missing DXC, manifest failure and root-signature failure. I traced the translated draw on this revision: a null result from graphics PSO creation goes topipeline_state_unavailableand exits the draw without reloading the published pair. This is a source inspection, not a new GPU result.The remaining acceptance is a main-targeted change carrying over the late PSO recovery and its fixture from #3139. Inject failure only for the native candidate, publish a valid disk pair, and verify in the same process that the first target stays clear and the retry reads back 16 red and 16 clear pixels after the fence, with all three cache files byte-identical. Keep the native-only and missing-pair refusals, and record WARP and hardware separately.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-02T18:40:23Z.
@Ammmae0x @Leyukaka Thanks for bringing #3139 forward. #3873 and #3874 change the same PSO recovery path. Please coordinate on one PR to carry @lambirou’s original work and both timing cases. #3873 shows that a just-published pair can be hidden by the stale absent cache. #3874 also exercises publication after the first draw has already failed. The common fixture should cover both cases, keep the native-only and invalid-pair controls, and check the fenced pixels and cache files. Please link the chosen PR here so we can run one independent Windows review for #2978 and #3134.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T05:15:23Z.
I independently tested #3874 (
05eff611) in a local trial merge with main9dfe168a. The source-built fixture matched the cold and warm draw on WARP and RTX 4060 Laptop. When native PSO creation was faulted, the first target stayed clear and the retry in the same process after disk publication read back 16 red and 16 clear pixels after the fence. The existing cache byte/mtime assertions passed. The fixed-entry draw and slot 67 regressions also passed on both adapters. Trial detailsThe remote PR still has merge conflicts. The just-published timing from #3873 and the command signature lifetime review remain open before this can land on main.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-12-03T05:34:50Z.
The remaining main acceptance passed at
8a2f84d1b9bfc8815e224255a46c38d62d8bc39b(#3874). I checked out and rebuilt that exact main commit with MSVC Debug:cmake --build --preset dev --target compile_dxil d3d12_xs_shim startup_stream_consumer, thenctest --preset dev --no-tests=error -j 1 -V -R '^startup_native_graphics_(draw|fixed_entry)_(warp|hardware)$'. All four tests passed with no skips on Windows 11 build 26300, inbox WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656, with the D3D12 debug layer enabled.On each adapter the source-built triangle read back 16 red and 16 clear pixels on both the cold and warm native draws. The native-candidate PSO fault left all 32 pixels clear on the first draw. Publishing the disk pair let a later draw in that same process read back 16 red and 16 clear pixels after the fence, with its three cache files' bytes and mtimes unchanged. Native-only and missing-pair controls each left all 32 pixels clear. This completes the source-built first-draw acceptance started in #2981.