native: read GPU-selected heap slots raw and typed in one program #3063
Closed
JB2WIN wants to merge 3 commits from
upstream-pr/3063 into cpp-migration
pull from: upstream-pr/3063
merge into: R0Y00:cpp-migration
R0Y00:main
R0Y00:codex/indirect-large-backed-views
R0Y00:codex/word3-preflight-check
R0Y00:codex/vertex-table-two-records
R0Y00:codex/live-index-alias
R0Y00:codex/copied-vertex-buffer-srv
R0Y00:codex/windows-stage-test-output
R0Y00:codex/preserve-live-srv-retirement
R0Y00:codex/share-render-target-tracking
R0Y00:codex/sgd5-negative-offset-fixture
R0Y00:coverage-dashboard
R0Y00:codex/mesh-loose-root
R0Y00:codex/mesh86-cache-padding
R0Y00:codex/xmem-scatter-preflight
R0Y00:codex/mesh-depth-ps
R0Y00:codex/indirect-dispatch-refresh
R0Y00:codex/compute-container-index
R0Y00:codex/startup-compute-formatted-load
R0Y00:codex/compute-indirect-producer
R0Y00:codex/compute-atomic-soffset
R0Y00:codex/mesh-dual-handoff
R0Y00:codex/startup-run-sh-watcher-control
R0Y00:codex/queue31-page-alias
R0Y00:codex/indexed-indirect-compute-root
R0Y00:codex/typed-buffer-view-metadata
R0Y00:codex/translated-indexed-address-alias
R0Y00:codex/fixed-mesh-create-result
R0Y00:codex/xmem-section-lease
R0Y00:codex/startup-slot86-mesh-cache
R0Y00:codex/restore-mesh-barrier-iteration
R0Y00:codex/translated-indirect-upload-index
R0Y00:codex/xapu-completion-opt-in
R0Y00:codex/translated-indexed-rect
R0Y00:codex/translated-indexed-indirect
R0Y00:codex/startup-mesh-lds-integration
R0Y00:codex/startup-console-ms24
R0Y00:codex/startup-slot57-mesh-request
R0Y00:codex/indirect-copy-provenance
R0Y00:codex/present-color-producer-trace
R0Y00:codex/compute-dispatch-binding-trace
R0Y00:codex/translated-indirect-table-buffers
R0Y00:codex/indirect-copy-provenance-base
R0Y00:codex/mix-half-literal-source
R0Y00:codex/translated-indirect-draw
R0Y00:codex/xmem-scatter-diagnostics
R0Y00:codex/slot148-recording-upload
R0Y00:codex/slot70-loading-art-verified
R0Y00:codex/command-list-upload-arena
R0Y00:codex/recover-failed-command-list
R0Y00:codex/startup-heap-timing-notes
R0Y00:codex/align-audio-input-timeline
R0Y00:codex/synthetic-depth-export-control
R0Y00:codex/startup-texture1d-on-windows
R0Y00:codex/1629-packed-position-fixture
R0Y00:codex/cpu-srv-refresh
R0Y00:codex/stream-root-srv-draw
R0Y00:codex/audio-mixer-timer
R0Y00:codex/startup-reload-published-shader
R0Y00:codex/priority-integrate-1284
R0Y00:codex/guest-sixteen-page-record
R0Y00:codex/aot-placed-dxr-batch
R0Y00:codex/guest-directory-selection
R0Y00:codex/gamesave-enumerate-read
R0Y00:codex/readme-archive-to-pixels
R0Y00:codex/pe-placed-view-draw
R0Y00:codex/archive-directory-gpu
R0Y00:codex/slot133-dxr-build
R0Y00:codex/materialize-placed-vertex-view
R0Y00:codex/dstorage-directory-offsets
R0Y00:codex/xg-nine-bc-copy
R0Y00:codex/xg-slot10-bc64-arrays
R0Y00:codex/dxr-guest-address-readback
R0Y00:codex/gpu-va-high-bits
R0Y00:codex/clarify-diagnostic-startup-scope
R0Y00:codex/xg-six-levels
R0Y00:codex/typed-derived-blend
R0Y00:codex/english-legal-text-progress
R0Y00:codex/address-bc-4ks
R0Y00:codex/dstorage-bounded-file-read
R0Y00:codex/wide-srv-offsets-menu
R0Y00:codex/startup-memory-srv
R0Y00:codex/bound-view-tail
R0Y00:codex/language-selector-readback
R0Y00:codex/setup-menu-progress
R0Y00:codex/cpu-plane-refresh
R0Y00:codex/startup-ubyte-vertex
R0Y00:codex/presenter-window-selection
R0Y00:codex/startup-uniform-buffer-lane
R0Y00:codex/intro-loop-timing
R0Y00:codex/static-clzero-loops
R0Y00:codex/document-rtx-intro
R0Y00:codex/startup-insertq
R0Y00:codex/nv12-startup-texture
R0Y00:codex/stream-stage-draw
R0Y00:codex/startup-null-uav-format
R0Y00:codex/startup-draw-capture
R0Y00:codex/shorten-windows-checks
R0Y00:codex/dstorage-rfc1950
R0Y00:codex/startup-dump-fence
R0Y00:codex/pr1135-review-base
R0Y00:codex/startup-stream-requests
R0Y00:codex/startup-chroma-view
R0Y00:codex/readme-graphics-pipeline-streams
R0Y00:codex/static-crt-free-tls
R0Y00:codex/arc-140t-rtx-5080-laptop-gpu-reports
R0Y00:codex/main-startup-progress-entry
R0Y00:codex/signed-dxil-catalogue
R0Y00:codex/reloc-free-preferred-base
R0Y00:codex/quad-dpp-bit-mask
R0Y00:codex/raw-srv-bounds
R0Y00:codex/rx9070-31044-hardware-report
R0Y00:codex/gpu-page-source-provenance
R0Y00:codex/runtime-placeholder-interior
R0Y00:codex/gpu-copy-queue-tile-order
R0Y00:codex/pe-pin-external-providers
R0Y00:codex/xmem-placeholder-reservations
R0Y00:codex/xmem-shared-physical-pages
R0Y00:codex/pe-package-startup
R0Y00:codex/xmem-tools-memory-query
R0Y00:codex/cpu-stack-output-import
R0Y00:codex/pe-load-security-cookie
R0Y00:codex/record-three-bvh-retests
R0Y00:codex/cpu-rbp-frame-anchor
R0Y00:codex/xmem-default-startup
R0Y00:codex/record-rtx-3050-ti-9597
R0Y00:codex/docs-readme-start-here
R0Y00:codex/check-compute-mad24-truncation
R0Y00:codex/docs-discord-community
R0Y00:codex/bound-rcx-branch-mutants
R0Y00:codex/rtx5060ti-bvh-62114
R0Y00:codex/837-neutral-readme-disclaimer
R0Y00:codex/record-rtx-3070-ti
R0Y00:codex/title-neutral-public-wording
R0Y00:codex/exe-shadow-frame-submissions
R0Y00:codex/exe-shadow-runtime-chain
R0Y00:codex/readme-polish
R0Y00:codex/gpu-coverage-nov23
R0Y00:codex/spirv-minlod
R0Y00:codex/shadow-shim-device
R0Y00:codex/exe-two-shadow-frames
R0Y00:codex/shim-dispatch-cleanup
R0Y00:codex/fix-spirv-cache-probe
R0Y00:codex/sampler-use
R0Y00:codex/ballot-bit-extract
R0Y00:codex/packed-fma-release
R0Y00:codex/cpu-packed-fma-o2
R0Y00:codex/publish-coverage-dashboard
R0Y00:codex/mesh-cbv-binding-order
R0Y00:codex/spirv-window-fixture
R0Y00:codex/ps-e32-float-uint
R0Y00:codex/ps-cbuffer-reads
R0Y00:codex/fixed-profile-rescan
R0Y00:codex/shim-compute-integration
R0Y00:codex/readme-visible-coverage
R0Y00:codex/readme-research-navigation
R0Y00:codex/integrate-pr-256
R0Y00:codex/indexed-mesh
R0Y00:codex/sampled-coverage
R0Y00:codex/first-ms
R0Y00:codex/dual-ps
R0Y00:codex/ps-attribute
R0Y00:codex/compute-first
R0Y00:codex/ps-export
R0Y00:codex/readme-research-status
R0Y00:codex/ps-layout
R0Y00:codex/blast-window
R0Y00:codex/chart-caption
R0Y00:codex/reviewer-roles
R0Y00:codex/blast-aot
R0Y00:codex/archive-program
R0Y00:codex/crc-stream-program
R0Y00:codex/exe-image-data-chain
R0Y00:codex/local-cpu-fixture-coverage
R0Y00:codex/exe-bound-frame-chain
R0Y00:codex/exe-mapped-comparison
R0Y00:codex/contribution-dependencies
R0Y00:codex/exe-entry-aot
R0Y00:codex/bink-frame-heap-integration
R0Y00:docs/hardware-seven-reports
R0Y00:codex/bink-custom-heap
R0Y00:codex/bink-heap-callers
R0Y00:codex/discussions-entry-points
R0Y00:codex/gpu-community-batch-64
R0Y00:codex/ffx-scratch-writers
R0Y00:codex/generic-project-documentation
R0Y00:codex/ffx-dispatch-rcas
R0Y00:codex/four-windows-gpu-reports
R0Y00:codex/title-neutral-project-wording
R0Y00:codex/community-coverage-provenance
R0Y00:codex/rcas-packed-texels
R0Y00:codex/community-gpu-retests
R0Y00:codex/community-build-and-gpu-reports
R0Y00:codex/ffx-provider-loop
R0Y00:codex/ffx-recurrent-views
R0Y00:codex/ffx-recurrent-resource
R0Y00:codex/amd-wave64-reports
R0Y00:codex/ffx-backend-slots
R0Y00:codex/upscaler-device-init
R0Y00:codex/ffx-context-lifecycle
R0Y00:codex/ffx-version-query
R0Y00:codex/ffx-provider-contract
R0Y00:codex/typed-object-callback
R0Y00:codex/cpu-ordinal-import
R0Y00:codex/chained-cpu-ranges
R0Y00:codex/cpu-import-call
R0Y00:codex/cpu-direct-call
R0Y00:codex/cpu-leaf-aot
R0Y00:codex/community-project-status
R0Y00:codex/script-state-path-replay
R0Y00:codex/script-state-evidence
R0Y00:codex/bc7-resident-tail
R0Y00:codex/bcpack-mip-tail
R0Y00:codex/bc7-texture-draw
R0Y00:codex/asset-ranges
R0Y00:codex/pixel-constants
R0Y00:codex/pixel-aot
R0Y00:codex/pre-exe-workloads
R0Y00:codex/root-signature-device-coverage
R0Y00:engineering/packed-bvh-leaves
R0Y00:engineering/bvh-build-and-update
R0Y00:engineering/intake-root-roundtrip
R0Y00:community/gpu-check-release
R0Y00:community/english-contributor-entry
No reviewers
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!3063
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3063"
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 JB2WIN on 2026-11-27T13:21:44Z.
Change
Target branch
cpp-migration. Refs #3023. Follow-up to #3042 (merged asa0f67731).Programs that read some GPU-selected heap slots raw and others with a one-channel typed load were refused under both heap view contracts:
raw_bufferrefuses the typed load ("a GPU-selected heap slot is read as a raw buffer SRV only"),typed_dwordthe raw load ("… read as a typed dword buffer SRV only"). This adds a third contract class for that mixed case.src/gfx1013_compute_native.h:HeapViewContract::raw_and_typed_dword, with its caller guarantee in the comment. The old clause "a program with two heap loads from different selectors is outside what one captured selection covers" is replaced by an explicit limit for every contract.src/gfx1013_direct_compute.inl,heap_resource: under the new contract the kind of each heap load picks the path.buffer_load_format_*(typed_buffer_srv) follows thetyped_dwordrules, including the one-channel limit. Every other kind,tbuffer_load_format_*through a plain or rewritten descriptor included, follows theraw_bufferrules: raw handle, byte windows and the loop guard. One line of logic changed; refusal texts are unchanged.src/gfx1013_compute_native.cpp: the byte-address rewrite of a heap descriptor is tracked underraw_bufferandraw_and_typed_dword.src/direct_compute_cache.cpp: cache identity/heap-view/raw_and_typed_dword.src/startup_stubs/native_global_srv.h:.viewsgains zero or morealso <slot> <type>lines, each a further selection of the same dispatch. Selector word k is selection k (select/needfirst). The header stays version 2; an older decoder refuses such a file withunknown line 'also'.slot N selected with two view types).refuse_global_srv_selections()checks every selection in order.global_srv_contract()returnsraw_and_typed_dwordwhen raw and typed selections are both present.tools/startup/compile_dxil.cpp: maps the contract with aswitchand uses the plural check at both sites. The report line gainsalso=<slot>:<type>.tests/native_global_srv_heap_replay.cpp:record … [--also SELECTOR TYPE]writes selector word 1.N+Mreference in replay).type_from_argumenthelper is shared by--needand--also.Why this step: on a local start-up capture (
compile_dxil --refusals, 2,689 slot 67 requests, counts only), 895 of the 906 programs with a typed heap load also read another heap slot raw. With this contract forced by an uncommitted switch, compiled requests go from 392 to 397. The others now stop at general refusals: 717unbound numeric SGPR sN, 460direct indexed descriptor load shape, 291direct descriptor address outside bound table. That is an upper bound for what translation allows. No runtime producesalsolines or binds heap slots under a contract yet; that is stage 3 of #3023.Verification
Environment: Windows 11 build 26200, NVIDIA GeForce RTX 3080 (driver 32.0.16.2124), MSVC 14.51.36231, Windows SDK 10.0.26100 DXC. Base
cpp-migrationa0f67731.native_global_srv_heap_replay_hardware: passed, 196 assertions (122 before), 12.5 s (11.25 s before). New section 11 uses a source-built mixed program: two selector words, a rawbuffer_load_dwordthrough one heap descriptor and abuffer_load_format_x idxenthrough another, with the sum stored..viewshasalso 3 typed_buffer.compile_dxil --requestswith a fresh frontend cache: compiled withfrontend_cache_hit=0, then=1with the same.cso..cso: the mixed program under the raw-only and the typed-only.views;alsowith a texture, wrong type, unknown slot, unreadable line, or a trailing field; a slot named with two types (the selected slot and analsoslot); a secondalsoof another type than its slot; a texture secondalso; a missingdwordline; a two-channel typed load.also, analsonaming the selected slot again with the same type, the samealsotwice, a byte window bybuffer_load_dword, one bytbuffer_load_format_x, and atbuffer_load_format_xthrough a plain heap descriptor.compile_dxiland the fixture built ata0f67731passes the 122 earlier assertions and fails at the first mixed record (the old fixture has no--also).compile_dxilrefuses a mixed.viewswithunknown line 'also'; the new one compiles it.typedset to false): the first mixed record fails.native_cvt_pk_u8_hardware,native_sdwa_f16_ir,native_sdwa_f16_hardware).compile_dxil --refusalson the local capture without a contract: identical to the base.Evidence and follow-up
clang -cc1as -triple amdgcn-amd-amdhsa -target-cpu gfx1013 -show-encoding); fixtures are source-built.docs/experiments/native-global-srv-heap-replay.md):raw_bufferconditions for every slot a raw load can select, and thetyped_dwordconditions for every slot a typed load can select.tbuffercounts as raw.Checklist
AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T13:27:33Z.
Thanks for documenting the dependency on #3042. New translator PRs target
main, but changing this base today would pull #3034 and #3042 into the same diff. Atmainff04a75e, the typed-dword heap contract from #3042 is still absent. Please leave the base here while those prerequisites are carried tomainin order, then we can retarget this PR and verify the mixed raw/typed fixture against the new base. The pending runtime capture work stays tracked in #3023.Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-27T13:28:38Z.
Understood, leaving the base on
cpp-migration. Once #3034 and #3042 are onmain, I will retarget, rebase and rerun the mixed raw/typed fixture (native_global_srv_heap_replay_hardware) plus the regression set against the new base, and report the results here.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-27T17:27:51Z.
Thanks, the contract split by load kind reads cleanly, and the limits are written down. I checked this from Linux
only: a header harness over
native_global_srv.hwith mutants, llvm-mc over the new words, and the affected Pythonchecks on the head and on a merge with current
main(clean, all pass). I did not run the GPU fixture.Duplicate slots vs selector-word order. Selection k is selector word k, but the decoder refuses a slot named
twice even with the same type, and the doc says "a producer deduplicates". A dispatch whose two words pick the
same raw slot then has no valid
.views. Deduplicating drops word 1, andreplaywrites 0 there, so it replays adifferent selection.
recordwrites such a file without complaint: its in-memory request passesrefuse_global_srv_selections, anddecode_global_srv_requestrefuses what it wrote ("duplicate selected slot0"). Could the decoder accept a repeated slot when the type is the same (and refuse only a slot named with two
types)? Or could the doc say the capture refuses such a dispatch, with
recordrefusing it too?Untested rules. With
native_global_srv.hmutated, each of the following still gives the same outcome onevery
.viewsthat section 11 feeds the decoder:alsolines;refuse_global_srv_selectionsorglobal_srv_contractchecking only the firstalso.Four negatives would pin them:
also 0 raw_buffer, a secondalso 3 typed_buffer,also 2 raw_bufferas thesecond
also, andalso 2 textureas the secondalso.Coverage note. PR CI builds the
prpreset, which does not include this fixture, and the_warpvariantskips by design. So the green checks don't execute section 11. Could you add the head commit you tested and the
debug-layer status to the GPU report?
Small items.
gfx1013_direct_compute.inlnames two contracts.typed_dwordalso admitsthe heap descriptor load and reaches that refusal.
--alsoselector throws before thetry(exit 3 under MSVC); returning 2 would match the usage path.alsoline accepts trailing fields.This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-27T22:47:05Z.
Thanks. Working on all four points now; update with a new commit soon.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-27T22:54:02Z.
Done in
64513f26.recordoutput now always decodes. New raw+raw case:record --also 0 raw_buffer, compile,replay 0+0matches,replay 0+1mismatches.also 2 raw_buffer(selection refusal), secondalso 2 texture(contract refusal),also 0 typed_bufferandalso 3 raw_bufferafteralso 3 typed_buffer(two types). Positives:also 0 raw_buffer, secondalso 3 typed_buffer. Mutation check:refuse_global_srv_selectionsstopping after the firstalsofails the second-alsocase.64513f26, RTX 3080 (driver 32.0.16.2124),native_global_srv_heap_replay_hardware196 checks pass, 12.5 s. Debug layer not enabled in the fixture. Regression (native_|startup_compute_dispatch|compute_heap): 147 tests, the same 3 failures as the base.--alsoselector returns 2;alsowith trailing fields is unreadable.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T23:17:19Z.
Review: COMMENTED
Independently tested
64513f26oncpp-migrationa0f67731(clean trial tree80c5c815). I builtcompile_dxil native_global_srv_heap_replayand ranctest --test-dir <build> --no-tests=error -j1 -V -R '^native_global_srv_heap_replay_(warp|hardware)$'in Debug and Release /O2. Each build passed all 196 assertions on RTX 4060 Laptop (driver 32.0.16.1656, Windows 11 26200.9974, debug layer off). Inbox WARP 10.0.26100.9818 returned 77 for lack of wave32. The repeated0+0selector round-trips,0+1gives the required mismatch, and the secondalsoand conflicting-type controls refuse. Please update the old duplicate-slot wording in the PR body to reflect the new same-type behavior. Thetyped_dwordcontract still lives on the migration branch, so the previously agreed #3034/#3042 port order still determines when this can targetmain.Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T23:18:11Z.
Review: APPROVED
Independently reviewed
64513f26integrated overcpp-migrationa0f67731(tree80c5c815), the PR's base. The merge is clean andgit diff --cached --check origin/cpp-migrationis clean.What I traced.
native_global_srv.h, selection 0 isselect/needand selection k is the k-thalsoline, in file order..views.refuse_global_srv_selectionschecks every selection, and the first refusal wins.global_srv_contractreturnsraw_and_typed_dwordonly when at least one selection is raw and one is typed. Every captured typed slot must still be a one-channel 32-bit buffer.heap_resource,raw_and_typed_dwordtakes the typed path only fortyped_buffer_srvloads. Every other kind stays raw, and the byte-window tracking applies as underraw_buffer.JohnConnorNPC's findings, checked at this head.
--also 0 raw_buffer, decodes and compiles.mismatch word 0: got 0x40000000 expected 0x50000000 (reference slot 0+1).--alsoselector exits 2.alsoline with a trailing field is refused.What I ran. I built
native_global_srv_heap_replay compile_dxilindevandrelease, then ran:native_global_srv_heap_replay_hardwarepasses in Debug and Release/O2on the RTX 5090 ("all checks passed", about 11 s). The output includesmixed_also_same_slot,mixed_also_twiceand "record with a non-numeric --also selector exits 2".native_global_srv_heap_replay_warpreports a capability skip (77) in both presets, by design.ctest --test-dir out/build/dev --no-tests=error -j 1 -R '(native_|startup_compute_dispatch|compute_heap)'. 147 tests in Debug.native_comparison_pso_warp,native_heap_handle_probe_warp,native_global_srv_heap_replay_warpandstartup_compute_dispatch_native_warp.native_cvt_pk_u8_hardware,native_sdwa_f16_irandnative_sdwa_f16_hardware. All three also fail oncpp-migrationa0f67731built alone, so they come from the base, not from this PR.Mutants in
src/startup_stubs/native_global_srv.h. Each was applied alone, the targets rebuilt indev, the_hardwaretest run, and the source restored afterwards (git diff --quietclean).mixed_also_same_slot: refused instead of compiledmixed_two_types: not refused with "slot 0 selected with two view types"select/needmixed_two_types_also: not refused with "slot 3 selected with two view types"refuse_global_srv_selectionschecks only the firstalsomixed_second_also_wrong_type: not refused with "slot 2 has view type texture"global_srv_contractchecks only the firstalsomixed_second_also_texture: not refused with "view type texture is not raw_buffer or typed_buffer"alsoline acceptedmixed_trailing_field: not refused with "unreadable also line"Verdict: approve on
64513f26. The base iscpp-migration, so this is a review only. I am not merging, and R0Y00's plan to retarget after #3034 and #3042 reachmainstands.Environment: NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and WARP, Windows 11 25H2 build 26200.9974, MSVC 19.52.37029; the debug layer is off in the fixture.
CI:
Build and test on Windows,Assemble and translate gfx1013 fixturesandRun platform-independent Python checks on Linuxpass on64513f26.This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-28T00:20:38Z.
I tested a clean local trial of
64513f26on a main-based stack:7fcde81f, #3034 as6fb2316c(now #3232), #3042 as43312821, then both #3063 commits throughd484785f. The carry keeps main’s raw-address CPU-reference cases and the optional expected-word input to the replay tool.Release on Windows 11 26300.10075, DXC 1.9.2602.17, RTX 4070 (32.0.16.2124) and app-local WARP 1.0.22 with Agility 1.620.2:
All four tests passed. Each heap replay emitted 217 passing assertions including the raw+typed selections 0+3 and 1+3, repeated 0+0, cold/warm identical DXIL, and the metadata refusals. On both adapters, the deliberate 0+1 reference for the 0+0 dispatch failed at word 0 (0x40000000 vs 0x50000000). This verifies the source-built compiler/replay stack on a main-based tree. The live heap contract remains tracked in #3023.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T08:05:29Z.
Thanks for the quick turnaround on
64513f26. All four points from my earlier comment are addressed, and I think this is ready to merge intocpp-migration. It is a fast-forward there:git rev-list --count 64513f26..a0f67731→0. I found nothing blocking, only one body fix and three small notes.It can't target
mainyet.git merge-tree --write-tree --name-only 1f07b2c1 64513f26exits 1 with 6 conflicting files. The basea0f67731already conflicts in 5 of them, and this PR addssrc/gfx1013_compute_native.cpp. #3232 (the #3034 port) is open with changes requested, and no #3042 port is open yet.Should fix: the duplicate-slot wording that R0Y00 asked to update on the review is still in the body ("The decoder refuses a slot named twice, even with the same type"). GraphQL
lastEditedAtis stillnull. The body's counts are also behind the doc: "174 assertions", "Nine compile refusals" and "Four compile-only cases", where the doc now says 196 assertions, thirteen refusals and six compile-only cases.Notes, none blocking:
src/startup_stubs/native_global_srv.hsays the dispatch is refused "when the selected slot holds another type than the one the shader reads". Underraw_and_typed_dword, each word's type comes from the capture (need/also), not from the shader. From reading the code (not run),select 3 need typed_bufferwithalso 0 raw_bufferon the MIXED program passes the guard, and the typed view is then read through the raw handle. TheHeapViewContractcomment and the doc's Limits already call this a caller guarantee. One sentence in the header saying the guard is necessary but not sufficient would match them.return raw ? GlobalSrvContract::raw_and_typed_dword : GlobalSrvContract::typed_dwordor for the new/heap-view/raw_and_typed_dwordcache-identity line. From reading the code, section 10's typed refusals andmixed_raw_views/mixed_typed_viewsshould catch both, but that is not measured.otherrefusal insrc/gfx1013_direct_compute.inl, "is not raw_buffer; only raw buffer heap reads are translated", has been out of date since #3042 addedtyped_dword.Opcodes: the diff adds no DXIL op (
grep -cE '^\+.*(dx\.op|createHandleFromHeap|annotateHandle)'→0). Loads reuseraw ? 139 : 68, and handles reuse kinds 11 and 10 (5 + 1 * 256), chosen per instruction.llvm-mc-19 --disassemble -mcpu=gfx1013of the MIXED words matches each comment (LLVM 19 prints the zero SMEM offset asnull). CI's Windows job ranctest --preset pr(100% tests passed out of 41) with nonative_global_srvtest. So section 11 rests on the GPU runs posted here: RTX 3080, RTX 4060 Laptop and RTX 5090 on this base, and RTX 4070 plus WARP on a main-based stack. The three runs that report the debug layer had it off.This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-28T14:32:24Z.
Thanks. Done:
2534937aadds the sentence to the top ofnative_global_srv.h(comment only).otherrefusal text predates this PR and would be its own small change.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-28T23:51:14Z.
Carried to
mainin #3415, stacked on #3409 (which brings #3034 and #3042 over, taking over #3232).AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-29T09:33:21Z.
Closing: the same three commits reached
mainthrough #3415 (merged as1341bd6b). AI-assisted.Pull request closed