Skip to content

startup: name each refused slot-19 output view interval - #3387

Merged
Leyukaka merged 3 commits into
R0Y00:mainfrom
Not-Saii:startup/output-uav-interval-reasons
Nov 28, 2026
Merged

Leyukaka merged 3 commits into
R0Y00:mainfrom
Not-Saii:startup/output-uav-interval-reasons

Conversation

@Not-Saii

Copy link
Copy Markdown
Contributor

Refs #3224

The slot-19 output-token path (#3094) refused six byte-interval conditions with one message, an output UAV interval is unaligned, oversized or outside its buffer. In the 900 s census on #3224, that message is the largest runtime refusal: one shader, 1,146,106 dispatches. This PR gives each condition its own reason, in the same order, so a run shows which one fails. It is the same approach as #3229. The accepted and refused sets do not change.

# Reason Fixture
1 an output UAV interval is empty none (see below)
2 an output UAV interval is not whole dwords R16_UINT view, 1 element
3 an output UAV interval is over 16 MiB raw view, 16 MiB + 16 bytes of a committed 16 MiB + 64 KiB buffer
4 an output UAV interval is not 16-byte aligned in its buffer R32_UINT view at byte 4
5 an output UAV interval starts past its buffer none
6 an output UAV interval crosses the end of its buffer none

Reasons 1, 5 and 6 need a view that D3D12 rejects when it is created. With the debug layer on, CreateUnorderedAccessView removes the device (measured on WARP and the RTX 4090), so no fixture creates such a view. The stand-in checks the same desktop buffer width that D3D12 validated.

Fixture. tests/startup_compute_token_interval_check.py uses case A of startup_gfx2hlsl_compute_check.py with 32-byte table records, published through gfx2hlsl.py --pending.

  • A raw slot-19 view at byte 16 of the placed output buffer binds. Words 4-315 match the CPU reference.
  • Each case above replaces the view through X2W_TEST_DISPATCH_UAV. Each is refused with its own reason in the log and the census, and every word keeps its sentinel.
  • Consumer change: byte 32 of the four-descriptor heap is not a descriptor on WARP, and a view created there exits with 2173. The dispatch-uav-token-* modes now create the view at byte 64 and copy the token to byte 32, as dispatch-output-texture-token already does.

Test (commit 61bdb434 on main d418f70e, Windows 11 build 26300, debug layer on):

ctest --preset dev --no-tests=error -R "^startup_compute_token_interval_(warp|hardware)$" -V
  • startup_compute_token_interval_warp: pass (Microsoft Basic Render Driver 10.0.26100.9818)
  • startup_compute_token_interval_hardware: pass (NVIDIA GeForce RTX 4090, driver 32.0.16.1088)
  • Negative control: with only the .inl change reverted, all 3 per-reason expectations fail. Each case is still refused, with the old message.
  • native_compute_pack_hardware (uses the same dispatch-uav-token-* modes): pass on the RTX 4090; each of the five slot-19 modes reads back its expected 320 words (bound modes written, refused modes untouched), debug layer on

Next on #3224: find which condition the 1.15M-dispatch shader hits. The existing once-per-key x2w-draw compute UAV line already logs the view's format, element range, stride, flags, backing width, offset and byte count.

AI-assisted.

🤖 Generated with Claude Code

Not-Saii and others added 3 commits November 28, 2026 19:47
The slot-19 output token path refused six byte-interval conditions with one
message. Each now has its own reason, checked in the same order; the set of
accepted views is unchanged. A source-built fixture triggers each reason
through a replaced view description and checks a bound raw view reads back.

Refs R0Y00#3224

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e intervals

Byte 32 of the four-descriptor heap is not a descriptor on WARP, so the
consumer creates the view at byte 64 and copies its token to byte 32. An
empty view, or one past or across the buffer's end, is rejected by D3D12 at
creation (the debug layer removes the device), so the fixture covers the
three interval reasons a valid view can reach.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Leyukaka Leyukaka left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Review of 61bdb434.

  • The change splits one refusal condition into named reasons; the accepted and refused sets are unchanged.
  • Run here in Windows Sandbox, network off, vGPU, Windows 11 build 26300 host, release build of main f2972840 with this PR and 17 other open PRs merged locally: startup_compute_token_interval_warp and _hardware pass. Raising the 16 MiB bound to 32 MiB makes both fail.

Not covered: three of the new reasons have no fixture, so swapping two of their messages would pass.

Approve.

@Leyukaka
Leyukaka merged commit 543c250 into R0Y00:main Nov 28, 2026
5 checks passed
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