Repository navigation
Conversation
A texture a placed table names at an offset the program computes (a dynamic term in the descriptor's address, or a waterfall loop's per-lane entry) kept no read mark: only the reads of the resource heap itself did, so the host never learned which slot the program reads and the placed texture there stayed null forever. Such reads now mark their heap index like the heap's own; a table read at a fixed offset still marks nothing, for the draw makes that slot. Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
|
Verified
|
kotekompotek
left a comment
There was a problem hiding this comment.
Right fix for the null-placed-texture gap: a fixed-offset table read is named by the draw's table ranges so the host makes that slot — but a dynamic offset or waterfall per-lane entry has no host-visible name, so it must go through Read marks like a heap-direct read. marks_its_reads keeps the fixed case unmarked (marking would cost without adding info) and the s_load-a-dynamic-term test covers both sides. LGTM.
|
Automated triage for the maintainers. This PR no longer merges cleanly into Generated by Claude Code |
|
Full-suite run on NVIDIA, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
A texture at a slot a computed table entry names — the program walks a table at
an offset it computes (a dynamic term in the descriptor's address, or a waterfall
loop's per-lane entry) — kept no read mark: only the reads of the resource heap
itself did. Lowering marked
texture_readsfor heap-direct sources(
is_heap_direct) and left every table read to the host, which makes the slot fora fixed entry (the draw's table ranges) but nothing for a computed one — the
placed texture at that slot stays null forever. Fixes #2722 (the issue's analysis
of
handle, inemit/lower.rs, names the exact seam — found by reading the code;the issue author's analysis was assisted by Claude Code).
The gate is now
marks_its_reads: a source marks its reads when it is heap-direct,or when a loaded/fetched leaf's address comes from a
Tableroot and iscomputed —
dynamic.is_some(), or the load is a waterfall loop's per-lane read(
waterfall::loads). A table read at a fixed offset still marks nothing, for thedraw makes that slot; a computed one lowers its runtime heap index (the index
heap_indexalready produces for the handle) and marks that, which the hostalready materializes from the marks.
Tests:
table_texture_reads_at_an_offset_the_code_computes_mark_their_slot(emit) — a synthetic GFX10 compute program reads a texture through a table at a
fixed offset (marks nothing, as before) and through a table whose offset the code
adds (
s_or_b32 s20, s4, 0; s_add_u32 s6, s4, s20, thens_loadthe descriptorfrom
s[6:7]): the lowered shader now carries the read mark, DXIL-valid.cargo test -p victory-shader(minus the known NVIDIA (RTX 5070 Ti): workspace test failures an AMD card cannot see, and one independent of vendor #2317 machine failures — gather/stride and the device
heap_direct_texture_readsAV, reproduced on a cleantree): 260 passed, 0 failed.
cargo clippy --workspace --all-targets --locked, and with--all-features:0 warnings, both.
13f91ca(touches onlyemit/lower.rsandemit/memory_tests.rs; GPU: make shared sRGB textures typeless for unordered access #2679's conflicts live inresource.rs, untouched here).Generated with Mistral Vibe.