runtime: bind table buffers, 2D texture inputs and texture outputs on the in-process compute route #2993
Closed
Leyukaka wants to merge 7 commits from
upstream-pr/2993 into main
pull from: upstream-pr/2993
merge into: R0Y00:main
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!2993
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2993"
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-11-27T03:30:41Z.
Part 2 of #2974 (step 3). It also covers
half4_texture_uav, beyond the issue's list, because the offline formatter pairs it withtexture_uav. Part of #2935. Target branchmain. Builds on #2975: this branch contains its commits, so please merge #2975 first; I will rebase afterwards.Change (
src/startup_stubs/d3d12_compute_dispatch.inl):translate_compute_natively, the in-process route of #2958 (X2W_NATIVE_SHADERS), bound onlyraw_vector_srvandraw_buffer_uav. It now also fills theComputeTranslationslots that the manifest reader fills for these kinds:buffer_srvsrv N buf table P OFFtexture_srvsrv N tex2d table P OFFtexture_uav,half4_texture_uavuav N tex1d/tex2d/tex2da/tex3d float table P OFF channels 4format_compute_runtime_manifestuses, so both routes use the same slot for these kinds. The in-process route stays narrower: no samplers, nobyte_window_srv, and array count 1 for every view.byte_window_srv, which the offline formatter also writes assrv N buf table. It can follow if wanted.Tests. The setup was Windows 11 with an NVIDIA GeForce RTX 5080 and DXC from the Windows SDK 10.0.26100, on #2975 (
e18549ca) plus this commit.startup_compute_dispatch_native_hardwarepassed with a new case: a scalar buffer read (buffer_srv) and a 2D image load (texture_srv) feed a 3D image store (texture_uav). The whole volume matches a CPU reference. The consumer gains atexture-volume-native-inputsmode that provides the buffer descriptor and the 2D SRV token.image_sample_lzin place of the load adds a sampler, is refused with "not translated natively: a sampler, ..." and leaves the volume untouched.startup_compute_dispatch_native_warpexits 77 as before: WARP has no 32-lane waves, and the new case checks the refusal by that name with the volume untouched.startup_compute_dispatch_texture_hardwareand_warpstill pass.half4_texture_uavand the 1D, 2D and 2D-array outputs. They share the slot code with the 3D case. The code comment anddocs/startup-runtime.mdno longer limit the route to the kinds a fixture has run through.Mutation checks, run by hand; each fails the hardware check:
buffer_srvunbound (the buffer holds a value the store fixture never writes);texture_srvunbound;AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T04:15:43Z.
Review: COMMENTED
Good extension of the in-process compute route — the unified UAV dimension dispatch table, the manifest parsing unification (
%15sformat), and the wave-32 capability tracking are all clean.Findings
✅ What works well
format_compute_runtime_manifestswitch: Replacing theimage_dimension == 1 || image_dimension == 5guard with aswitchover 0/1/2/5 mapping totex1d/tex2d/tex3d/tex2dageneralizes cleanly to all existing dimensions. Thedefault: return std::nulloptcatches unsupported values.%15scaptures the dimension name string for all UAV types, thenuav_dimension()lambda maps it. This replaces two separatesscanfpatterns with one — a real simplification.ComputeTranslation::uavsfield rename:bool array→D3D12_UAV_DIMENSION uav_dimensionis a meaningful upgrade: the old code only expressed "is this 2D array?", but the new code carries the full dimension enum, which is exactly whatCreateUnorderedAccessViewneeds.volume_uav_range_errorhelper: Validatesview.MipSlice < resource.MipLevelsandFirstWSlice/WSizeagainst the mip slice depth. The(std::max)(1u, UINT{depth} >> (std::min)(view.MipSlice, 15u))depth computation matches D3D12 mip level math.adapter_32_lane_waves()checksD3D12_FEATURE_D3D12_OPTIONS1.WaveOps,WaveLaneCountMinandWaveLaneCountMax— correct. The return values (-1 for query fail, 0 for no 32-lane, 1 for yes) cleanly propagate into the refusal message.startup-runtime.md: Accurately reflects the expanded set:buffer_srv,raw_vector_srv,raw_buffer_uav,texture_srv(1D/2D),texture_uav/half4_texture_uav(1D/2D/2D-array/3D).⚠️ Issues / observations
uav_dimension()lambda scope: The lambda is defined insideload_compute_translationand captures nothing. It usesstd::strcmpwhich is available via<cstring>. The lambda is called immediately after definition, so its scope is fine. However, consider whether this would benefit from being astatichelper or a member function ofComputeTranslationif the pattern is reused for SRV dimension lookup (which currently usessscanf("srv %u tex2d table ...")with a hardcoded "tex2d" string).Mip slice depth computation:
(std::max)(1u, UINT{resource.DepthOrArraySize} >> (std::min)(view.MipSlice, 15u))— the>> (std::min)(view.MipSlice, 15u)handlesMipSlice >= 16by capping the shift at 15, which gives depth=1 for very large mip slices. This prevents undefined behavior from shifting by ≥32 bits. Good defensive code.volume_uav_range_errorreturn for WSize == 0: Whenview.WSize == 0, the condition!view.WSizetriggers early return with a non-null error. This means "WSize must be nonzero" is enforced. Is this the intended behavior, or should 0 mean "full extent" (matching D3D12 semantics whereD3D12_TEX3D_UAV::WSizeof 0 means the full remaining depth)? If 0 should mean full, the check needs adjustment. If 0 is intentionally refused, add a comment explaining why.half4_texture_uavslot code sharing: The PR mentions thathalf4_texture_uavshares slot code withtexture_uavin the formatter. The switch informat_compute_runtime_manifestmapshalf4_texture_uavto the sametex*strings astexture_uav. This is correct if both kinds produce the same UAV dimension values at runtime. Verify thathalf4_texture_uavindeed setsimage_dimensionto one of 0/1/2/5 and not a distinct value.CMake
texture_native_argsvariable: Theunset(texture_native_args)before the conditional is good practice to avoid leaking from previous test definitions. However, ifcompile_dxilor its DLLs are not found,${texture_native_args}is empty but the variable still exists (as empty).${adapter} ${texture_native_args}would expand to just${adapter}— correct, but consider usingif(texture_native_args)in the nextadd_testcall for clarity.Recommendation
With the one important question around
WSize == 0semantics (item 3), this is ready to land. Otherwise well-structured and well-tested.🏷 Long-term: if the in-process route expands further (samplers, byte_window_srv, typed views), consider whether the refusal message pattern (
"not translated natively: ...") could be generalized into a dedicated error classification instead of accumulating string literals.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T04:29:14Z.
Thanks for the review. On item 3: refusing
WSize == 0is intended.WSizecounts depth slices, and~0umeans all slices fromFirstWSlice. A view withWSize == 0selects no slice, so a guest store through it has no slice to land in.WSize == 0yet; the bad-W control uses a range past the mip. I can add aWSize == 0control if you want one.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T05:05:53Z.
Review: COMMENTED
Independent Release
/O2run at917c124dfa3ee0c6ce735286ffc1617dec851b01, on Windows 11 build 26200.9974 with SDK 10.0.26100. The RTX 4060 Laptop (32.0.16.1656) passedstartup_compute_dispatch_native_hardware: the scalar table buffer and 2D SRV fed the 3D output and all 6,144 words matched, with the sampler refusal control and no debug-layer error. Bothstartup_compute_dispatch_texture_*entries passed.startup_compute_dispatch_native_warpfailed with consumer exit 2173, not a capability skip, on WARP 10.0.26100.9818. I reproduced it running onlytable_views: with the D3D12 debug layer enabled, the last log is creation of the 1×1 input resource and the child exits before the expected no-wave refusal. With the layer disabled, both isolated refusal cases complete. Please preserve the debug-layer path and investigate the input view setup before treating WARP as 77. Git confirms #2975e18549cais an ancestor of this head; please land it first and retest this PR after rebasing.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T05:13:19Z.
Review: COMMENTED
Follow-up on
917c124d. Independent Debug (dev, embedded/Z7to work around the local PDB toolchain) reproduced the Release result: texture/WARP and both hardware entries passed, while native/WARP exited 2173. A direct descriptor query measured CBV/SRV/UAV increments of 64 bytes on this WARP versus 32 on the RTX 4060 Laptop. The new consumer writes the input SRV at fixedcpu + 32. In a local fixture-only probe, using slot 15's increment for the two descriptor creation handles changed Release native/WARP from failure to the expected 77, with the debug layer still enabled. Separately, I setTexture3D.WSize=0in the native volume fixture on RTX: native translation succeeded, Dispatch refused, and all 6,144 words retained their sentinels. Please carry both cases into the fixture. The in-process 1D and 2D-array descriptor paths and half4 output still lack direct readback. Targeted cases for those branches matter more than duplicating the full dimension/format matrix; published/offline coverage does not exercise their native binding path.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-27T05:29:32Z.
Thanks for finding the stride. Both cases and the targeted readbacks are in the new commit.
Descriptor increment. The fixture now queries the CBV/SRV/UAV increment (device slot 15) and creates the SRV and UAV at
cpu + 1 * incrementandcpu + 2 * increment.X2W_D3D12_DEBUGstays set for every case; no debug-layer code changed.New cases in
startup_compute_dispatch_native_check.py, against a CPU reference or the untouched sentinels:Texture3D.WSize = 0On adapters without 32-lane waves, each case checks the no-wave refusal with the output untouched.
Results. The setup was Windows 11 with an RTX 5080 and DXC from the Windows SDK 10.0.26100.
nativepassed with all new cases;texturepassed.nativeexits 77 after the refusals;texturepassed.WSize == 0;half4_texture_uavunbound.Order agreed: #2975 first, then I will rebase this PR and retest.
AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by KelboLive on 2026-11-27T05:39:51Z.
Review: COMMENTED
What works
bind buffer_srv, texture_srv (2D), texture_uav (1D, 2D, 2D-array,
3D) alongside the existing raw_vector_srv and raw_buffer_uav.
The manifest formatter correctly maps image_dimension values to tex1d
/tex2d/tex2da/tex3d output keywords in direct_compute_cache.cpp.
MipLevels and W range against depth -- the first 16-refusal path will
log proper reasons instead of silent failures.
1D UAV mip slice check at slot 19 add consistency between creation and
dispatch refusal paths.
test now passes compile_dxil and DXC bin dir as extra args when
available.
Issues
ComputeTranslationstruct changes:arraymember renamed touav_dimensionwith typeD3D12_UAV_DIMENSION. The oldarrayflagfor 2D-array was used in specific paths. This rename should be verified
against all callers -- the diff doesn't show every reference.
#2975; reviewers should review #2975 first or be aware of that
dependency).
volume_uav_range_error()for 3D usesresource.DepthOrArraySizeshifted by the mip slice, but for 3D resources the mip slice can go
up to 15 (the
(std::min)(view.MipSlice, 15u)handles that).This is correct. However, the
~0ucase for WSize means 'full depthminus first_w_slice' -- this is the standard default in most UAV
descs and is handled correctly.
Recommendations
arrayfield ind3d12_compute_dispatch.inl were migrated to the uav_dimension field.
the view creation (slot 19) path.
Overall
Well-scoped expansion of the native compute route with proper manifest
mapping and refusal reasons. The 3D UAV range validation is correct.
Approvable after verifying the array->uav_dimension migration.
Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T05:42:41Z.
Review: APPROVED
Reviewed
a5d118336bc18f44eb5d2bc8ae8f253bebd5bd91. Exact-head Debug and Release/O2runs ofctest --preset <dev|release> --no-tests=error -V -R '^startup_compute_dispatch_(texture|native)_(warp|hardware)$'each gave 3 passes and one explicit WARP capability skip (77). Windows 11 26200.9974, SDK 10.0.26100, Microsoft WARP 10.0.26100.9818 and RTX 4060 Laptop 32.0.16.1656. The debug layer stayed enabled. WARP now reaches the wave32 refusal with sentinels intact. RTX matched all words for the table-buffer/2D-SRV-fed 3D store, 128 values for 1D, 6,144 for the 2D array, and 1,024 half values for the packed D16 case. The sampler and WSize=0 controls left the volume unchanged. The packed-table path on wider heaps is covered by WARP descriptor creation and portable dispatch; a native wide-increment success run is still unavailable. #2975e18549caremains an ancestor. Please land it first, then rebase #2993 and rerun the focused suite before merging.Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-27T11:19:01Z.
Retargeted to main. The current head is stacked on #2975. It merged cleanly on top of my local #2975/main integration, and the synthetic Debug dispatch and root-SRV regressions gave five passes and one WARP capability skip. #3049 now carries both changes on main. Please coordinate there before rebasing this branch separately. Keep the WSize=0 sentinel check, 1D/2D-array/D16 readbacks and the WARP capability result when comparing candidates.
Imported from R0Y00/Xbox2Windows. Originally posted by sydney-0o on 2026-11-27T11:29:18Z.
I opened PR #3049 on
mainwith the remaining #2975 manifest work and the in-process bindings from this PR. The empty-cache native dispatch fixture passed on a GTX 1080 Ti with app-local Agility SDK 1.620.2, including mixed buffer/2D texture inputs, 1D/2D-array/3D stores, the packed-half store and the zero-W and sampler refusal controls. The original commits retain your authorship.Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T07:34:12Z.
Thanks for the fix round. On
a5d11833the descriptor increment, the WSize=0 refusal and the 1D/2D-array/half4 readbacks are all in, and the head has an approval. A few things are left before it can land:git merge-tree --write-tree origin/main a5d11833(main atc3204a9c) exits 1 with conflicts insrc/startup_stubs/d3d12_compute_dispatch.inl,tests/startup_compute_dispatch_texture_check.pyandtests/startup_stream_consumer.cpp.gh pr view 2975 --json mergeablereturnsCONFLICTINGfor the base too. The maintainer asked for coordination in #3049 before this branch is rebased on its own. The rebase has to keep both sides of the native-route hunks: main'sstride_srvs(#3227) andexact_texture_uav_channels(#3243), plus this PR's 4-channel/half4 kinds and its 0/1/2/5 dimension switch.src/direct_compute_cache.cpp, the newtexture_uav/half4_texture_uavswitch ends indefault: return std::nullopt;(git show <merged tree>:src/direct_compute_cache.cpp | grep -n 'default: return std::nullopt'→832). On main that branch returnsrefuse(view_shape("UAV", b)), which #3268 (a166a753) added. After the merge, dimensions 3/4/6/7 are still refused but no longer say why. Suggested:default: return refuse(view_shape("UAV", b));. #3049 has the same line (773) and doesn't include #3268 yet (git merge-base --is-ancestor a166a753 1356e232→ false).ctest --preset pr(100% tests passed out of 40).grep -con its log gives 0 for bothstartup_compute_dispatch_nativeandstartup_compute_dispatch_texture, so all the results so far come from hardware runs. After the rebase, could you rerun the focused suite? Could you also add mutants for the dimension 0 →TEXTURE1Dmapping and for thetexture_srv && image_dimension == 1restriction?docs/experiments/startup-compute-native-dispatch.mdstill says "Accepted: root constants, a raw table buffer loaded per lane and a raw table buffer stored to" and "a texture, a sampler and the typed, half and indexed views are refused". The PR only editsdocs/startup-runtime.md(git diff --name-only main...a5d11833 -- docs).texture_srvwithimage_dimension != 1and for texture outputs at dimension 3/4/6/7 would pin down the new refusals.This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T09:17:47Z.
Merged the updated #2975 branch (
8364ecd1, which carriesmaina99e05f4) into this branch; new headd36d56c2. A merge rather than a rebase, so the approved commits stay as they are and only the resolution is new (git show --remerge-diff d36d56c2). The approval is ona5d11833, so the new head needs a re-review.Conflicts (
mainnow binds 2D texture inputs, constant samplers, cbv-windowbuffer_srvand exact-width outputs natively):src/startup_stubs/d3d12_compute_dispatch.inl: kept main's binding loop; itsvolumecase (texture_uav, 3D only) is replaced by our 1D/2D/2D-array/3D switch fortexture_uavandhalf4_texture_uav. Our separatesupportedcheck is dropped: main'saccepts_cbv_windowalready takesbuffer_srv.tests/startup_compute_dispatch_native_check.py: kept main's step 5 (constant samplers); ours are now steps 6 (table views) and 7 (texture outputs), built on main'sV.program/V.group/V.VALUES. Our sampler control is dropped: main translates constant samplers, and its memory-sampler case covers the refusal.tests/startup_stream_consumer.cpp: main's modes plus ourzero_w/native_inputs. The heap istable_slot + views(views = dual ? 5 : 4); the second mip view goes tocpu + 4 * incrementand the sampled SRV copy totable_cpu + 32, which are main's addresses at a 32-byte increment.docs/startup-runtime.md: main's paragraph plusbuffer_srvand the four-channel float UAV sentence; "a scalar buffer load" is removed from the refused list.Tests on
d36d56c2, 21 selected, 0 failed:startup_compute_dispatch_native_hardwarepasses (table views match and the zero WSize control leaves the volume untouched; texture-line 128, texture-array 6144 and texture-store 1024 values match the CPU reference), as donative_image_store_exact_width_hardware_{r,rg,rgb,array,volume,rgba,sparse},startup_compute_dispatch_texture_{warp,hardware},startup_compute_dispatch_two_mips_{warp,hardware},native_compute_manifest_reasonsandnative_image_store_exact_width_warp_sparse. Skipped with 77 on WARP (no 32-lane waves):startup_compute_dispatch_native_warpandnative_image_store_exact_width_warp_{r,rg,rgb,array,volume,rgba}.Mutation:
case 0: float4_dimension = D3D12_UAV_DIMENSION_TEXTURE1D->TEXTURE2Din the.inlfailsstartup_compute_dispatch_native_hardwareatassert len(lines(result, f'{TEXTURE_DISPATCH} translated')) == 1, withDispatch(2, 1, 1) refused: an output texture view is not 2D.Not covered: the consumer's packed-table branch (
table_slot != 0) runs only where the descriptor increment is not 32 bytes; the increment of the hardware adapter was not recorded, so that branch may not have run.git merge-tree --write-treeofd36d56c2with currentmain(1a0120ba) is clean; the tests ran witha99e05f4merged, not1a0120ba.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T12:24:07Z.
Closing in favour of #3398, which carries this PR's changes: four-channel float and half4 texture UAVs (1D, 2D, 2D-array, 3D) bound as outputs on the in-process compute route, and the fixture (scalar buffer and 2D texture inputs feeding a 3D store, zero-size W control, adapter descriptor increment, 1D/2D-array/half4 readbacks).
#3398 also refuses adapters that report a shader model below 6.6. This branch and #3398 conflict, so only one can merge.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-29T12:43:51Z.
Review: APPROVED
Independently reviewed
d36d56c2integrated overmaina30437f7(tree43b81448). The trial merge is clean andgit diff --checkis clean. This is my first review of this PR.What I traced. Against current
main, the runtime change left in this PR is small, becausemainalready bindsbuffer_srv(throughaccepts_cbv_window), 2D texture inputs and the 3Dtexture_uavoutput on the in-process route:translate_compute_nativelynow givestexture_uavandhalf4_texture_uava four-channel float output slot for image dimensions 0, 1, 2 and 5 (1D, 2D, 3D, 2D array), wheremaintook onlytexture_uavat dimension 2. Any other dimension leavesfloat4_outputfalse and falls into the existing "view kind N is not bound" refusal. The dispatch-time checks for each dimension aremain's and are unchanged.format_compute_runtime_manifestwritestex1d/tex2d/tex3d/tex2dafor both kinds, and itsdefault:keepsrefuse(view_shape("UAV", b)), so the #3268 reason JohnConnorNPC asked about is not lost at this head.pipeline creation failedreason.git show --remerge-diff d36d56c2and8364ecd1). In the.inlthe resolution keepsmain's binding loop and replaces only itsvolumecase with the dimension switch. In the consumer,main's literalcpu + 64/cpu + 128/cpu + 32handles become increment-based handles plus a packed copy, which are the same addresses at a 32-byte increment.Tests. Built the full
devandreleasepresets, then ran, withX2W_TEST_DEBUG_LAYER=1and under one GPU job:ctest --test-dir out/build/<dev|release> --no-tests=error -j 1 -V -R '^(startup_compute_dispatch_.*|native_image_store_exact_width_.*|native_compute_manifest_reasons|startup_slot67_.*)$'/O2: 41 selected, 34 passed, 0 failed, 7 capability skips (77) in each.startup_compute_dispatch_native_warpandnative_image_store_exact_width_warp_{r,rg,rgb,array,volume,rgba}: this WARP has no 32-lane waves. They are skips, not passes.startup_compute_dispatch_native_hardware: the table-view volume matches and the zeroWSizecontrol leaves it untouched; texture-line 128, texture-array 6,144 and texture-store 1,024 values match the CPU reference.startup_compute_dispatch_texture_hardware: native volume and volume-nsa 6,144 words and native line 128 words match, with the incompatible views refused. On WARP the three native cases take the named no-wave path and the rest of the test passes.Mutation checks (12, each rebuilt in
dev):.inldimension 0 ->TEXTURE2D, 1 ->TEXTURE2DARRAY, 2 ->TEXTURE2D, 5 ->TEXTURE2D: each failsstartup_compute_dispatch_native_hardwarewith the matching "is not 2D" / "is not a 2D array" refusal.half4_texture_uavdropped from the switch, andtexture_uavdropped from it: both end inrefused: no translation. These double as the negative control for the new cases: without the binding they fail.a raw buffer writer was bound to a non-buffer UAV.if (waves)): failsstartup_compute_dispatch_texture_warp.tex2dand 2 ->tex2d: failstartup_compute_dispatch_texture_{warp,hardware}on the manifest line.default:->return std::nullopt: failsnative_compute_manifest_reasons.WaveLaneCountMin <= 32fromadapter_32_lane_waves(). This condition ismain's, only moved into the helper, and no adapter here has a minimum above 32.Non-blocking notes.
half4_texture_uavat dimensions 0, 2 and 5 (in-process and in the manifest; the formatter onmainrefused half4 at dimension 2), and a plaintexture_uavat dimension 1 on the in-process route. The 2D case that runs is the half4 one. They share the switch, so I am not asking for the full matrix, butdocs/startup-runtime.mdsays a program is accepted "only with the bindings a fixture has run through it", and that sentence is no longer exact.docs/experiments/startup-compute-native-dispatch.mdstill lists "a scalar buffer load" as refused (lines 19 and 85). That is JohnConnorNPC's item 4 and is still open;mainalready has the same stale text, so it can be a follow-up.table_slot != 0) ran here. If WARP's increment is above 32 bytes it ran for the portable texture, two-mips and array tests, which pass.cpp-migration"; this PR targetsmain.Title run. prwatch ran the head against the baseline (job 31): pass.
Merge. I approve this head and I am not merging it. The PR body and R0Y00's review on
a5d11833both ask for #2975 to land first, and #2975 is still open at8364ecd1. This branch contains all of #2975, so merging it now would land #2975 here instead.Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; NVIDIA GeForce RTX 5090 driver 32.0.16.1088 and Microsoft WARP; D3D12 debug layer requested with
X2W_TEST_DEBUG_LAYER=1.CI:
Build and test on Windowspassed ond36d56c2.This reply was AI-assisted.
Pull request closed