Repository navigation
Conversation
formatted_byte_load asked resource() for raw_vector_srv even when the descriptor was the byte-address rewrite (stride cleared in word 1), so a tbuffer_load_format_* through such a window was refused with "non-contiguous resource descriptor", for a table descriptor and for a GPU-selected heap descriptor under the raw_buffer contract. It now picks byte_window_srv by the same rule as the raw MUBUF load. Conversion, the getDimensions element bound and the raw loads are unchanged. Tests: - native_global_srv_heap_replay_check.py: a 32_UINT tbuffer load through the heap window is recorded, compiled and replayed for selections 0 and 1, with the cross-slot mismatch control; the loop guard refuses it; an 8_8_8_8_UNORM load through the window compiles. - native_mtbuf_check.py: the 11-format value check also runs through a byte window of its table SRV (native_store_replay accepts the window binding as the same raw view). - native_direct_container_check.py: compute table windows with both formats compile; without the byte-count product they are refused. Refs R0Y00#3023 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit e67f101)
Conflicts resolved: - indirect_table_buffer: main added `alignment` as the sixth parameter, so the compute input call now passes D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT before `true, slot.requires_identity_dst_sel` and keeps main's scalar-window fallback. - formatted_byte_load: a byte window the caller already bound (main's graphics path) is used as is; otherwise the zero-stride rewrite selects byte_window_srv. - native_mtbuf_check.py: main's scalar operand 137 with the byte-window prefix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R0Y00#3042) Accept the one-channel typed heap-view contract in the direct compute compiler and offline replay. Exercise typed slot selection, cache reuse, and malformed metadata refusals with source-built fixtures. Refs R0Y00#3023. (cherry picked from commit a0f6773)
The typed heap load reads the idxen element index only. offen, an immediate
offset and a nonzero soffset are already refused by the decoder ("formatted
load requires zero or a single linear index"); three negative cases pin that.
The doc now lists the typed_dword contract and the current assertion count.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A program that reads some GPU-selected heap slots raw and others with a one-channel typed load was refused under both heap view contracts: raw_buffer refuses the typed load, typed_dword the raw load. HeapViewContract::raw_and_typed_dword now lets the kind of each heap load pick its path: buffer_load_format_* (typed_buffer_srv) takes the typed_dword rules, every other kind (tbuffer included) the raw_buffer rules, byte windows included. Which heap index feeds which load stays the caller's guarantee; the comment and the doc say so. .views gains zero or more "also <slot> <type>" lines: further selections of the same dispatch, selector word k = selection k. The decoder refuses a slot named twice. refuse_global_srv_selections checks every selection; global_srv_contract returns raw_and_typed_dword when raw and typed selections are both present. compile_dxil and the fixture map the contract with a switch, and compile_dxil reports also=<slot>:<type>. The fixture's record takes --also SELECTOR TYPE (selector word 1), dispatches every selected slot and compares against the sum of the slot data (N+M in replay). Tests: native_global_srv_heap_replay_check.py section 11 records, compiles (fresh frontend cache, then a cache hit) and replays a mixed program for raw slots 0 and 1 with typed slot 3, checks a cross-slot mismatch, a refused typed selection, three replay refusals, nine compile refusals and four compile-only cases (two also lines, byte window, formatted byte window, plain tbuffer under the mixed contract). Refs R0Y00#3023 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 4b01560)
The selector word k is selection k, so two words can pick the same slot. The decoder now accepts a slot named again with the same view type and refuses only a slot named with two view types, so a file record writes decodes. An also line with trailing fields is unreadable. A bad --also selector in the fixture returns 2. Section 11 gains the second-also, repeated-slot, two-type and trailing-field cases and a raw+raw record, compile and replay of one slot picked by both words. The stride-read comment now names all three contracts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 64513f2)
…for mixed reads Review note on R0Y00#3063: under raw_and_typed_dword the selection types come from the capture, not from the shader, so the header comment now matches HeapViewContract and the doc's Limits. Comment only. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 2534937)
The typed and mixed steps keep their own counts; the mixed step adds the total on main (234), where main's raw load and added-address sections run too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 28, 2026
2 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.Stacked on #3409, which has to land first. Only the last four commits belong to this PR (
d4d9af41..HEAD):-x;main.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 native: read GPU-selected heap slots raw and typed in one program #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 shader: lower direct MTBUF packed half stores #3353 and compute: publish packed_d16_x_uav runtime manifest (Part of #3224) #3389). WARP wave32 cases skip with 77.native_global_srv_heap_replay_hardware: 234 assertions pass. With thesrc/,tools/and fixture changes of the three native: read GPU-selected heap slots raw and typed in one program #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