Repository navigation
startup: count refused slot 70 calls, slot 70 writes and token texture nulls - #2251
Merged
Merged
Conversation
…e nulls A loading sequence can draw sampled textures black when their descriptor- table entry holds no stand-in view token. The draw then binds a null SRV (cause "token"). One candidate producer is device slot 70: a refused call leaves the destination as it was, and its refusal lines stop after eight. Another is a descriptor the title writes itself. These lines tell them apart; they count and print only, nothing changes on any descriptor. src/startup_stubs/memory_srv_census.h, printed with the five-second report when the counts changed: - refused slot 70 calls per reason, and per distinct reason, dimension, format, size, mips, layout and flags for the reasons a different description could avoid (up to 32 shapes); - successful slot 70 writes and distinct destination entries; - texture SRVs bound null with cause token, per translated pipeline. Detail lines: the existing Device::slot70 line for the first refusal of each of the first 8 distinct shapes, even past the 8-line limit; one line for the first write to each of the first 8 distinct entries; and the first 8 words of the entry for the first token null of each of the first 4 pipelines (all zero: nothing wrote the entry). The Device::slot70 line format and reasons are unchanged, so tools/startup/triage_run.py parses them as before. Tests: - startup_memory_srv_census: the limits without a device. - startup_memory_srv_diag_warp: eight zero-address refusals spend the line limit, a 2048x2048 BC1 10-mip texture is refused, a draw samples the untouched entry, then a supported 1-mip R8 texture is published and sampled. Expects one counted BC1 shape with its line past the limit, one write line for the R8 entry, one token null with zero words, and the R8 texels. - startup_memory_srv_diag_supported_control_warp publishes the R8 texture in place of the BC1 one and must fail (column 0 then shows the texel). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ine detail limits Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nted since the last report A diagnostic run overflowed the 32-shape table. Keep 128. The periodic report now lists only the shapes counted since it last ran, so a full table does not repeat every five seconds; a forced report lists all. Test: startup_memory_srv_census (the new limit, the changed-only periodic listing, and the forced listing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…agnostics # Conflicts: # src/startup_stubs/d3d12_memory_srv.inl
…agnostics Keeps both sides' test registrations in CMakeLists.txt and tests/startup_stream_draw.cpp. The single-element path from main counts its refusals (gpu_written_resource, texture_unavailable) and its write in the slot 70 census; gpu_written_resource joins the census reasons. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ntrol checks its exact mismatch The census test now uses 0x1000000000000001 as its pipeline key. The supported-texture control returns 0 only when the diag check stops at the exact column 0 mismatch the supported publish causes, 77 on a capability skip and 1 otherwise; it is no longer registered WILL_FAIL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
R0Y00#2015 added five hold reasons (unsupported_desktop_format, console_layout_xg_rows, console_layout_without_footprints, console_layout_beyond_xg_size, overlapping_resource). The census and tools/startup/triage_run.py counted them as "other"; both now name them, and the census keeps shapes for every reason that depends on the description. The summary line buffer grows to fit the longer list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tedin7
reviewed
Nov 25, 2026
tedin7
left a comment
Collaborator
There was a problem hiding this comment.
Review of head 0a9c89308def9ab8643aace1d609467e30b425d4 (counters and log lines only).
Verdict: no P1, no P2. Looks correct.
What I checked:
- Every refusal path in
device_memory_srvnow goes throughrefuse_memory_srv, and every success path throughnote_memory_srv_write. I found no path that is counted twice or skipped. - The old 8-line refusal limit is kept. A detail line is added only for the first 8 distinct shapes, so log volume stays bounded.
- The token-null census in
d3d12_draw.inlruns aftercount_null_bindingand does not change the descriptor, view or texture that gets bound. - Title is neutral and the PR is clean-room. The head is MERGEABLE, and the CI jobs that ran (Linux Python checks, Windows build and test, fixtures) all pass.
Commands executed locally:
python3 tests/docs_links_check.py: passed (18 files, 413 links)python3 tests/bidi_controls_check.py: passed (1512 files)git diff --check origin/main...HEAD: cleanpython3 tests/startup_triage_run_check.py: 0 failed- Win2025 dev (
x2w_pipe.py win2025 2251 --regex 'startup_memory_srv|startup_triage|startup_stream' --skip-release):startup_memory_srv_census,startup_memory_srv_diag_warp,startup_memory_srv_diag_supported_control_warpandstartup_memory_srv_diag_hardwareall pass. - Mutation: I changed
detail = shape_count_ < detail_shapes;to<=inmemory_srv_census.h.startup_memory_srv_censusfailed with "ninth shape is not", so the test kills it. I reverted the change.
Notes (not blocking):
- nit, unrelated to this PR: on that same Win2025 run,
startup_memory_srv_buffer_{height,exact-fit,first-32}_controlreported Failed. They are WILL_FAIL controls and their output was "all checks passed". The PR does not touchmemory_srv_bufferor its test, so this is not caused by it. It is worth a separate look on main. - nit:
startup_memory_srv_census_check.cppincludeswindows.hthrough the header, so it cannot be built on Linux. Only the Windows run covers it. I did not run the release configuration.
AI-assisted; commands listed were executed locally.
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.
A translated draw binds a null texture SRV when its descriptor-table entry carries no stand-in view token (null cause
token). Two producers fit such an entry:The existing totals line counts these nulls, but nothing tells the two producers apart. This change adds counters and detail lines only; no descriptor, view or texture behaves differently.
Five-second report (
src/startup_stubs/memory_srv_census.h, printed only when the counts changed):x2w-d3d12 memory SRV refusals (slot 70): total N; <reason> n, ...; distinct shapes Kcounts refusals by reason. It adds onerefused shapeline per distinct reason, dimension, format, size, mips, layout and flags, for each reason that depends on the description (up to 128 shapes; later ones are counted as calls past the table). Only shapes counted since the last report are printed.x2w-d3d12 memory SRV writes (slot 70): calls N, distinct entries Dcounts successful slot 70 calls.x2w-draw token texture nulls: total N in P pipelines; <key>=n ...gives per-pipeline counts (up to 16).The reasons include
gpu_written_resourceandtexture_unavailableof the single-element path (#2157), the partial-tile holds of #2105 (partial_tile_xg_rows,partial_tile_beyond_xg_size) and the console-layout holds of #2015 (unsupported_desktop_format,console_layout_xg_rows,console_layout_without_footprints,console_layout_beyond_xg_size,overlapping_resource). Every reason the slot 70 code logs is counted under its own name, and shapes are kept for every reason that depends on the description.tools/startup/triage_run.pyhad folded the five #2015 holds intoother; its allowlist and test now name them too.Detail lines:
Device::slot70refusal line for the first refusal of each of the first 8 distinct shapes, even after the 8-line limit is spent. Its format and reason tokens are unchanged, sotools/startup/triage_run.pyand its tests need no change.x2w-d3d12 memory SRV written i: ...for the first write to each of the first 8 distinct destinations.x2w-draw token texture null: pipeline <key> srv <i> entry <address> words <w0> ... <w7>for the first token null of each of the first 4 pipelines. All-zero words mean nothing wrote the entry.Tests (source-built, WARP):
startup_memory_srv_census: detail and overflow limits, the reason/shape split, and the skip-when-unchanged report, without a device.startup_memory_srv_diag_warp:Device::slot70line as the ninth refusal line, one write line for the R8 entry, one token null with eight zero words, a null view in column 0 and the R8 texels in column 1.startup_memory_srv_diag_supported_control_warppublishes the supported R8 texture in place of the BC1 one. It returns 0 only when the check then stops at exactlycolumn 0 row 0: 100000ff, expected a null view (000000ff)(column 0 samples the R8 texel), 77 on a capability skip and 1 for anything else, including a pass. No test is registeredWILL_FAIL.Commands and results (Windows 10 19045, WARP):
At head 0a9c893 (main f277710 merged): dev 20/20 passed, release 20/20 passed, no skips. The set includes the existing slot 70 tests (
startup_address_srv_warp,startup_address_single_element_warp,startup_address_buffer_srv_warp,startup_address_bc_view_warp), the draw-path and null-binding tests, and the new census, scenario and control tests.The slot 70 tests from #2015 also pass on both presets, 8/8 each:
startup_address_console_*, including the gate, ring and hardware variants, andstartup_gfx10_layout,startup_gfx10_layout_display_control. Command:ctest --preset <dev|release> --no-tests=error -R '^(startup_address_console_.*|startup_gfx10_layout.*)$'.The pure-Python checks listed in AGENTS.md pass: 99 passed.
startup_build_rev_check.pyreports a capability skip (77) where cmake is not on PATH.Overlap: #1938 (still open) adds acceleration-structure refusal reasons (
as_unaligned,as_not_placed,as_wrong_state) to the same function. This census counts them asotheruntil they are added to the list.🤖 Generated with Claude Code