native: carry raw and typed heap reads in one program to main (stacked on #3409) #3415
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3415"
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-28T23:51:02Z.
Carries #3063 (merged into
cpp-migration) tomain:HeapViewContract::raw_and_typed_dwordlets one program read some GPU-selected heap slots raw and others with one-channel typed loads, and.viewsgainsalso <slot> <type>lines for further selections of the same dispatch.#3409 is merged (as a merge commit), so no rebase is needed. This PR adds the commits after
30de88b6:-x;main, the merge of #3409's review fix, and the count update after it.Conflicts resolved while picking:
direct_compute_cache.cpp: theraw_and_typed_dwordcache identity, placed inmain'scached_compute_ir.gfx1013_compute_native.cpp:heap_windowforraw_bufferandraw_and_typed_dword.main's wave64 / narrow-wave64 logic andparse()arguments are unchanged.native_global_srv_heap_replay.cpp:compare_outputtakes bothmain's optionalEXPECTED_WORDSfile and #3063's two reference slots.This is the translator side only. No runtime code writes
.viewsyet, so a title run still stops at "direct resource-heap load requires the selected GPU slot and its view type" (331 shaders, 4.37 M dispatches in Leyukaka's census). That runtime step is #3023 stage 3, which I'm starting next.Tests
Windows 11 26200, RTX 3080 (32.0.16.2124), WARP, dev preset,
-j1:^(native_.*|startup_compute_.*|compute_manifest.*|direct_compute.*)$: all pass except the four tests that fail onmainwithout this stack (startup_compute_dispatch_output_{warp,hardware}andstartup_compute_half_buffer_uav_{controls,hardware}, see #3353 and #3389). WARP wave32 cases skip with 77.native_global_srv_heap_replay_hardware: 242 assertions pass (234 before #3409's review controls). With thesrc/,tools/and fixture changes of the three #3063 commits reverted, it fails at "record mixed select 0+3".A read-only review of the picks found no blocker. Its nits are carried unchanged from #3063 and left for a follow-up:
othercontract refusal text still says only raw reads are translated, thoughglobal_srv_contractnever returnsother;replaywith twoalsolines exits 4 instead of taking the refused path;try.Refs #3063, #3409, #3023, #3224.
AI-assisted.
🤖 Generated with Claude Code
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T03:34:03Z.
Review: APPROVED
Review of
e232e475, by reading only, of the part beyond #3409:git diff 30de88b6 e232e475, six commits, 9 files.30de88b6is the merge base with #3409.Contract. Under
raw_and_typed_dword,heap_resourcetakes the typed path only fortyped_buffer_srv(src/gfx1013_direct_compute.inl:361-363). A multi-channel typed load is still refused (:366-367), and every other kind keeps theraw_bufferrules (:369-370).heap_windowcovers both contracts (src/gfx1013_compute_native.cpp:1835-1836), and the cache identity is distinct (src/direct_compute_cache.cpp:377).global_srv_contractreturns the mixed contract only when both raw and typed selections are present (src/startup_stubs/native_global_srv.h:240,249). The decoder refuses a slot named with two view types (:180-190), andrefuse_global_srv_selectionschecks every selection in order (:209-216).Scope. The runtime path still translates without a contract (
src/startup_stubs/d3d12_compute_dispatch.inl:325,translate_computepassesHeapViewContract::none). So the refusal "direct resource-heap load requires the selected GPU slot and its view type" is unchanged there. Onlycompile_dxilwith a.viewsfile and the test fixture select the new contract. This matches the description.Tests. Section 11 has a mismatch control for each positive replay (0+3 against 1+3, and 0+0 against 0+1). It also compiles the same program under raw-only and typed-only metadata as translator-level negatives, and covers a wrong second
also. Reading the code, these cases fail if the mixed term is dropped fromheap_window, if the kind test is dropped fromtyped, if the contract always returnstyped_dword, or if thealsoloop is skipped. Two mutations survive, and both are harmless:/heap-view/raw_and_typed_dwordidentity (src/direct_compute_cache.cpp:377), which then falls to/heap-view/other(still distinct, andglobal_srv_contractnever producesother);refuse_global_srv_selectionscall attools/startup/compile_dxil.cpp:151, which repeats the check at:77.CI.
ctest --preset prdoes not includenative_global_srv_heap_replay_*, and_warpexits 77. So CI does not run the new section, and the evidence for it is the local hardware run in the description.Description. Two points are out of date after merge
594b2626. The range is now30de88b6..HEAD(six commits, not four fromd4d9af41), and the doc at head gives 242 assertions onmainwhere the description says 234.Basis: reading of the diff and the CI results on
e232e475(Windows build and test, gfx1013 fixtures, Linux Python checks: pass). I built and ran nothing.Verdict on
e232e475: approve. It should merge after #3409, and it needs a rebase if #3409 is squash-merged.Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-29T03:36:14Z.
Thanks. Description updated: the range is
30de88b6..HEADand the count is 242. I will rebase this onmainif #3409 is squash-merged.AI-assisted.