compute: publish d16_sample_srv runtime manifests for direct compute #3427
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3427"
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 Ammmae0x on 2026-11-29T01:29:46Z.
Refs #3224, #2935
From the #3224 census (
no runtime manifest: SRV kind d16_sample_srv 2d, 64,499 dispatches): the direct compute translator already lowers D16 sample operations toComputeViewKind::d16_sample_srv(packing extractedf32channels intof16halves viapacked_half_rne), and the dispatch runtime already bindssrv <i> tex1d|tex2d|tex2da|tex3d table <param> <byte>lines, butformat_compute_runtime_manifest()only handledtexture_srv, so D16 programs failed withunsupported startup runtime manifest bindings: SRV kind d16_sample_srv 2d.Scope since #3449: default launcher runs set
X2W_NATIVE_SHADERS_ONLY=1(skipping<key>.txtmanifests), and in-processtranslate_compute_natively(src/startup_stubs/d3d12_compute_dispatch.inl) does not yet acceptd16_sample_srv(tracked for follow-up), so the #322464,499dispatches apply to the published-Translateroute.Change
src/direct_compute_cache.cpp:format_compute_runtime_manifest()now publishesd16_sample_srvexactly liketexture_srv(array_count == 1,image_dimensionin{0, 1, 2, 5}->srv <i> <tex1d|tex2d|tex3d|tex2da> table <param> <byte>). Cube dimensions, arrays (array_count > 1) and comparison samplers still refuse withview_shape("SRV", b)/"comparison sampler". No runtime binding change;src/startup_stubs/d3d12_compute_dispatch.inlandsrc/native_compute_pipeline.cppare untouched.tests/native_compute_manifest_reasons.cpp: D16 positives for 1D, 2D, 3D and 2D-array, plus refusals for cube, 2D array and comparison sampler.tests/startup_compute_d16_sample_srv_check.py+tests/cmake/startup_compute_d16_sample_srv.cmake: new source-built test. Case A with one D16 operation spliced before the store (level-zeroimage_sample_lzof texel 1.5 in 1D, 2.5 in 2D, 14.5 in 2D-array and 10.0 in 3D, each at its texel centre), verified against an independentstructbinary16 reference. The Python translator refuses compute D16 loads, so controls and dispatches publish throughcompile_dxil --requests(native), with no.cs.hlslfallback; the dispatches reuse the existingdispatch-texdim-*/dispatch-sampled-depthconsumer modes.main()gates onrender(renderer, adapter, '--shader-wave32')first, so 4-lane WARP exits 77. Refusals: wrong-dimension / undescribed / out-of-fit views, manifest lines rewritten to another dimension, a cube D16 sample, a 2D D16 load and an a16 D16 sample.docs/experiments/compute-d16-sample-srv.md: contract note.Linux verification (this host; no Windows GPU run claimed)
structbinary16 reference, manifest branch/mapping parsed from the source, C++ reasons cases, cmake registration): PASS.tests/form_coverage_check.py: passed.tests/docs_links_check.py: passed (161 Markdown files, 686 links).tests/bidi_controls_check.py: passed (2582 files).Round 3: read texels with image_sample_lz in every dimension (commit
72c70d48)Windows verification on
315a6babgave:native_compute_manifest_reasonspassed,_warpskipped (exit 77 via--shader-wave32on 4-lane WARP),1dpassed on hardware (320 words matched the packed half of texel 1.5), and2dfailed atcompile_dxilwithnative compute +0x80: unsupported image dimension or D16. Root cause: the native decoder admits D16 only on sample opcodes (sample_d16is true for ops 32/34/36/37/39 on non-cube dimensions), so theimage_loadprograms for 2d/2da/3d were refused at decode.tests/startup_compute_d16_sample_srv_check.py: 2d/2da/3d now read their texel withimage_sample_lzunder the all-zero sampler, like 1d, at normalized texel centres (2D(0.75, 0.5), 2D-array(0.375, 0.625, 2.0)with the slice as an unnormalized float index, 3D(0.875, 0.375, 0.625)). Refusal controls are now a cube D16 sample and a 2D D16 load (both refused by the decoder withunsupported image dimension or D16, pinning thedim != 3and sample-only gates) and an a16 D16 sample (refused by the translator withpacked image addressing).docs/experiments/compute-d16-sample-srv.md: fixture and refusal wording updated.Linux verification (this host; no Windows GPU run claimed)
image_sample_lzand the D16 bit, normalized-centre checks, manifest branch/mapping parsed from the source, C++ reasons cases, consumer opt-in, cmake registration): PASS.tests/form_coverage_check.py: passed.tests/docs_links_check.py: passed (162 Markdown files, 688 links).tests/bidi_controls_check.py: passed (2584 files).image_load, 2D texture width changed, cube refusal reverted to a load, a16 bit cleared, 2D-array slice normalized), then the copies were discarded and the clean tree re-verified PASS.Round 4: merge upstream/main + review feedback (commit
a25d1217)@tedin7 reported on Windows Server 2025 WARP (dev and release):
native_compute_manifest_reasonsandstartup_compute_d16_sample_srv_controlspassed,_warpand_hardwarefailed with1d texel 1.5: word 0 expected ea74dd76, read c5c5c5c5. @Leyukaka then requested changes: the failuremessage does not say whether the dispatch was refused or ran without writing, and the
dim != 3/sample-only gates leave
dmask:0x3multi-channel packing unpinned. This round does not claim to fixthe WARP failure itself: it makes the next Windows run name its cause, and closes the coverage gap.
upstream/maine3f9a64fintocompute/d16-sample-srv-manifest(commit326946e6).Conflicts resolved:
src/direct_compute_cache.cppkeepsmain'sif (b.requires_identity_dst_sel) srv_lines << " identity_dst_sel";in thebuffer_srv/raw_vector_srv/byte_window_srvbranch and(b.kind == ComputeViewKind::texture_srv || b.kind == ComputeViewKind::d16_sample_srv)on the texture-SRV branch;tests/native_compute_manifest_reasons.cppkeepsmain'spacked_d16_x_uavcases andbinding-based
published[]layout, plus alld16_sample_srvpositives (4) and refusals; thefinal count is
cases (22) + published (12) + 2 = 36.tests/startup_stream_consumer.cppmerged cleanly; the only delta vs
mainthere is theX2W_TEST_RECORDS32=1opt-in.tests/startup_compute_d16_sample_srv_check.py: theDispatch(3, 2, 2) translatedassertion nowruns before
check_wordsin both post-publication dispatches (viaassert_translated), and itsfailure message prints any
refused:andx2w-d3d12-debugstderr lines, so a dispatch that didnot write names its cause instead of hiding behind the word comparison.
tests/startup_stream_consumer.cpp,dispatch_slot67): no heap-slot or viewbug found for
dispatch-texdim-1d+X2W_TEST_RECORDS32=1. The table holds the input SRV at byte 0,the output UAV copied to byte 32 with byte 16 zeroed, and the texture SRV created at byte 64; the
three ranges do not overlap, and the byte-32 record follows the same copied-record pattern as
dispatch-records32. Word 0 still holding the sentinelc5c5c5c5is consistent with the dispatchbeing refused or untranslated after publication, which the reordered assertion now surfaces.
dmask:0x3case (image_sample_lz v12, v[8:9], s[24:31], s[20:23] dmask:0x3 dim:SQ_RSRC_IMG_2D d16) from the 2x1 RGBA8_UNORM texture (dispatch-sampled-2x1): the right texelat
(0.75, 0.5)holds R = 1.0, G = 64/255, so the packed word is0x34043c00(RNE(1.0) =0x3c00low, RNE(64/255) =
0x3404high), pinning the two-channel pack and the<< 16second-half shiftin
src/gfx1013_direct_compute.inl. Pinned in bothcheck_compiler(publishes the srv line) andthe GPU dispatch in
check. Correction to the review premise, verified withstruct.pack('<e', ...)and a simulation ofpacked_half_rne: truncating 64/255 to binary16 alsogives
0x3404, so this case pins the packing, not RNE against truncation for G.sample/load->samplein the test docstring, the docs note and this body, sinceimage_load ... d16is refused asunsupported image dimension or D16.ctest --preset pr) builds neithercompile_dxilnorstartup_stream_consumerand its filter matches nostartup_compute_d16_sample_srv_*test, sogreen CI does not cover this fixture.
Linux verification (this host; no Windows GPU run claimed)
decoder pinning of the D16 bit and the
dmask:0x3encoding,structbinary16 reference,assertion order, consumer layout, docs scope): PASS.
tests/form_coverage_check.py: passed.tests/docs_links_check.py: passed (174 Markdown files,713 links).
tests/bidi_controls_check.py: passed (2662 files).packed_half_rne, dropping the<< 16second-half shift, removingd16_sample_srvacceptance,reverting the
dmask:0x3encoding todmask:0x1, moving the translated assertion back aftercheck_words), then the copies were discarded and the clean tree re-verified PASS.Round 5: merge upstream/main (commit
d6713099)a25d1217passed devcteston Windows:native_compute_manifest_reasons,startup_compute_d16_sample_srv_controlsandstartup_compute_d16_sample_srv_hardware(including the new
dmask:0x3case) all PASSED;_warpskipped with exit 77.upstream/main8a30428aintocompute/d16-sample-srv-manifest(commitd6713099).8a30428aincludes the named#3351/#3454(c3385469) plus three later merges (#3455,#3457,#3458); the merge brings in the cube-sample and indexed-atomic-UAV manifest work.Conflicts resolved:
tests/startup_stream_consumer.cppkeepsmain'smode.rfind("dispatch-cube", 0) == 0alongside theX2W_TEST_RECORDS32=1output-at-byte-32clause on the
dispatch_slot67condition;tests/native_compute_manifest_reasons.cppkeepsall of
main'scube_*/indexed_atomic_uavcases andpublished[]rows (including thetexcubearrrow and the indexed atomic publish check) alongside thed16_sample_srvcases,with
published[]inmain's(binding, kind, dim, line)order: 27 cases + 13 published + 3= 43 checks. The
d16test and docs note are unchanged in this merge.dmask:0x3kept as0x34043c00, untouched. A 2-channel fractional value where RNE differsfrom truncation is not available from the existing fixtures: every channel byte in the shared
2x1 RGBA8 texture (
dispatch-sampled-2x1: 0, 255, 64, 128, 32) rounds identically under RNEand truncation, and that texture is shared with
startup_compute_dispatch_texture_check.py,so a separating value would need a new fixture rather than a one-line change.
K kind;field in the
published[]struct and dropped its closing};; both were found by compilingthe merged test file and repaired in the merge commit.
Linux verification (this host; no Windows GPU run claimed)
tests/native_compute_manifest_reasons.cpp(the real test file) compiled and ran on Linuxagainst the real
format_compute_runtime_manifest+view_kind_name/view_shapesource,extracted verbatim from
src/direct_compute_cache.cppinto a throwaway/tmpfile with thereal platform-independent headers:
0 of 43 manifest reasons wrong, exit 0. The full Windowstarget still needs
<d3d12.h>and cannot build here, and no D3D12 stubs were created.Negative controls on throwaway copies: dropping
d16_sample_srvacceptance fails 5 of 43,dropping the
cube_sample_srvpublish branch fails 1 of 43.dispatch_slot67clauses present,all
d16/cube/indexed_atomic_uavcases present, 13 published rows inmain's order,count
+3,dmask:0x3untouched,git diff --checkclean).tests/form_coverage_check.py: passed.tests/docs_links_check.py: passed (175 Markdown files,713 links).
tests/bidi_controls_check.py: passed (2667 files).git merge-tree --write-tree upstream/main HEADexits 0.Round 6: merge upstream/main #3397 + WARP diagnostics (commit
2a8131ac)upstream/main5de0b114(PR #3397, typed-buffer UAV) intocompute/d16-sample-srv-manifest(commit
5eb5cf4d). All 3 one-hunk conflicts resolved keeping both sides:src/direct_compute_cache.cppkeepsmain'styped_buffer_srvbranch(
srv ... typed table ... bytes) above this PR's(texture_srv || d16_sample_srv)branch;tests/native_compute_manifest_reasons.cppkeepsmain's twotyped_buffer_srvrefusal cases (required_bytes20 and 6) alongside thed16_sample_srvcube / 2D-array refusals and the comparison-sampler case, andmain'styped_buffer_uavcase (now withrequired_bytes = 20); the count is now29 cases + 13 published + 3 = 45 checks.
tests/startup_stream_consumer.cppkeepsmain'sinput_offset,dispatch-srv-token-typedanddispatch-records32-input-nullterms in theoutput-at-byte-32 condition AND this PR's
|| (records32 && strcmp(records32, "1") == 0).git merge-tree --write-tree upstream/main HEADexits 0,git diff --checkclean.1d texel 1.5: word 0 expected ea74dd76, read c5c5c5c5on
72c70d48, @Leyukaka's items 1 and 3 still open): every code path the 1d dispatch touches wasre-read — the test's
program/publish/check, the consumer'sdispatch-texdim-1d+X2W_TEST_RECORDS32=1+ heap (4 descriptors;title_stride == desktop_stride, so on a 64-byteWARP increment title byte 64 maps to desktop slot 1, and the 32-byte texture token at byte 64 and
the 16-byte output record at byte 32 are literal byte reads from title memory, not
handle-aligned views), the published-route binding in
src/startup_stubs/d3d12_compute_dispatch.inl(thetex1dslot parses, and the token / slot-18 /description /
address_view_fitschecks all pass for this 1DR32_FLOATview in code), and thed16image_sample_lzsampleLevel.f32emission (1 coordinate plusundefs, D16 pack; alreadyproven by the Win11 hardware pass on
a25d1217).dispatch-cubeuses the same output-at-32 /SRV-at-64 layout with no material difference. No deterministic WARP or 1D bug was found in code,
and no runtime result is claimed from any adapter this Linux host did not run: the
72c70d48run never captured the refusal reason (
check_wordshid it), so the failure is still unexplainedand items 1 and 3 stay open until
2a8131acis re-run on a Wave32 WARP host (Server 2025 WARP),where the assertion below now prints the cause.
2a8131ac, test only):assert_translatednow also prints thex2w-draw computelines and thex2w-render compute censuslines (first refusal and itsdescriptor words) alongside the
refused:andx2w-d3d12-debuglines, andcheck_wordstakesthe dispatch result and prints the draw lines on a word mismatch after a translated dispatch.
Linux verification (this host; no Windows GPU run claimed)
tests/native_compute_manifest_reasons.cpp(the real test file) compiled and ran on Linuxagainst the real
format_compute_runtime_manifest+view_kind_name/view_shapesource,extracted verbatim from
src/direct_compute_cache.cppinto a throwaway/tmpfile with thereal platform-independent headers:
0 of 45 manifest reasons wrong, exit 0. Direct formatterprobes also publish the typed lines (
srv 0 typed table 1 64 bytes 8,uav 0 typed table 1 32 bytes 8). The full Windows target still needs<d3d12.h>and cannotbuild here, and no D3D12 stubs were created.
program()builds and decodes for all four kinds plus2d dmask:0x3,sample centres incl. the unnormalized 2D-array slice
2.0,DMASK3_PACKED == 0x34043c00,consumer condition terms,
assert_translated/check_wordsmessages naming therefused/debug/draw/census lines on a fake refused result). 5/5 empirical spot-mutations on
throwaway copies each failed as expected (drop
d16_sample_srvacceptance, drop thetyped_buffer_srvbranch, drop theRECORDS32term, drop the draw/census lines fromassert_translated, normalize the 2D-array slice), then the copies were discarded and theclean tree re-verified PASS.
tests/form_coverage_check.py: passed.tests/docs_links_check.py: passed (176 Markdown files,713 links).
tests/bidi_controls_check.py: passed (2667 files).git merge-tree --write-tree upstream/main HEADexits 0.Windows Verification
2a8131acc35ff7496f0e5839f773f6694e613761dev:ctest --preset dev --no-tests=error -R '^(native_compute_manifest_reasons|startup_compute_d16_sample_srv_(controls|warp|hardware))$' --output-on-failure->3 passed, 0 failed, 1 skipped(21.23s;manifest_reasons3.82s,controls1.06s,warpskipped exit77on 4-lane WARP,hardware11.86s)release:ctest --preset release --no-tests=error -R '^(native_compute_manifest_reasons|startup_compute_d16_sample_srv_(controls|warp|hardware))$' --output-on-failure->3 passed, 0 failed, 1 skipped(13.45s;manifest_reasons0.22s,controls0.83s,warpskipped exit77,hardware11.53s)dev):startup_compute_dispatch_texture_dims_(warp|hardware)&startup_compute_indexed_atomic_uav_hardware->3 passed, 0 failed(2.74s,8.33s,4.42s)NVIDIA GeForce RTX 4050 Laptop GPU (10de:28e1), driver 32.0.15.9186(debug layer unavailable)form_coverage_check.py,docs_links_check.py(176 Markdown files, 713 links), andbidi_controls_check.py(2667 files) passed.AI-assisted.
Full-wave fix (
dfc140ed, addresses @Leyukaka's change request item 3 and @JohnConnorNPC's MUST #1)Root cause (confirmed by @Leyukaka's WARP 1.0.22 run): case A's (2, 3, 4) group is 24 threads, a partial
wave under WaveSize(32) that fails WaveActiveBallot(true) (#3160), so no store reaches the UAV. This
PR's layout was not the cause (
mainfails the same way without it). Option 1, as both reviewerspreferred: dispatch a full 32-thread wave and pass.
tests/startup_stream_consumer.cpp:dispatch_slot67readsX2W_TEST_FULL_WAVE=1and dispatches3x3x1 groups instead of 3x2x2; every other caller keeps 3x2x2.
tests/startup_compute_d16_sample_srv_check.py:GROUP = (8, 4, 1),GROUPS = (3, 3, 1), index(tgid_x + 3 * tgid_y) * 32 + (v0 + 8 * v1)(same 288 words, same 32 trailing sentinels),env['X2W_TEST_FULL_WAVE'] = '1', log assertionsDispatch(3, 3, 1); new no-argcontrols()pins the full-wave encoding,
[numthreads(8, 4, 1)],DMASK3_PACKED == 0x34043c00and the texelmodel, wired in
tests/checks/python-linux/d16-sample-srv-manifest.txtfor Linux CI.docs/experiments/compute-d16-sample-srv.md: documents the 8x4x1 / 3x3x1 fixture.origin/maind3e306a7cleanly (mergec13fc8d8,git merge-tree --write-treeexits 0).Linux verification (this host cannot run Windows CTest or compile_dxil):
tests/startup_compute_d16_sample_srv_check.py(no-arg controls): passed.tools/run_checks_parallel.py --from-dir tests/checks/python-linux: all 59 checks passed (58 + the new d16 check).tests/form_coverage_check.py,tests/docs_links_check.py(177 files, 716 links),tests/bidi_controls_check.py(2678 files): passed.git diff --check: clean.no-arg-entry/consumer-branch), then the copies were discarded.
The
2a8131acrun passed with_warpskipping 77 on 4-lane WARP; this head needs a wave32 WARP host(Server 2025 / WARP 1.0.22) to exercise the fix.
AI-assisted.
Windows Verification (
dfc140ed)AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T02:35:44Z.
Review: APPROVED
Reviewed
72c70d48by reading the diff againstmain212d4b5f. No local build or run.The formatter change (
src/direct_compute_cache.cpp:960-961) givesd16_sample_srvthe same shape gate (array_count == 1, dimension 0/1/2/5) and the samesrv <i> tex1d|tex2d|tex3d|tex2daline astexture_srv. That matches the producer: the decoder admits D16 only on sample ops 32/34/36/37/39 outside cube (src/gfx1013_compute_native.cpp:190-194), so D16 loads, gathers and comparison samples are refused before the formatter, and the translator packs each sampledf32channel withpacked_half_rne(src/gfx1013_direct_compute.inl:1279-1290).src/native_compute_pipeline.cpp:36-48treats every non-heap SRV kind alike, consistent with no runtime change.Tests: the
comparison samplercase innative_compute_manifest_reasonsdiscriminates. Onmainthat program is refused earlier asSRV kind d16_sample_srv 2d, so the case fails there. By reading, dropping the newd16_sample_srvclause also fails the four D16 published rows and the publish step of the dispatch test. The D16 cube and array cases pass onmaintoo; they pin the shape gate.Not covered:
prpresets: the build preset has none ofcompile_dxil,startup_stream_consumer,native_compute_manifest_reasons, and the test filter matches none ofnative_compute_manifest_reasonsorstartup_compute_d16_sample_srv_*. The evidence is the log in the description, where_warpis skipped (exit 77) and the dispatch is checked by_hardwareonly; CI onmainexcludes_hardware$.src/gfx1013_direct_compute.inl(unchanged here) would pass the new fixture.:1284"16"->"0": every fixture usesdmask:0x1, so no pair of halves is formed.:1280packed_half_rne-> truncation: every texel (1.5, 2.5, 14.5, 10.0) is exact in binary16. Suggestion, here or in a follow-up: onedmask:0x3sample of a value that needs rounding pins both.:3) and the test docstring (:1,:8) say "sample and load" / "sampled or loaded", while D16 loads are refused, as the doc says at:37-39.Overlap: #3398 edits the same
published[]table intests/native_compute_manifest_reasons.cpp(abindingcolumn and UAV rows there, akindcolumn here); whichever lands second combines the two.Approve
72c70d48.Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-29T08:12:03Z.
Review: COMMENTED
Reviewed
72c70d48b8d03f6766ee28e88781115726815b43:Running the PR's tests on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) failed in both Debug and Release:
ctest --preset dev -R '^(startup_compute_d16_sample_srv_|native_compute_manifest_reasons$)' --parallel 3 --no-tests=error --output-on-failure: 2/4 passed, 2 failed (native_compute_manifest_reasonsandstartup_compute_d16_sample_srv_controlspassed;startup_compute_d16_sample_srv_warpandstartup_compute_d16_sample_srv_hardwareboth failed withAssertionError: 1d texel 1.5: word 0 expected ea74dd76, read c5c5c5c5).ctest --preset release -R '^(startup_compute_d16_sample_srv_|native_compute_manifest_reasons$)' --parallel 3 --no-tests=error --output-on-failure: 2/4 passed, 2 failed (same failure:1d texel 1.5: word 0 expected ea74dd76, read c5c5c5c5).AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T08:26:54Z.
Review: CHANGES_REQUESTED
This replaces my approval of
72c70d48, until the failure in the report above is explained. By reading only, no local build or run.check()(tests/startup_compute_d16_sample_srv_check.py:234-235). The first dispatch was refused withno translationandpublish()passed, so the manifest hassrv 1 tex1d table 1 64,srv 0 buf table 1 0anduav 0 table 1 32, and there is no.cs.hlsl. Word 0 still holding the sentinelc5c5c5c5means the dispatch after publication did not write it. The formatter change is not what fails.check_words(:235) runs before theDispatch(3, 2, 2) translatedassertion (:236), so the message does not say whether the runtime refused the dispatch or ran it without the stores reaching the output._warpexits 77 at the--shader-wave32gate, so the dispatch was shown on one hardware adapter. In the report_warpgets past that gate (check()runs only after it) and fails like_hardware.cmake --build --preset prandctest --preset pr(.github/workflows/windows.yml). InCMakePresets.jsononmain2397aad3, theprbuild presettargetslist has neithercompile_dxilnorstartup_stream_consumer, and theprtest filter matches nostartup_compute_d16_sample_srv_*.Hypothesis, not a finding:
X2W_TEST_RECORDS32=1(new here) puts the output descriptor at table byte 32 whiledispatch-texdim-1dcreates the texture view at byte 64.tests/startup_stream_consumer.cpp:447and:914say byte 32 is not a descriptor handle where the heap increment is above 32 (WARP). Those comments are about views created at a handle; here byte 32 holds a copied record, as indispatch-records32, so this only points at the layout as the adapter-dependent part.Requested:
refused:line or its absence, and anyx2w-d3d12-debuglines.translatedassertion beforecheck_words, so the failure names its cause.Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T12:55:29Z.
Review of head
72c70d48againstmainaf1cab5c(the merge-base is212d4b5f). Read only, nothing built or run.MUST
main.git merge-tree --write-tree --name-only origin/main 72c70d48exits 1 withCONFLICT (content): Merge conflict in src/direct_compute_cache.cpp, in one hunk.main'ssrv … buf tablewriter now appendsidentity_dst_sel(if (b.requires_identity_dst_sel)) just above this PR's(b.kind == ComputeViewKind::texture_srv || b.kind == ComputeViewKind::d16_sample_srv)condition. To resolve, keepmain's block and this PR's condition. Please rebase.1d texel 1.5: word 0 expected ea74dd76, read c5c5c5c5) and the change request after it are still open. There has been no reply and no new commit since, and the head is still72c70d48.SHOULD
run.shandrun.ps1setX2W_NATIVE_SHADERS_ONLY=1, andload_compute_translationreturns atif (native_shaders_only()) {before it reads<key>.txt. So in a default run nothing reads the newsrv <i> tex1d|tex2d|tex3d|tex2dalines for D16. The in-process route has no D16 case either. Intranslate_compute_natively,texture_inputaccepts onlytexture_srvorcomparison_texture_srvatimage_dimension == 1, sod16_sample_srv(enum value 17) is thrown asview kind 17 is not bound for a natively translated program. The 64,499 dispatches in the body are a published-route count, and default runs will keep refusing those shaders. Please state this in the body and the doc. A native-route binding, here or in a follow-up issue, is what would recover them by default.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-11-29T14:28:30Z.
Addressed review items and merge conflicts in
d6713099(clean merge overupstream/main8a30428a):@JohnConnorNPCMUST #1): Resolvedsrc/direct_compute_cache.cpp(identity_dst_selkept alongsided16_sample_srv),tests/native_compute_manifest_reasons.cpp(keptmain'spacked_d16_x_uav/cube_*/indexed_atomic_uavcases andtexcubearr/atomic publish checks alongsided16_sample_srv,0 of 43failures), andtests/startup_stream_consumer.cpp(dispatch-cubekept alongsideX2W_TEST_RECORDS32=1).@LeyukakaCHANGES_REQUESTED#1–2 /@tedin7report): Movedassert_translated(Dispatch(3, 2, 2) translated) beforecheck_words()intests/startup_compute_d16_sample_srv_check.pyso any refused dispatch logsrefused:andx2w-d3d12-debuglines directly instead of masking behindread c5c5c5c5. Re-verifieddispatch_slot67+X2W_TEST_RECORDS32=1writes byte 32 without colliding with byte 64. (On this Windows 11 host, 4-lane inbox WARP10.0.26100.7309skips via--shader-wave32with exit77; RTX 4050 passes in bothdevandrelease.)dmask:0x3packing & wording (@Leyukakacoverage gap): Added a 2Ddmask:0x3case (dispatch-sampled-2x1,0x34043c00) pinning two-channel packing and the<< 16half shift in both_controlsand_hardware, and fixed docstring/doc wording (sample and load->sample).@JohnConnorNPCSHOULD #3): Added scope note in the PR body anddocs/experiments/compute-d16-sample-srv.mdexplainingX2W_NATIVE_SHADERS_ONLY=1since#3449and notingtranslate_compute_nativelyremains a separate follow-up.Windows verification (
d6713099):dev(20.21s) andrelease(13.53s) both3/4passed (native_compute_manifest_reasons,startup_compute_d16_sample_srv_controls,startup_compute_d16_sample_srv_hardware),1skipped (startup_compute_d16_sample_srv_warpexit77via--shader-wave32);form_coverage_check.py,docs_links_check.py(175 files / 713 links), andbidi_controls_check.py(2663 files) passed.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T14:42:26Z.
Re-review of head
d6713099(the delta since72c70d48) againstmain5de0b114. Read only, nothing built or run.MUST
mainagain now that #3386 and #3397 have landed.git merge-tree --write-tree --name-only origin/main d6713099exits 1 with conflicts insrc/direct_compute_cache.cpp,tests/native_compute_manifest_reasons.cppandtests/startup_stream_consumer.cpp, one hunk each. All three resolve by keeping both sides:main's newtyped_buffer_srvbranch (srv … typed table … bytes) goes above this PR's(texture_srv || d16_sample_srv)condition.main's twoSRV kind typed_buffer_srvcases sit next to the D16 cases.main'sinput_offset,dispatch-srv-token-typedanddispatch-records32-input-nullterms and add this PR'sX2W_TEST_RECORDS32check.1d texel 1.5: word 0 expected ea74dd76, read c5c5c5c5) is still unexplained, and the change request after it is still open. Movingassert_translatedahead ofcheck_wordscovers its item 2. Items 1 and 3 are still open: the failing run's stderr, and a fix or the reason the result depends on the adapter. The new verification ran on a host where_warpexits 77 at the--shader-wave32gate, so it never reached the dispatch that failed on the other host. Runningd6713099on that host would settle it, since the assertion now prints therefused:andx2w-d3d12-debuglines.Resolved since
72c70d48docs/experiments/compute-d16-sample-srv.mdnow say that the64,499dispatches are on the published route, becauseX2W_NATIVE_SHADERS_ONLY=1has been set since #3449. They also say thattranslate_compute_nativelyis a follow-up.dmask:0x3case matches the consumer's texture. Indispatch-sampled-2x1the right texel is{255, 64, 128, 32}, so R 1.0 and G 64/255 pack to0x34043c00. The note that truncation gives the same G half is correct: 64/255 is about 4.02 binary16 steps above 0.25, which gives0x3404either way.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T15:10:44Z.
Ran
d6713099andmain5de0b114on WARP 1.0.22. The_warpfailure reproduces, andmainfails the same way without this PR.Setup: Windows 11 build 26300,
devpreset with-DX2W_WITH_OPUS=OFF, full build. WARP 1.0.22 comes from theMicrosoft.Direct3D.WARPNuGet package, placed next to the test executables. Hardware adapter: NVIDIA GeForce RTX 5080, driver 32.0.16.2101.d6713099,ctest --preset dev --no-tests=error -R '^startup_compute_d16_sample_srv_':The traceback ends in
check_words(tests/startup_compute_d16_sample_srv_check.py:276), afterassert_translatedat:275. So the dispatch was translated, not refused, and no store reached the output. The debug layer was unavailable in this environment, so there are nox2w-d3d12-debuglines.main5de0b114,ctest --preset dev --no-tests=error -R '^startup_compute_dispatch_native_':This is
scalar_window_case(tests/startup_compute_dispatch_native_check.py:120). Its stderr hasDispatch(3, 2, 2) translatedandfirst refusal: none. It uses no sampler, no D16 view and noX2W_TEST_RECORDS32, so the byte-32 layout hypothesis from my change request does not hold, and the WARP failure is not caused by this PR.Likely cause: a partial wave under
WaveSize(32)on WARP 1.0.22 (#3160). Both tests dispatch case A, group(2, 3, 4), which is 24 threads (tests/startup_gfx2hlsl_compute_check.py:713). On5de0b114the lowering sets EXEC fromwaveActiveBallot(true)(src/gfx1013_direct_compute.inl:287) and takes every buffer and image store only whenEXEC & (1 << waveGetLaneIndex())is non-zero (:176-179,:863-866,:1356-1359). A ballot that lacks the lane's bit skips every store, which matches both logs. On the same WARP,native_ds_bpermute_warpfrom #3320 dispatches 32 threads per group and passes. The repo already notes this attests/native_int32_minmax3_check.py:10: "Full physical waves avoid the WARP 1.0.22 partial-wave ballot issue (#3160)".Not measured: the ballot and lane index values WARP returns. The cause is inferred from the code and the pass/fail pattern.
Option the repo already uses: dispatch a full 32-thread group in the test, as
native_int32_minmax3_check.pydoes. Otherwise make_warpskip this dispatch with exit 77 and a message that names #3160.Change request: items 1 and 2 are answered by the above and by the reordered assertion. Item 3 is closed once
_warpeither dispatches a full wave and passes, or skips cleanly, on WARP 1.0.22. I will re-run that head and lift the change request if_warpno longer fails and nothing else regresses. The conflict withmainreported above still needs a rebase.Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-11-29T15:27:59Z.
Addressed
@JohnConnorNPC's review ond6713099(IC_kwDOV10-fc8AAAABsJTa_Q) across5eb5cf4d..2a8131ac:MUST #1): Mergedupstream/main(5de0b114, including#3386൅) cleanly in5eb5cf4d, preserving bothmain'styped_buffer_srv/typed_buffer_uavmanifest branches/cases andinput_offset/dispatch-srv-token-typed/dispatch-records32-input-nullalongsided16_sample_srvandX2W_TEST_RECORDS32.git merge-tree --write-treeover5de0b114exits 0.MUST #2):2a8131acextendsassert_translatedandcheck_wordsintests/startup_compute_d16_sample_srv_check.pyto printrefused:,x2w-d3d12-debug,x2w-draw compute, andx2w-render compute censuslines on failure so any run on a Wave32 WARP host reports the exact refusal or binding state directly. Local Windows 11 WARP (10.0.26100.7309,4..4) still exits77at--shader-wave32and cannot reproduce the Server 2025 WARP failure locally.2a8131ac): Passeddev(3 passed, 1 skipped,21.23s),release(3 passed, 1 skipped,13.45s), regressions (3/3,15.60s), and repo Python checks (176docs /2667files) onNVIDIA GeForce RTX 4050 Laptop GPU (10de:28e1), driver 32.0.15.9186.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T15:34:54Z.
Re-review at
2a8131ac, covering the delta sinced6713099: the merge5eb5cf4dand the diagnostics commit2a8131ac. Read only, nothing built or run.Resolved
git merge-tree --write-tree origin/main 2a8131acexits 0 onmaincf0c30af. The5eb5cf4dresolution keeps both sides.main'styped_buffer_srv/_uavbranches and cases stay, and indispatch_slot67the consumer still hasmain'sinput_offset,dispatch-srv-token-typedanddispatch-records32-input-nullterms, withX2W_TEST_RECORDS32=1added as one more term. Comparinggit diff 5de0b114...d6713099withgit diff 5de0b114 5eb5cf4d, the only difference is that line's new wrapping.2a8131acuse prefixes the runtime prints.git grep -c -Foversrc/toolsfindsx2w-draw compute(15),x2w-render compute census(5) andx2w-d3d12-debug(1).MUST (still open)
_warpstill fails on WARP 1.0.22, and nothing at this head handles it. The 15:10Z WARP run gives the cause. The run is translated (assert_translatedpasses), andmain5de0b114failsstartup_compute_dispatch_native_warpthe same way. Both dispatch case A with a 24-thread group, so this is the partial-wave ballot issue underWaveSize(32)(#3160), not this PR's layout.2a8131aconly adds diagnostics, and it was checked on a WARP that exits 77 at--shader-wave32, so it doesn't reach the failing dispatch. To close it and the open change request (item 3), do one of these on WARP 1.0.22:tests/native_int32_minmax3_check.pyand #3319 now do. The consumer hard-codes case A (GROUPS == (3, 2, 2)), so this needs a 32-thread program or consumer mode; or_warpexit 77 with a message that names #3160._hardwarestays as the guard.Still not blocking: CI is green on
2a8131ac, but theprpreset runs none of thestartup_compute_d16_sample_srv_*tests.Not merged: MUST 1 is open and the change request is standing.
AI-assisted review.
Imported from R0Y00/Xbox2Windows. Originally posted by Ammmae0x on 2026-11-29T19:32:36Z.
Addressed
@Leyukaka'sCHANGES_REQUESTED(IC_kwDOV10-fc8AAAABsJp-vQ) and@JohnConnorNPC'sMUST #1(IC_kwDOV10-fc8AAAABsJ9ikw) indfc140ed(cleanly merged withupstream/maind3e306a7):tests/startup_compute_d16_sample_srv_check.pyfrom the 24-thread partial wave(2, 3, 4)to a full 32-thread waveGROUP = (8, 4, 1)withGROUPS = (3, 3, 1)(288active words,32trailing sentinels) andX2W_TEST_FULL_WAVE=1intests/startup_stream_consumer.cpp, avoiding the WARP 1.0.22 partial-wave ballot issue (#3160) under[WaveSize(32)].controls()wired into Linux CI (tests/checks/python-linux/d16-sample-srv-manifest.txt) and updateddocs/experiments/compute-d16-sample-srv.md.dfc140ed, NVIDIA GeForce RTX 4050 Laptop GPU, driver32.0.15.9186):dev4 passed / 1 skipped (23.61s),release4 passed / 1 skipped (16.38s; Win11 WARP skips 77 without 32-lane waves), andstartup_compute_d16_sample_srv_check.py,form_coverage_check.py,docs_links_check.py,bidi_controls_check.pyall pass. Needs re-run on a Wave32 WARP 1.0.22 host to confirm_warpthere.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by JohnConnorNPC on 2026-11-29T19:46:07Z.
Re-review of head
dfc140ed(the deltac13fc8d8..dfc140ed, since2a8131ac) againstmain5b86df1d. I only read the code; I built and ran nothing.No new MUST. The open MUST from the last round, the WARP 1.0.22
_warpfailure, is fixed in code the way the change request suggested: the fixture now dispatches a full 32-thread wave. Nobody has seen_warppass on a WARP 1.0.22 host yet, though. The author's WARP exits 77 at--shader-wave32, and PR CI doesn't run these tests (the Windows job runs the 82-testprpreset, andstartup_compute_d16_sample_srvappears 0 times in its log). Item 3 of the change request is still waiting on the re-run that its author offered. Nothing else is needed from my side.Checked in the delta
WaveSize(32). I decoded the replacement bytes by hand.030043d5 01110104isv_mad_u32_u24 v3, v1, 8, v0(VOP3 0x143, src1 is inline 8).14a01493iss_mul_i32 s20, s20, 32(SOP2 op 38, ssrc1 0xa0 = 32).(tgid_x + 3 * tgid_y) * 32 + (v0 + 8 * v1)covers words 0..287 once each over 3x3x1 groups. Case A's stored value depends only onv3(input[v3] * 33 ^ (s4 + v3 * s5)), soC.expected('A')and the 32 trailing sentinels still hold.with_full_wave_indexasserts that the old sequence occurs exactly once.program()moves the decoded window by the length difference, and that window is still asserted step by step.X2W_TEST_FULL_WAVEchanges only the consumer's defaultinvoke(list, 14, ...)branch, and only this check sets it (git grep X2W_TEST_FULL_WAVE). TheDispatch(3, 3, 1) translatedandDispatch(3, 3, 1) refused: no translationassertions read the runtime'sDispatch(%u, %u, %u)log line. If the consumer ignored the variable, the check would fail rather than pass at 3x2x2.controls()runs in the Linux Python job. Its log hastests/startup_compute_d16_sample_srv_check.py (ok, 1.7s)andall 267 checks passed.git merge-tree --write-tree --name-only origin/main dfc140edexits 0 on5b86df1d. Since the merge based3e306a7, both sides touch onlysrc/direct_compute_cache.cpp.mainchanged the decode bound andview_kind_name. This PR changes the manifest'stexture_srv || d16_sample_srvcondition, which is separate from both.run.shandrun.ps1exportX2W_NATIVE_SHADERS_ONLY=1, andload_compute_translationreturns before it reads any manifest. Only runs on the published-Translateroute read these lines.AI-assisted.
Imported from R0Y00/Xbox2Windows. Originally posted by Leyukaka on 2026-11-29T20:03:02Z.
Review: APPROVED
Approve
dfc140ed. This replaces my change request on72c70d48, which asked for the stderr of the failing 1d dispatch, thetranslatedassertion beforecheck_words, and a fix or the reason the result depends on the adapter.assert_translated(tests/startup_compute_d16_sample_srv_check.py:311-320) runs beforecheck_wordsafter publication and prints therefused:,x2w-d3d12-debug,x2w-draw computeand census lines.GROUP = (8, 4, 1)andGROUPS = (3, 3, 1)(check.py:128-134), still 288 written words.X2W_TEST_FULL_WAVE=1changes only the default dispatch branch (tests/startup_stream_consumer.cpp:908-909), and the script asserts onDispatch(3, 3, 1), so an ignored variable fails.dfc140edin an isolated environment (network off, PR tree read-only,devpreset,-DX2W_WITH_OPUS=OFF):ctest --preset dev --no-tests=error -R '^startup_compute_d16_sample_srv_'exits 0._controlspassed,_hardwarepassed (5 cases, 320 words each, debug layer unavailable),_warpskipped (77)._warpprintedadapter=Microsoft Basic Render Driver vendor=1414 device=008c,driver=10.0.26100.9818,native_lane_range=4..4, thenskip: shader wave32 fixture requires SM 6.6, WaveOps, and a 32-lane wave. The WARP path is therefore still unobserved here: this run does not show the full-wave dispatch passing on the WARP that failed in the earlier report._hardwareoutput prints no adapter or driver line, so that adapter is not identified by the log.