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)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean extension of MTBUF formatted loads to the SRV byte window with identity DST_SEL enforcement.
requires_identity_dst_selthreads cleanly from manifest → cache encoding → binder → dispatch refusal.- Writable MTBUF byte windows refuse without a verified view contract.
indirect_table_bufferchecks identity DST_SEL (word 3) and component mapping (shader4component) before binding.gfx1013_compute_mtbuf.inldetects the zero-stride rewrite and routes throughbyte_window_srv.- New
startup_compute_mtbuf_window_check.pycovers identity readback, swapped X/Y refusal, CBV-token refusal, and cold/warm cache manifest equality. - Existing tests updated for both raw and formatted window loads.
The flag propagation and refusal granularity are consistent with the existing codebase patterns.
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean extension of MTBUF formatted loads to the SRV byte window with identity DST_SEL enforcement.
requires_identity_dst_selthreads cleanly from manifest → cache encoding → binder → dispatch refusal.- Writable MTBUF byte windows refuse without a verified view contract.
indirect_table_bufferchecks identity DST_SEL (word 3) and component mapping (shader4component) before binding.gfx1013_compute_mtbuf.inldetects the zero-stride rewrite and routes throughbyte_window_srv.- New
startup_compute_mtbuf_window_check.pycovers identity readback, swapped X/Y refusal, CBV-token refusal, and cold/warm cache manifest equality. - Existing tests updated for both raw and formatted window loads.
The flag propagation and refusal granularity are consistent with the existing codebase patterns.
Leyukaka
left a comment
There was a problem hiding this comment.
Reviewed 2e633a14 by its diff, against main 212d4b5f; by reading only, nothing built or run. The body declares this a replacement for #3232. The src/ patch is line-for-line the one in #3232 at 1b3ee661 (same six files, same commits 587fc6d2 and 80952189); the two heads differ in src/ only by base drift. The three points of my review there still apply:
- Conflict and argument shift.
git merge-tree --write-tree origin/main 2e633a14exits 1 with conflicts ingfx1013_compute_mtbuf.inl,d3d12_compute_dispatch.inl,d3d12_draw.inlandnative_mtbuf_check.py.mainadded a sixth parameter toindirect_table_buffer(d3d12_draw.inl:2514), before the snapshot bool:The PR's call atUINT alignment = D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT,
d3d12_compute_dispatch.inl:655is:Withindirect_table_buffer(self, words, false, &reason, 16u << 20, true, slot.requires_identity_dst_sel);
requires_identity_dst_selappended tomain's signature, this call still compiles if kept as is:truebecomes alignment 1, the flag becomes the snapshot bool, and the DST_SEL check is never requested. Fix:(..., 16u << 20, D3D12_RAW_UAV_SRV_BYTE_ALIGNMENT, true, slot.requires_identity_dst_sel), asmainpasses atd3d12_compute_dispatch.inl:794. - Graphics path. Vertex and pixel stages reach the same MTBUF lowering (
gfx1013_direct_graphics.inl:1960, thengfx1013_direct_compute.inl:561). The graphics manifest (direct_compute_cache.cpp:913) writessrv <i> buf tablewithoutidentity_dst_sel, and the graphics binder (d3d12_draw.inl:2986) callsindirect_table_buffer(self, words)with no DST_SEL check. Fix: refuse a flagged binding in the graphics formatter, or limit the byte window to compute, and add a pixel-shader refusal case. - Mask mutants. The only non-identity input swaps X and Y on a two-component load (
0x0103efa5against0x0103efac; DST_SEL_X is bits 2:0,tools/startup/gfx2hlsl.py:179). Changing(words[3] & 0xfffu) != 0xfacuto(words[3] & 0x3fu) != 0x2cuatd3d12_draw.inl:2422still refuses that input, so the suite passes. The same holds at:2390for a low-6-bit compare ofShader4ComponentMapping, since the only control isENCODE(1, 0, 2, 3). Fix: anxyzwload with a Z/W swap control, for both the DST_SEL word and the SRV mapping.
On a pull request, CI runs ctest --preset pr (.github/workflows/windows.yml:493). Its include list (CMakePresets.json:51) matches none of native_mtbuf_*, native_direct_container, native_global_srv_heap_replay_* or startup_compute_mtbuf_window_*, so the green check does not cover these tests. After the rebase, please post the ctest -R command and its result for them.
Request changes for 1-3 on 2e633a14.
|
Review of head This looks superseded by #3232, which has merged. #3232 merged on 29 November (
MUST
The graphics-path and DST_SEL mask points from the review of this head were raised against the SHOULD / NIT: none. AI-assisted. |
|
This looks fully superseded by #3232, which merged on 29 November: as noted above, both |
Replacement submission for #3232. This branch contains the existing formatted-buffer work plus the verified review follow-up commit. The original PR remains open because its author-owned branch was not writable from this account; these PRs overlap in scope, so please keep only one submission and close/mark the other as superseded when choosing.
Validation: build,
native_direct_container, hardware dispatch, and docs-link checks passed. In-box WARP was skipped because of its 4-lane wave limit.