Repository navigation
Conversation
format_compute_runtime_manifest writes `srv <i> typed table <param> <byte> bytes <n>` for a typed_buffer_srv (buffer_load_format_*, read as Buffer<uint4>), n being the widest load. The stand-in resolves the title's hardware descriptor or slot 18 typed buffer view token as a buffer range and binds a UINT view of its 32-bit components; every other shape is refused with a named reason. Refs R0Y00#3224 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Refs #3224
Behavior
In the #3224 census,
SRV kind typed_buffer_srvis the largest gap between compiling a compute program and publishing its manifest. These are programs that read withbuffer_load_format_xto_xyzw(MUBUF, element index only), which the direct compiler reads as aBuffer<uint4>.src/direct_compute_cache.cpp):format_compute_runtime_manifestwritessrv <register> typed table <parameter> <byte> bytes <n>.nis 4 bytes per component of the widest load on that binding;required_bytesis already the maximum over the binding's loads.src/startup_stubs/d3d12_compute_dispatch.inl): the dispatch path resolves the table entry with the existingindirect_table_bufferrange rules and binds a UINT buffer view (R32_UINTtoR32G32B32A32_UINT) over it. A UINT view returns the same bits as the guest format unit only for 32-bit UINT, SINT and FLOAT components, so only those are bound:typed_dword_channels/typed_dword_uint_formatfrom the heap contract (native: read one-channel typed loads through a GPU-selected heap descriptor #3042).docs/experiments/compute-typed-buffer-inputs.md). A typed input on an indirect Dispatch is refused, and the in-processX2W_NATIVE_SHADERSroute is unchanged.Not in this PR:
packed_d16_x_uav. runtime: publish narrow half-float texture UAV stores #3305 appends a field to the sameSlotstruct, so mine goes at the end.Tests
tests/startup_compute_typed_buffer_srv_check.py(tests/cmake/startup_compute_typed_buffer_srv.cmake) uses the published route:compile_dxil --requests→<key>.txt→ slot 14 Dispatch on the stand-in._controls(no GPU): source-built programs for 1 to 4 components publishsrv 0 typed table 1 0 bytes 4n._warp/_hardware: for each width, a 32-bit FLOAT descriptor of 50 elements.R32G32B32A32_FLOATview token (new consumer modedispatch-srv-token-typed).no translation.Verification
Commits
89fd41b0,9a414d17and4a2720e0onmaind418f70e. Windows 11 build 26300, MSVC x64 Debug, Windows SDK 10.0.26100 DXC, D3D12 debug layer enabled._controls: passed._hardware, NVIDIA GeForce RTX 4090, driver 32.0.16.1088: passed. 1, 2, 3 and 4 components read 50 elements and then zeros, the token reads the same elements, and 4, 6, 6 and 7 refusal controls passed. No debug layer errors._warp, Microsoft Basic Render Driver 10.0.26100.9818: capability skip (77). WARP reports 4-lane waves and the direct module needs 32.typedline disabled, the manifest is published but not bound, and_hardwarefails at word 0 (expected 8b02a7f1, read c5c5c5c5). With the change restored, it passes.Regressions on the same build, run with
-R "^startup_compute_(dispatch|dispatch_input|dispatch_texture|dispatch_native|half_buffer_uav|root_srv_dispatch)_(warp|hardware)$":startup_compute_dispatch,_dispatch_input,_dispatch_textureand_root_srv_dispatchon WARP and hardware, and_dispatch_native_hardware._dispatch_native_warpand_half_buffer_uav_warp.startup_compute_half_buffer_uav_hardwarefails, and not because of this change. Its 1-channel D16 store now compiles topacked_d16_x_uav(since94d2803f), whichformat_compute_runtime_manifestdoes not write (no_manifest ... UAV kind unknown). That kind is SimSalabimse's claim on direct compute: untranslated compute shaders of a start-up run ranked by dispatches, with first refusals on main #3224, and this PR changes only the SRV branch. I read this from the code; I did not run that test atmainwithout this change.AI-assisted.
🤖 Generated with Claude Code