Repository navigation
compute: publish packed_d16_x_uav runtime manifest (Part of #3224) - #3389
SimSalabimse wants to merge 3 commits into
Conversation
KelboLive
left a comment
There was a problem hiding this comment.
APPROVED -- passes AGENTS.md rules.
Checked against hard rules:
- No game files, dumps, DLLs, EXEs, torrents, distribution links, or credentials
- Neutral wording ("a retail title on the Windows test PC")
- Source-built fixture: hand-crafted gfx1013 buffer_store_format_d16_x via program_words()
- All changes in tracked paths (src/, tests/, docs/)
- New tests only; existing half_buffer_uav path preserved
- One behavior: manifest publication for packed_d16_x_uav
Code review:
- view_kind_name adds packed_d16_x_uav and indexed_raw_srv
- Manifest emission guarded on ComputeViewKind::packed_d16_x_uav && array_count == 1 && required_bytes == 2
- One-component D16 stored through half_buffer_uav path; packed_d16_x_uav only emits bufd16x when binding matches
- New refusal function validates element alignment, format (R16_FLOAT/R16_UINT), stride, swizzle-flag rejection
- Test: positive control (reference halfwords), three negative controls (R32_UINT, bad stride, swizzle flag)
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean, well-tested.
Adds packed_d16_x_uav and indexed_raw_srv to the view_kind_name table, publishes bufd16x manifest for one-component D16 stores, and adds packed_d16_x_view_refusal with proper format/stride/swizzle validation. Dispatch stubs handle the new manifest line; native runtime validates format support. Test fixture covers positive path, three negative controls, and reference-only checks.
Ready to land.
KelboLive
left a comment
There was a problem hiding this comment.
LGTM — clean, well-tested.
Adds packed_d16_x_uav and indexed_raw_srv to the view_kind_name table, publishes bufd16x manifest for one-component D16 stores, and adds packed_d16_x_view_refusal with proper format/stride/swizzle validation. Dispatch stubs handle the new manifest line; native runtime validates format support. Test fixture covers positive path, three negative controls, and reference-only checks.
Ready to land.
|
Head 82984b0. By its diff (not built here), this makes
Measurements, local:
At 82984b0 this fixes the CI failure as a revert of the #3091 classification. Either describe it as that and drop the unreachable |
A one-component D16 buffer_store_format compiles as packed_d16_x_uav but the published route had no manifest line, so dispatch refused the kind as unknown. Emit bufd16x, name the kind, and keep the view on native_buffer_store_view, refusing an element that is not one R16_UINT halfword. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
A one-component buffer_store_format was classified as packed_d16_x_uav, so publishing bufd16x replaced the existing bufhalf line. That store stays a half_buffer_uav. bufd16x is emitted only for a packed_d16_x_uav binding. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
A one-component D16 store stays packed_d16_x_uav and keeps the integer store. format_compute_runtime_manifest writes `uav N packed_d16_x table R B`. The reader binds R16_FLOAT and R16_UINT as R16_UINT and leaves R32_UINT as R32_UINT. The one-channel half-buffer fixture, including both MTBUF forms, expects that line. Co-authored-by: SimSalabimse <SimSalabimse@users.noreply.github.com>
82984b0 to
32406a3
Compare
|
@Leyukaka Took option 2, and rebased onto current main (head
Linux: python-linux passed 260/260. AI-Assisted |
Leyukaka
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (diff-only, head 32406a3)
Head 32406a3. Re-read by its diff (not built here).
The packed route is now consistent end to end:
gfx1013_direct_compute.inlis unchanged from main, so a one-component D16 store (MUBUF, and MTBUF via the #3353 rewrite tobuffer_store_format0x84) stayspacked_d16_x_uav.direct_compute_cache.cpp:985emitsuav N packed_d16_x table R B,d3d12_compute_dispatch.inlparses the same token, and the placed view goes throughpacked_d16_x_view_refusal(:99) andnative_buffer_store_view.startup_compute_half_buffer_uav_check.pyexpects that line for stride 2, and requires that nobufhalf ... bytes 2line is present, in all three forms (MUBUF, MTBUF indexed, MTBUF first element). The dispatch half of that fixture sends its one-channel negatives (stride, swizzle, format, dst_sel, OOB_SELECT) throughpacked_d16_x_view_refusal; the range negative is still refused earlier by the placed-range check.startup_compute_packed_d16_x_uav_{warp,hardware}adds the R32_UINT view.native_compute_manifest_reasonschecks both the published line and the refusal forrequired_bytes4.
Coverage: CI run 46207060926 ran the pr preset (73 tests). It does not include native_compute_manifest_reasons, startup_compute_half_buffer_uav_* or startup_compute_packed_d16_x_uav_{controls,warp,hardware}. Only the Linux reference half ran. The Windows result rests on the author's 35/35 run, and the dispatch checks run on hardware only (the author reports the two WARP runs skipped, so the dispatch checks ran on hardware only).
Not covered by any test in the diff:
- the view-token branch (
:875-880, andpacked_d16_xat:910). No fixture uses a token output with the packed line; word3_flags(:121). Only bit 28 and the stride-field swizzle bit are exercised, soword3_flags = 0would pass;unified &&(:110-117). No descriptor clears bit 24;b.array_count == 1in the emit (direct_compute_cache.cpp:985). There is no array case for this kind.
Merge: git merge-tree against main 212d4b5 is clean, and so is a merge with #3395 at 1eca8d5, whose view_kind_name hunk is identical.
Part of #3224 (claim: #3224 (comment)).
In a 900 s start-up on the Windows test PC, runtime from main
aec2e08, 23 shaders and 86,436 untranslated dispatches (5.7% of that run's untranslated compute dispatches) were refused withunsupported startup runtime manifest bindings: UAV kind unknownfor this binding. The shader compiled, and the published route had no manifest line for it.Change
The manifest token is
uav <register> packed_d16_x table <parameter> <byte>.buffer_store_format, including the MTBUF form, stayspacked_d16_x_uav. The store staysvalue & 65535thenbufferStore.i32. Two- and four-component D16 stores stayhalf_buffer_uavand still publishbufhalf.format_compute_runtime_manifestwritesuav N packed_d16_x table R Bfor one register and a two-byte payload.view_kind_namenamespacked_d16_x_uavandindexed_raw_srv, with the static assert that keeps the last name aligned with the enum. That names change is not on main.load_compute_translationreads the line. The placed view usesnative_buffer_store_view:R16_FLOATandR16_UINTbind asR16_UINT, andR32_UINTstaysR32_UINTwith a 4-byte element. A descriptor that matches none of those refuses witha half buffer store requires matching format, stride and structured bounds.tests/startup_compute_half_buffer_uav_check.pyexpectsuav 0 packed_d16_x table 1 32for the one-channel stride-2 case, including both MTBUF forms. Wider D16 stores still expectbufhalf.tests/startup_compute_packed_d16_x_uav_check.pyexpects the same line. TheR16_FLOATview checks the halfwords. TheR32_UINTview checks the zero-extended dwords. A wrong stride and a swizzle flag still refuse and leave the buffer untouched.Tests
Linux: the python-linux check step (
tools/run_checks_parallel.py --from-dir tests/checks/python-linuxplus the workflow's script list) passes all 260 checks.docs_links_check.pyandstartup_compute_store_d16_x_check.pyalso pass.tests/native_compute_manifest_reasons.cppcompiles withg++andclang++ -std=c++17 -Wall -Wextra -Werror -Werror=narrowing.Windows test PC (RTX 4070 Ti) at head
32406a35, preset dev: build exit 0, then35/35 passed, ctest exit 0 (
startup_compute_half_buffer_uav_warpandstartup_compute_packed_d16_x_uav_warpskipped, as on WARP elsewhere).startup_compute_half_buffer_uav_controlsandstartup_compute_half_buffer_uav_hardwarepass at this head.AI-assisted (Cursor)