startup-runtime: the desktop draw path is unreachable, so presented frames stay black #1261
Closed
opened 2026-11-24 06:18:41 +00:00 by triggered02
·
11 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#1261
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 triggered02 on 2026-11-24T06:18:41Z.
Status update · 1 December 2026
Superseded by #3641. Subsequent local checkpoints in #870 show visible UI and presentation. The Mesh86 scene draw now reaches native PSO selection and the direct dispatch handler (#3638), with the first observed refusals at resource backing (#3639 and #3640). The historical trace below describes its original run.
Problem
Split out of #1137 (black screen after the intro video). The presented frame is black because the
desktop draw path is never entered: every draw takes the translated/CPU path, and the render targets
the title draws into are never written, so the texture later sampled for the picture reads as zeros.
Observed
Offline run to the known null at 120 s, 3,600 frames presented, all four captured pipelines
translated and reloaded from the shader cache (
pipelines translated 4 / missing 0), Windows 11build 26200, GTX 1660 SUPER:
draws 0 (skipped 0): the desktop branch never ran, and it was not skipped either — every drawreturned through the translated branch instead.
(3840x2160) sample 2,000 pixels each with a maximum channel value of 0.
to a known view:
3840x2160 format 28 flags 0x1 dim 3 title memory ....x2w-draw texture not uploaded ...: 3840x2160 format 28 flags 0x1, which is the documentedbehaviour for targets (
d3d12_draw.inl: "Targets and UAVs are GPU-written and never uploaded").Why the desktop path is unreachable
list_pipeline(device slot 25) setspass.pipeline_realfrom the wrapper:w->own().kind == pipeline_kind && w->own().real.deliberately return a placeholder:
*out = wrap(nullptr, pipeline_kind);—realis null, sopipeline_realis false for every such pipeline.build_stream_pipeline), sopipeline_realis reachable only for stream pipelines.pipeline_for(*bound, pass)atd3d12_draw.inl:619, after the decision has already been made.It is stored in
bound.pipelinesand never published back to the wrapper or topass.pipeline_real.list_drawtherefore always takesif (list && !pass.pipeline_real)and never reaches thedesktop branch that requires
pipeline_real && targets_bound && topology_ok && topology != 0x11 && (srv_bound & 1).So
render_drawsis structurally 0 for these pipelines no matter how many pipelines translatesuccessfully, and the only content that exists is in the CPU path's readbacks — which are black
because the shaders sample a render target that nothing ever wrote.
Why the CPU readbacks are black
The sampled 3840x2160 R8G8B8A8 texture carries
D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET, and theuploader correctly refuses it. Its contents would have to be produced by the title's own draws, which
never reach the device. Sampling it therefore returns zeros, and any shader whose output is that
sample returns black.
Proposed direction
Either make the translated pipeline's real PSO published state (create it at
SetPipelineStatetime,or promote it on the first draw before the branch, then let the desktop branch run), or deliberately
produce render-target contents on the CPU path before they are sampled. The first is the intended
meaning of the
-Renderswitch as far as I can read it; the second is the fallback the issue's"either fixed or split" allows.
Done when
A draw reaches the desktop branch (
render_drawsgrows), or a narrower cause is identified for whya translated pipeline must stay on the CPU path.
Context:
docs/startup-runtime.md(#1135). Do not attach game files, dumps or logs that containaddresses or names from an executable; describe results in terms of the component tested.
AI-assisted (Claude Code).
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T06:30:15Z.
Thanks for the counters and the frame readbacks. The two counter families measure different paths. A zero in the stream-pipeline draw counter shows that no draw used a prebuilt desktop PSO. The translated branch can still record desktop D3D12 draws: it builds its PSO in
pipeline_forand callsDrawInstancedorDrawIndexedInstancedindraw_translated. So the figures alone do not show that the target had no GPU writer.Could you check the latest main build with #1255 and report whether the same black frame remains on the GTX 1660 SUPER? If it does, the most useful next evidence is a single frame with the translated draw targeting that intermediate texture, the corresponding queue submission or completion, and one readback before the later sample. A source-built setup or a short summary of those observations is enough. This will distinguish a missing write from a binding or sampling problem.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T06:45:00Z.
Checked on latest
main(fac6a522, with #1255 merged) on the GTX 1660 SUPER, and I had the "no GPU writer" part wrong — thanks for the correction. The translated branch does record desktop draws throughpipeline_forandDrawInstanced, sorender_draws 0only says the other branch never ran. Here is the observation you asked for, and it does distinguish the cases.The black frame is unchanged on latest main. Same totals as before (
draws 0 (skipped 0),translated draws 8090,pipelines translated 4 / missing 0,textures uploaded 0), and the frame-1500 readbacks are still uniformly black: 3,000 sampled pixels across a 3840x2160 target, maximum channel value 0.One frame, with the target named. I added a temporary probe (local, not in any branch) that prints the draw's
target0for frame 1500, and compared it with the resource the later draw samples:...F10is both the target of the earlier translated draws and the texture the later draw samples. So this is not a sampling or binding fault, and not a missing writer: the intermediate target is bound astarget0for the draws with keys7c2c1dfd37c3572dand80ae81ccd7078a85, those draws are recorded on the desktop, and the readback of that same target at frame 1500 is still uniformly black. The later draw sampling it therefore gets zeros for a reason that lives in the draw that renders into...F10, not in the sampling step.One thing that follows and may narrow it further:
...F10is a 3840x2160 R8G8B8A8 render target, soupload_texturecorrectly refuses it — its contents can only come from those desktop draws. That means the question is now "why does the translated draw into that target produce black", with the candidates being the state the translated path sets for the target (RTV bind, viewport/scissor, blend), the pipeline variant chosen for that target format, or the shader's own inputs.I have not attached the draw dumps; the numbers above describe the readback and the stand-in's own logs. I can repeat this with a source-built setup or extend the probe to print the RTV/viewport state at the same draw if that is the next thing you want.
The probe is not committed — it was a temporary local build, so nothing in this comment implies a branch or PR.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T07:04:06Z.
Thanks, the matching resource identity establishes which earlier draw to inspect. Could you extend the existing probe for just that frame? A summary of RTV binding, viewport/scissor, colour write mask and the first readback immediately after one of those draws and its fence would help separate a draw-state problem from a later overwrite. If the target is already black at that point, a source-built draw with the same state and a constant nonzero pixel output would be a good control. Please keep addresses and raw captures local.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T07:16:27Z.
Extended the probe for frame 1500 only, and the draw state is clean — so this is not a draw-state problem. Numbers below; addresses and raw captures stay local, as asked.
Draw state at the draw that renders into the intermediate target (frame 1500, both draws that write it):
First readback immediately after each of those draws (the existing per-draw dump, which takes its readback after the draw's fence, so it is before any later draw can overwrite): black. All six dumps at that frame are uniformly black — 1,500 to 3,000 sampled pixels per target, maximum channel value 0. The target is black at the point R0Y00 asked about, not later.
So: RTV bound and correct format, full viewport, full scissor, all four colour channels writable, real PSO. The draw executes with nothing wrong in its state and produces no fragments. That points at the vertex data rather than the draw state, and there is a concrete lead: the pixel shader writes only the flat parameter, and the vertex shader gets its positions by decoding the fetch table in the shader — offset
(desc >> 7) & 0x1fffffc= 17, stride 28, so it reads at bytes 17, 45, 73 of the bound buffer, while that buffer holds-1.0fat byte 16 and1.0fat byte 20. Reads one byte off a clean position pair would give garbage vertices, which clip and write nothing.Next, per your suggestion, is the control: a source-built draw with this same state and a constant nonzero pixel output, to prove this target can receive a write under the launcher at all. If that control writes as expected, the remaining question is the vertex fetch decode (translation) versus which address is bound for root parameter 0.
The probe was temporary and is reverted; nothing is committed.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T07:57:45Z.
The control you asked for already exists in the tree and passes on this machine, so that half of the question is answered: a source-built draw with a constant nonzero output does write, and the readback is exact.
startup_stream_drawcompiles a constant-colour shader with FXC at test time, records a draw through the stand-ins, submits it, waits on its fence and checks every pixel, on both backends:(The swapped-shader check matters on its own: changing only the shader colour changes exactly the 16 covered pixels, so those pixels are coming from the shader and not from a cleared target.)
Hardware here is the GTX 1660 SUPER that shows the black frame, so this is not a "the driver cannot write to an offscreen target" problem, and it is not a readback problem.
What this does not yet cover is state parity with the failing draw. The control draws into its own small target; the failing draw is 3840x2160, format 28, full viewport and scissor, write mask 0xf. If you want that gap closed, the next step is to parameterise the control to exactly that state (same size, format, viewport, scissor, mask) and re-run — I can do that in the same fixture rather than writing a new one.
So, combining with the draw-state evidence from before: the target can receive a write from a translated draw on this adapter, and at the failing draw the state is all correct and the readback is black. That keeps the vertex-data lead as the remaining explanation — the shader that renders into it writes only its flat parameter, and the vertex fetch decode reads at byte 17 with stride 28 while the bound buffer holds
-1.0/1.0at bytes 16/20.Nothing committed; no addresses or raw captures included.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:17:28Z.
The existing constant-color draw and its swapped-shader control are a useful baseline on the affected adapter. Please reuse that fixture for the matching target, viewport, scissor and mask, then vary the tested vertex byte offset while keeping the same input and shader. #1316 now validates full-address placed vertex bounds on main; check whether the binding in the reproducer resolves to the intended allocation and byte range. Keep the first differing byte/field and the observed pixel counts. This can distinguish a layout or binding discrepancy from the constant-color output path.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T08:22:56Z.
Checking the fixture against the failing state turned up two mismatches worth fixing before the sweep is meaningful, so I want to state them rather than run a control that only looks like a match.
What
startup_stream_drawactually uses today (tests/startup_stream_draw.cpp:187-222):bc7 ? width : width/2— half-width for the plain caseSo the control matches on format, viewport and mask, and differs on size and — more importantly — on scissor: the plain path deliberately uses a half-width scissor, which is exactly a state difference that could mask or mimic a rasterisation problem. I would rather parameterise those two than run a "matching" control that does not actually match.
#1316 is merged, so the full-address placed-vertex resolution is in main and the sweep exercises the bound path rather than the old transient copy. In this fixture the vertex binding for the plain draw goes through list slot 36 (root SRV) with the guest address, which is what #1316 now resolves against the placement records — so varying that guest byte offset is the right knob.
Plan for the mode, in the same fixture rather than a new one:
Expected reading: if the offset is honoured, the covered-pixel count stays constant until the view leaves the allocation; if the binding ignores or mis-bounds the offset, the first differing byte will move or the count will change at an offset that should still be valid. That is the classification you asked for, and it separates a binding/layout discrepancy from the constant-colour output path.
I have not changed the fixture yet — this step is the state parity plus the sweep, and I will report the first differing byte and the pixel counts rather than a pass/fail summary. If you would rather I run the imperfect control first for a data point before doing that work, say so and it is two minutes.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T08:28:33Z.
The target-size and full-scissor control is worth running. One correction for the offset sweep: #1316 observes slot 48 vertex-buffer views, so the slot 36 root SRV does not by itself exercise that placement lookup. Use the placed-vertex fixture for the slot 48 sweep, or report the root-SRV and placed-vertex routes as separate cases. In either case the offset changes what bytes the shader sees, so keep the in-range expected output explicit and use a separate out-of-range null control. Please retain the original half-scissor case as a regression.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-11-24T08:34:41Z.
Correction taken, and it changes the plan: you are right that #1316 observes slot 48 vertex-buffer views, so a slot 36 root SRV does not exercise the placement lookup at all. My plan named slot 36, which would have swept a route that cannot touch the code being validated.
Revised, following your split:
I have not started the fixture changes yet; when I report these numbers I will say which route each one came from rather than a combined summary.
Imported from R0Y00/Xbox2Windows. Originally posted by stan495 on 2026-11-24T09:36:35Z.
Independent Windows run on the #1316 merge commit
a166e42f169b18cc4323b7586e14426671466f85. Windows 11 25H2 build 26200.9974, x64 MSVC Release, D3D12 debug layer off. The hardware draws selected Radeon RX 7900 XTX (32.0.32029.2010). WARP reported Microsoft Basic Render Driver (10.0.26100.9818).All 10 source-built tests passed (5 hardware, 5 WARP), with 0 failures and 0 capability skips.
placed_vertexmatched all 64 expected RGBA pixels on each backend, including the out-of-bounds view that read zero from a null descriptor.For the local Scarlett x64 executable, I used the documented offline launcher with
-Seconds 180 -MemoryGiB 14 -Render -FakeUser -GpuMirror -ContinueAsserts 1000 -InputScript '4@70'on an isolated package copy. The cold cache run kept presenting with zero translated draws. All 18 sampled surfaces were black and the run emitted 11 pipeline requests.gfx2hlsl.py --pendingcompiled 10. One remained unsupported withimage dimension SQ_RSRC_IMG_2D_ARRAY.The first replay stopped at 17.82 s on a second-chance null write (
0xc0000005invcruntime140.dll). A repeat with the same flags and cache ran to the 180 s timeout. The Bink header reached frame 450/450, and the last 15 sampled surfaces had nonzero RGB through about 175 s from launch, including samples well after video frames began advancing. The final heartbeat reported 4,609 presents in 160.2 s from first present (28.8 fps overall). At frame 4,500 the totals were desktop draws 0 (skipped 0), translated draws 82,086 (not drawn 6,171), pipelines translated/missing 10/1, and null bindings 454. An early 3840×2160 format-28 render-target upload was refused. I did not observe the sustained post-intro black screen on the repeat. The cache coverage and binding counts differ from the 4/0, zero-null-binding case in #1268, and the ~8 s surface sampling could miss brief black frames.Imported from R0Y00/Xbox2Windows. Originally posted by lambirou on 2026-11-26T12:31:52Z.
I opened a draft for the first bounded pixel-history slice: #2828.
It adds X2W_DRAW_DUMP_PIXEL=, next to X2W_DRAW_DUMP_FRAME. Each recorded copy then covers one texel of render target 0 instead of the whole target, and the present writes pixel_history.txt with the draw ordinal, the translated manifest key, the draw count, the raw word and the decoded RGBA value. The 48-copy bound is unchanged.
The source-built fixture draws three times on a 4x4 target: the first and third draws are scissored away from the watched texel, so only the second changes it. The report must name draw 2 and its key; the control without that draw must leave the texel black. WARP and an RX 9060 XT pass 2/2.
This is deliberately limited to the 8-bit four-channel formats the full dump already supports. It should make the next frame-1500-style readback name the last draw that changed a pixel instead of only showing that the target is black.