tests: native_direct_mesh fails on every PR's Windows job ('native compute +0x34: unmapped graphics export') #3856
Closed
opened 2026-12-02 13:43:35 +00:00 by triggered02
·
9 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#3856
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-12-02T13:43:35Z.
Summary.
native_direct_mesh(test 486) is red on the Windows job for every pull request I can see, onmainat5770f14e. It is the only failing test in each job, so it blocks every PR from a green Windows run.Observed failure (identical in all four jobs):
Jobs. Four independent heads, none of which touches this area, all failing the same test:
native_direct_meshFailed, 10.45 snative_direct_meshFailednative_direct_meshFailedmainitself is also red: run 46880161821 on5770f14efailed, though that one failed earlier still —FileNotFoundError: out/test-results.xml— so it never reached a test verdict. That is why this needs an issue rather than a pointer at a red main run.What the message suggests.
unmapped graphics exportis raised for an export the native compute frontend cannot map;+0x34is the guest offset it reached. The fixture prints its compile timings and then fails, so the compute stage compiled but its export set did not line up (bytes=2386published).Not established. I have not bisected which commit introduced it, and
native_direct_meshis a Windows-only test — this host is Linux, so I cannot run it or narrow it further than the CI evidence above. I am reporting the blocker, not a diagnosis.Reproduce: the Windows job of any PR, or
ctest --preset dev -R '^native_direct_mesh$' -Von Windows.Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T13:48:42Z.
Claiming to try to reproduce it locally, same approach that worked for
startup_slot133_lazy_textures_check:native_direct_meshdrivestools/startup/compile_dxilthroughtests/native_direct_mesh_check.py, and both halves are buildable here.Plan: build
compile_dxilwith clang-cl, then runtests/native_direct_mesh_check.pyunder the Windows CPython in Wine 11 + vkd3d-proton with the Windowsdxc.exefrom the staged SDK tools. If it reproduces, I can bisect the guest offset and see which export the native compute frontend fails to map; if it does not, that is a useful negative and it means the failure is specific to the Windows toolchain or the WARP path.Caveat I will keep in the report: Linux + Wine is not the failing environment, so a reproduction here is evidence about the code path, not about the Windows job's flake rate, and a negative result does not clear the Windows job.
Overlap: none — I filed this issue and nobody has touched it.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T13:59:13Z.
Reproduced on Linux, isolated the failing sub-case, and narrowed the regression window. The bisect itself is blocked by this host, not by the code.
1. It reproduces outside Windows. Building
compile_dxilwith clang-cl at5770f14eand running the test under the Windows CPython in Wine:Same
bytes=2386, same message, same assertion line as the Windows jobs. So this is not a Windows-toolchain effect and not WARP.2. The failing sub-case.
tests/native_direct_mesh_check.py:883sits in the loopInstrumenting a throwaway copy (not the repo's file) shows the first iteration fails and the second never runs:
That is the case with signature rows
SV_Position,COLORas an integer element (component 1, constant mode) andTEXCOORD. The refusal is the fall-through atsrc/gfx1013_direct_graphics.inl:456: the export's target matches neither the position row nor clip/cull distance nor atarget >= 32packed vertex row instage.outputs.3. Regression window.
f17ef459(#3825, "keep mesh output rows with an integer element constant") added this case and changed the row-mode computation, and its own Windows job passed at merge (8m37s, 2026-12-02 08:57Z). Sonative_direct_meshwas green atf17ef459and is red at5770f14e. The commits touchingsrc/gfx1013_direct_graphics.inlin between aree3876780(#3792),45c809ab(#3826),8407fdd3(#3828) and9b89e581(#3831).4. What blocked the bisect. Running the same test at
f17ef459fails earlier, at asubprocesscall that spawnsdxc.exe:Three runs in a row. That is the same Wine
CreateProcessfailure I hit looping another fixture in #3822, and it is an artefact of this host, not of the code. So I cannot complete the bisect here; a Windows host or a quieter harness can.I have not changed any code. If you want, the next step from my side is to apply the local
#3853clang build fix to a bisect worktree and retry the four candidate commits when Wine cooperates — but that is guessing at reliability, so I would rather hand over the narrowed window than spend it on flakes.Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T14:02:11Z.
Addendum — correcting a claim I made too strongly in the previous comment, plus the history that reframes this.
Correction. I wrote "it is not a Windows effect". What I actually measured is: it reproduces on this host with the staged
dxc.exefrom the SDK-tools folder. The test spawnsdxc.exerepeatedly (-dumpbin) and compiles HLSL with it, so if CI'sDXC_BIN_DIRis a different DXC version than the one staged here, my reproduction may be the older failure rather than the current one. Same message and same assertion line, but I have not shown the two share a root cause. Treat the Linux reproduction as a lead, not as proof about the Windows job.History that matters more.
3d33b0d9("ci: select native_direct_mesh in the pr preset", 2026-11-30) says in its own message:So this test has been red on
mainbefore, and selecting it in theprpreset is what made it visible to PRs. That means:3d33b0d9(2026-11-30)prpreset3d33b0d9f17ef459(#3825, 2026-12-02 08:57Z)5770f14e(current main)So the regression window is still "after
f17ef459", and the four commits touchingsrc/gfx1013_direct_graphics.inlin that window aree3876780,45c809ab,8407fdd3,9b89e581. I read their diffs and the only one touching that file in isolation ise3876780, which changes a single line (DirectCompute alu{emitter}→DirectCompute alu{emitter, translation_options()}) — a plausible way for a lowering decision to change, but I am not claiming it.What would settle it fastest, and I cannot do here: run
ctest --preset dev -R '^native_direct_mesh$' -Von a Windows host atf17ef459and ate3876780. Two runs, ten minutes, and the window becomes one commit.I am leaving the bisect at that rather than continuing to fight the Wine
dxc.exespawn failures, and I have not modified any code.Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T14:14:07Z.
Bisected. The regression is
45c809ab(#3826), "shader: lower pixel SAVEXEC lane-mask expressions".Method: built
compile_dxilat each commit with clang-cl and rantests/native_direct_mesh_check.pyunder the Windows CPython in Wine, retrying when Wine failed to spawndxc.exe(WinError 731) so a spawn flake was never counted as a verdict.Ancestral order on the main line between the last green merge and
5770f14eise3876780→45c809ab→8407fdd3→9b89e581, so the break is exactly45c809ab. I did not need to test the last two.This also settles my previous correction. I had withdrawn the claim that my Linux reproduction is comparable to the Windows job, because the test spawns
dxc.exeand CI'sDXC_BIN_DIRmight differ. It is the same host, the same stageddxc.exeand the same fixture across all three builds above — pass atf17ef459, fail at45c809ab— so the reproduction is sound and DXC parity is not a factor.Why a pixel change breaks a mesh test (hypothesis, not proven):
45c809abadds a lane-mask chain analysis (MaskChain,lane_compare,writes_pair) inGraphicsMaskRegionsinsidesrc/gfx1013_direct_graphics.inl, whichlower_graphicsshares with the mesh path. The refusal is still the export fall-through at:456, so the new analysis appears to change what the shared lowering does with an export it previously mapped. Theflatrow logic thatf17ef459added immediately before is still present at45c809ab, so that is not simply reverted.Reproduce in one command on any host with a Windows DXC:
I have not attempted a fix: the change is a large shared-code refactor by another author and my hypothesis above is unproven. Handing over the bisect result rather than a speculative patch.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T14:19:51Z.
Mechanism, from an instrumented build of the failing commit. This turns the bisect into something actionable.
What actually refuses. I printed the export target and the stage's output list at the refusal site:
So:
stage.outputsis empty, whilestage.output_signaturehas 3 rows (the fixture packsSV_Position,COLOR,TEXCOORD),src/gfx1013_direct_graphics.inl:456: thetarget >= 32loop at:450iteratesstage.outputs, finds nothing, and the special case at:469only allows an empty output list when the signature has no non-system row — here it has two.Why that is the right place to look.
stage.outputsis filled byread_guest_shader_containerfrom the native container header at offset0xc8(src/guest_shader_container.cpp:93), whilestage.output_signaturecomes from the packedOSG1chunk. The fixture builds theOSG1signature but the two lists end up disagreeing: three signature rows, zero output attributes. Whether the container header should carry those rows, or the translator should fall back to the signature whenstage.outputsis empty, is a design question I am not going to answer from here.What
45c809abdid to reach it. Its diff adds theMaskChain/lane_compare/writes_pairanalysis insideGraphicsMaskRegionsin the same file, andlower_graphicsis shared with the mesh path. I have not traced which of its hunks changes the decision for this export — that is where I would look first, and the two hunks that touchlower_graphicsare at:2397and:2765in that commit's diff.Reproduce the instrumented value by adding an
fprintfaboverefuse(pc, "unmapped graphics export")— that is all I changed, and I reverted it immediately; the tree I built from is clean.I am stopping at the mechanism: the remaining step is a judgement about which side (container header vs translator fallback) should own the outputs, and guessing it would be the same mistake as the retire-semantics patch I withdrew earlier in this work.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T14:36:55Z.
A deduction from reading the culprit's diff, which narrows where to look next.
45c809ab's only changes inlower_graphicsare SSA-side: it adds aregions.mask_opsbranch that writes a lane-mask bit at1024+pcand marks the destination pair unavailable, plus one line recording a compare's bit for later mask expressions. Neither touches exports.But the refusal we see is entirely static:
targetcomes from the instruction word,outputsandsigcome from the parsed container, and the check at:450only iteratesstage.outputs. No SSA value feeds that decision. So45c809ab's lowering change cannot directly produce this refusal for a given container.Which means the container being compiled must be different between the passing and failing builds — i.e. an earlier step in
tests/native_direct_mesh_check.pydiverges, and the integer-row case is the first place that divergence becomes fatal rather than the cause.Where to look, concretely: the test reuses one
bodybytearray and mutates it between sub-cases (body[io + 0xc8:io + 0xce] = bytes((6, 1, 0, 0, 0, 0))just before the loop), andio + 0xc8is the same offset the container parser readsstage.outputsfrom (guest_shader_container.cpp:93). So a sub-case that writes — or fails to write — those six bytes will silently change whatstage.outputscontains for a later case. That is worth checking before blaming the translator.I can test this directly by dumping the container bytes in both builds and diffing them, which is the next thing I would do; I am recording it rather than starting another build cycle right now, since the answer also depends on whether the intent is "the signature owns these rows" or "the header does", which is your call.
Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T14:50:21Z.
Correction: my bisect was wrong. The culprit is
5545de92(#3806), not45c809ab. Please disregard the culprit in my earlier comment; the evidence below supersedes it.What I got wrong. I built the candidate window from a path-filtered log and treated
45c809abas the next commit after the passing tree. It is not — the ancestry is linear and has one commit in between:5545de92also changedtests/native_direct_mesh_check.py, which is why it did not appear where I expected. I should have walked the first-parent chain instead of assuming adjacency.Verdicts, all with each tree's own test file, same host, same
dxc.exe, Wine spawn flakes retried and never counted:Since
5545de92's parent is the passing tree and it is the only commit in between, the regression is5545de92.And it fits the symptom far better than my previous answer. Its subject line is "lower literal FMAs, straight SAVEXEC and reflected POS1 in mesh" — a mesh-side change to reflected position exports, which is exactly the area that refuses here (an export row at
target=32,outputs=0,sig=3). A pixel SAVEXEC lowering was always an odd culprit for a mesh export refusal; that mismatch should have made me check the ancestry more carefully.The mechanism findings stand: the refusal is static (target from the instruction word,
outputs/sigfrom the parsed container), so the thing to compare is whatstage.outputscontains for the same container at the two trees — and5545de92is the tree to compare against, not45c809ab.I am sorry for the wrong name in the previous comment. If you have already started looking at
45c809ab, the useful part of that comment — the mechanism, offset and refusal site — is unchanged.Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T14:56:43Z.
Root-caused and fixed: PR #3861.
The translator is not involved.
5545de92moved the sibling container cases ontomesh(), which writes the attribute count atio + 0x188, but left the packed-row case on the oldpack(body + code, ...)path and deleted thestruct.pack_into('<I', body, io + 0x188, 1)line that path needed. The shared zero-filledbodythen declared no output attributes, soread_guest_shader_containerproducedstage.outputsempty against three signature rows and the export attarget 32had nothing to map.git diff e3876780 5545de92 -- src/gfx1013_direct_graphics.inl src/guest_shader_container.cppis empty, which is the direct evidence that this was a fixture bug and not a lowering one.Verified against a
compile_dxilbuilt at5770f14e: before, it aborts at the integer-row case withunmapped graphics export; after, the fixture exits 0 and both loop iterations run.For the record, the two wrong turns in this issue were mine: I first named
45c809abas the culprit by assuming adjacency in a path-filtered log, and before that I framed this as a translator regression at all. The bisect was correct about when the behaviour changed; it took reading the test diff to see that the thing that changed was the fixture.Imported from R0Y00/Xbox2Windows. Originally posted by triggered02 on 2026-12-02T15:08:12Z.
Windows is green on PR #3861:
Build and test on Windowspassed in 9m4s, alongside gfx1013 (3m50s) and the Linux Python checks (5m26s). That is the first run of this job on a tree containing the fixture fix, andnative_direct_meshno longer appears in the failures.So the sequence is: fixture bug from
5545de92-> every PR's required Windows check red -> #3861 restores the dropped attribute count -> Windows job green.For anyone with a PR currently red on this: the fix lives in #3861, not on
mainyet, so re-running your checks will not help until it merges. After that, merge currentmainand re-run.