runtime: publish narrow half-float texture UAV stores #3305
Open
RonLogic wants to merge 4 commits from
upstream-pr/3305 into main
pull from: upstream-pr/3305
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!3305
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3305"
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 RonLogic on 2026-11-28T06:55:20Z.
Change
Refs #3224 and #2935. Direct Compute already emits D16 image stores for one and two channels. The five source-built programs here emitted DXIL but stopped at
half_scalar_uavorhalf2_texture_uavmanifest publication on the preceding compiler.Publish the existing one- and two-channel bindings as typed half-float texture UAVs. The slot 14 binder checks the view and resource formats with the existing
native_half_store_formatcontract and queries typed-store support on the view format. It uses the recorded mip and slice range for 1D, 2D, 2D-array and 3D textures. This is the published texture path. #3302 covers hardware buffer descriptors, and #3049 covers the separate in-process binding work.Verification
58f3fc4fonbbf4687b, with clean merges checked against current main and #3302. Windows 11 26300.10075, MSVC 19.52.37029, Windows SDK 10.0.26100 DXC 1.9.2602.17, Agility 1.620.2, RTX 4070 driver 32.0.16.2124, and app-local WARP 1.0.22.Evidence and follow-up
The texture data and guest code are generated by the test. The tested view coordinates follow the D3D12 UAV contract. The observed compatibility result is the five source-built programs through the published runtime, including a second view representation for the scalar 2D program. I used Codex to prepare the change and ran verification locally.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T07:57:28Z.
Thanks for this. I reviewed head
58f3fc4fby reading it and running pure-Python checks on the merged tree (no build, no Wine, no GPU). I found nothing blocking, only one suggestion and a few nits.git merge-tree --write-treeof this head intomainc3204a9cis clean (rc=0). #3302 changed the same three files (direct_compute_cache.cpp,d3d12_compute_dispatch.inl,startup_stream_consumer.cpp), but in separate branches of the same chains. The merged runtime keeps both thebufhalfand the newhalf tableforms.git grep -Foversrc toolsfinds"textureStore.f32", 67×1,"textureLoad.f32", 66×2,"legacyF16ToF32", 131×14 and"legacyF32ToF16", 130×2.docs_links_check.pyreportsChecked 148 Markdown files and 671 links.(rc=0).ctest --preset pr(100% tests passed out of 73), andgrep -c half_image_uavon its log gives 0. So your local 15/15 run is the only run of the new tests.Suggestion:
direct_compute_cache.cpp, the half branch's guardb.array_count == 1 && (b.image_dimension < 3 || b.image_dimension == 5)is the only thing that stops a 1D-array D16 store from being published astex2da, because the name ternary falls through to"tex2da". The direct compiler does emit dim-4 stores:dx_kind[]{1, 2, 4, 5, 6, 7, 3, 8}maps dim 4 to Texture1DArray, and onlydimensionsqueries refusedim == 4. No test pins the guard.CASEScovers dims 0, 1, 2 and 5, andnative_compute_manifest_reasons.cpphas no half kind (git grep -c half_exits 1). A dim-4 (and perhaps dim-3) row incontrols()that expects theview_shape("UAV", …)refusal would pin it.Nits:
2. The header comment of
d3d12_compute_dispatch.inllists thefloat tableandbufhalfforms but not the newhalf table … channels <1|2>form.3. Only two normal values, 1.0 and −2.0 (
0x3c00,0xc000), are pinned. No f16 denormal or NaN value checks the f16→f32→f16 path (legacyF16ToF32then a typed R16 store) against the console's raw-bits D16 write.4. The PR body has no mutation table. One would show which new checks turn red when each guard is removed.
Once you've considered the suggestion, it looks ready from our side.
This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-28T08:30:56Z.
Thanks for the work here. This branch no longer merges with current
main(c6f23813):git merge-tree --write-tree origin/main 58f3fc4fexits 1 with a conflict insrc/startup_stubs/d3d12_compute_dispatch.inl.Could you merge or rebase current
maininto the branch, resolve that conflict, and re-run the tests this PR adds, so reviewers can look at the refreshed head?This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-28T09:13:56Z.
Fixed
Imported from R0Y00/Xbox2Windows. Originally posted by RonLogic on 2026-11-28T12:09:27Z.
Thanks for flagging the 1D-array case. I refreshed the branch onto
052abe6fand ran the new controls on905db2e44fb8c1d52d2889706eb22fc341b84084. Git's merge-tree check against that main revision was clean.UAV kind half2_texture_uav 1d-arraywithout a manifest. Deliberately mapping that dimension totex2damakes the new control fail.0x5100, read0x3c00.0x7c55was stored as quiet0x7e55on both. Guest hardware parity for signaling NaN remains unverified.Windows 26300.10075, MSVC 19.52.37029, DXC 1.9.2602.17, Agility 1.620.2. RTX 4070
10de:2786, driver32.0.16.2124, wave32. WARP 1.0.221414:008c, forced wave32 verified. The debug layer was enabled on both and reported no errors in the fixture. Inbox WARP separately reported four lanes and skipped the wave32 probe.An independent run of the 1D-array refusal and shifted-W control on the refreshed head would be useful. I used Codex to prepare the change and ran the reported checks locally.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T12:06:45Z.
This branch conflicts with
main1990feadintests/startup_stream_consumer.cpponly (one region: the mode flags at the top oftexture_slot67). The other files merge cleanly.Resolution: keep this branch's side (
half*,shifted_w,volume,line,first_mip,width,height), add main'sconst bool sampled = mode == "texture-volume-native-sampled";with its comment, and start thevolumecondition withsampled ||.No review is recorded on this PR yet, and the new tests need a re-run on the merged head.
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-29T12:44:26Z.
Review: CHANGES_REQUESTED
Reviewed
905db2e4at the head itself, not integrated: it conflicts withmainf4e2e5c6, so I am requesting changes for that alone. Everything else below passed here and is non-blocking.Blocking: conflict with
main.git merge-tree --write-tree origin/main 905db2e4exits 1 with one conflict, intests/startup_stream_consumer.cpp, at the mode flags at the top oftexture_slot67.mainaddedtexture-volume-native-sampledthere (af6045df, merged with #3154); this branch added thetexture-exact-half-*flags in the same lines. The other six files merge cleanly. Please mergemainand re-run the new tests; both sides' flags need to stay (sampled ||at the start ofvolume, plus this branch'shalf*,shifted_w,widthandheight).What I traced. The publisher branch in
format_compute_runtime_manifesttakeshalf_scalar_uavandhalf2_texture_uavbefore the float branches, maps ISA dimensions 0, 1, 2 and 5 explicitly and refuses the rest throughview_shape. The binder parses thehalf tableline intonarrow_half_texture, checks the view and resource formats withnative_half_store_format(...).accepts, queries typed-store support on the typed format and binds the view with that format. For the existing float pathstore_formatis stillresource.Format, so that path is unchanged. The two merge commits on the branch are the author's.Tests at
905db2e4(targetscompile_dxil d3d12_xs_shim startup_stream_consumer offscreen_check native_compute_manifest_reasons,devandrelease):startup_compute_half_image_uav_warpandstartup_compute_half_buffer_uav_warp: the inbox WARP here reports a 4-lane wave, so the wave32 probe returns 77. I did not run the new fixture on WARP.startup_compute_half_image_uav_hardwarematched 32 + 1,280 + 512 + 256 + 3,072 + 1,536 = 6,688 halfwords across the six views, the same total you reported. The shifted-W control printed16 differences, first component 256 expected 5100, read 3c00. The 1D-array control printed1D-array D16 store compiled and was refused at manifest publication.git diff --checkagainst the merge base052abe6fis clean.Mutants (dev build,
startup_compute_half_image_uav_controlsand_hardware):Killed (12):
tex2dainstead of refused:_controlsfails on the refusal reason;tex2d; dimension 2 astex2d: both tests fail on the expected line;store_format = half.typedremoved; kind chosen by swapped channel count;narrow_half_texturenot set by the parser; typed-store query onresource.Format: all fail on a halfword mismatch;acceptswithout the typeless resource; scalar typeless set toR16G16_TYPELESS: the typeless case fails.Survive (3), none blocking:
acceptswith the view-format comparison removed (resource == typed || resource == typelessonly). The R32 controls change the view and the resource together, so nothing separates the two halves of the check. With this mutant a non-float 16-bit view of anR16_TYPELESSresource would be rebound asR16_FLOAT. AnR16_UNORM(orR16_UINT) view of the typeless texture that expects the D16 refusal and untouched sentinels would pin it.b.array_count == 1relaxed to>= 1in the publisher: no case has a descriptor array of a half kind.channels 3on ahalf tableline: the publisher never writes it, and no test feeds the runtime a hand-written line.Equivalent in practice (1):
acceptswith the resource-format comparison removed. A createdR16_FLOATview implies anR16family resource, and an uncreated view is refused earlier.Not run: a mutant that disables the typed-store support check. My pattern for it matched twice, and on this adapter the format supports typed stores, so it could not have been killed here.
Title run: the run of this head gave no verdict (job 32 ended in
errorwithout a run result), so this review does not include one.Environment: Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; Python 3.12.10; NVIDIA GeForce RTX 5090 driver 32.0.16.1088, debug layer enabled; inbox WARP 10.0.26100.9818 (4 lanes, wave32 cases skipped).
CI:
Build and test on Windowspassed on905db2e4; as noted earlier in the thread, that job does not run thehalf_image_uavtests.This reply was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T13:11:00Z.
Thanks for the 1D-array control and the special-value probes. I re-checked
905db2e4against currentmain(c04e0dd6). Our two earlier points are answered:tests/startup_compute_half_image_uav_check.pynow expectsunsupported startup runtime manifest bindings: UAV kind half2_texture_uav 1d-arrayfor a source-built D16 1D-array store. pigalot's mutant that maps dimension 4 totex2dafails on that reason.d3d12_compute_dispatch.inlnow listsuav <i> <dimension> <float|half> table <param> <byte> channels <n>, next to thebufhalfform.The only thing left is the conflict in
tests/startup_stream_consumer.cppthat pigalot and Leyukaka described. It is still the only conflict onc04e0dd6(git merge-tree --write-tree c04e0dd6 905db2e4exits 1, one file). This publisher runs on the native compute path, which #3449 made the launcher default. So oncemainis merged in, the new tests need a re-run on the merged head. After that, nothing from us blocks it.Environment: Linux only: git objects and
git merge-tree. I did no build, WARP or GPU run.This comment was AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T20:36:38Z.
Update to our 11-29 12:06 comment, which named only the mode flags: on
mainff9dcef0,git merge-tree --write-tree origin/main 905db2e4now reports conflicts in two files.tests/startup_stream_consumer.cpp: the mode flags at the top oftexture_slot67(main now also haszero_wandnative_inputsnext tosampled), and the Texture3D view line, where main'sif (zero_w) view.Texture3D.WSize = 0;and this branch'sshifted_w ? 0u : 1uare both needed.src/startup_stubs/d3d12_compute_dispatch.inl: the header comment and the slot struct, where bothatomic(from #3454) andnarrow_half_textureshould be kept.We will review again after the rebase.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T16:14:52Z.
Taking this over since there has been no activity for 48 h; will hand back if you resume. Your commits stay as they are and keep your authorship; I will rebase onto current
main, address the open review points and report the test results here.Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-12-01T17:42:30Z.
Continued in #3766 (rebased onto
main, review points addressed, local test results in the description). Your commits are kept with your authorship; if you resume, say so there and I will hand it back.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.