Skip to content

Compute descriptor stride SCC from bound buffer metadata - #3227

Merged
R0Y00 merged 1 commit into
R0Y00:mainfrom
RonLogic:shader/native-descriptor-scc
Nov 28, 2026
Merged

R0Y00 merged 1 commit into
R0Y00:mainfrom
RonLogic:shader/native-descriptor-scc

Conversation

@RonLogic

Copy link
Copy Markdown
Contributor

Change

Refs #3224. The direct Compute frontend can now calculate SCC after extracting the 14-bit stride of a buffer SRV or taking its unsigned max with 1. The live flag comes from the runtime's resolved descriptor metadata. Buffer address provenance stays symbolic. Both max operand orders preserve their strict comparison, including equality at stride 1.

Only fixed, unambiguous SRV table slots are eligible. The in-process and published dispatch paths use the same existing stride value, appended after the regular entry constants. Dynamic heap descriptors, CBV/UAV ranges and numeric reads of other symbolic fields still refuse.

Verification

Tested e1b3f898 on main 7fcde81f, Windows 11 build 26300.10075, DXC 1.9.2602.17 and RTX 4070 driver 32.0.16.2124.

  • Build: cmake --build --preset <release|dev> --target compile_dxil native_store_replay startup_stream_consumer.
  • On each stock preset: ctest --preset <release|dev> --no-tests=error -R '^(native_descriptor_scc|startup_compute_descriptor_scc|native_direct_container$|native_compute_raw_root$|native_scalar_lds|startup_compute_dispatch_native)'. Five passed. Two new in-box WARP cases skipped because wave32 is unavailable. The two existing native Dispatch checks stopped at their cache allowlist because revision.txt appeared. A clean build of 7fcde81f reproduces the same failure. Allowing only the revision marker separately restores the hardware pass and WARP capability skip on both presets.
  • Agility 1.620.2 + app-local WARP 1.0.22: ctest --test-dir out/build/agility-warp --no-tests=error -R '^((native_descriptor_scc|startup_compute_descriptor_scc)_(warp|hardware)|native_direct_container)$'. Five passed, including RTX 4070 and WARP on both new paths. Both runtime routes matched 12 groups for each of strides 0, 1, 4 and 16 and preserved all 272 sentinel words per dispatch. The runtime debug checks reported no errors.
  • The isolated replay matched six supplied values and rejected missing stride metadata before dispatch. The companion compile control rejects the same slot when its range is UAV. The clean main compiler refuses the positive fixture with numeric SCC from a symbolic descriptor field.

Evidence and follow-up

The fixtures are source-built and MIT-licensed. The experiment notes describe their entry layout and commands. This verifies the supported stride instructions on public fixtures. The rank-8 capture in #3224 still needs an instruction-shape comparison at the reported compiler revision. The branch merges cleanly against main and #3049, #3154, #3221 and #3225.

  • Covers one reviewable behavior.
  • Includes commands and results, including capability skips and the baseline regression.
  • Includes negative controls and reproduction notes.
  • Contains source-built material only.

I used Codex to prepare the change and ran verification locally.

@R0Y00 R0Y00 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Independent review of e1b3f89. The lowering resolves one fixed SRV binding and consumes the runtime-provided stride before entering the shader, preserving strict comparison for both operand orders. The missing-metadata and wrong-view controls refuse. The direct replay and Dispatch fixtures exercise GPU readback.

Windows 11 26200.9974, RTX 4060 Laptop driver 32.0.16.1656, inbox WARP 10.0.26100.9818. Debug and Release /O2 each had four passes, zero failures, and two wave32 capability skips (77) on inbox WARP. Release with pinned Agility 1.620.2 / WARP 1.0.22 ran all six tests with zero failures or skips. Debug layer requested in the Dispatch fixture.

ctest --preset dev --no-tests=error --output-on-failure -j 1 -R '^(native_descriptor_scc_(warp|hardware)|startup_compute_descriptor_scc_(warp|hardware)|native_direct_container|native_compute_raw_root)$'

Repeated under Release and the pinned Agility configuration. The current main delta since the fixture builds is limited to README navigation and two unrelated cache-test assertions. This verifies the source-built slice. Matching it to the original #3224 refusal still requires the captured shader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants