startup: count refused slot 70 calls, slot 70 writes and token texture nulls #2243
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2251"
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 rasptum on 2026-11-25T07:53:38Z.
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
0a9c8930(mainf277710emerged): 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
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-25T07:59:31Z.
Review: COMMENTED
Review of head
0a9c89308def9ab8643aace1d609467e30b425d4(counters and log lines only).Verdict: no P1, no P2. Looks correct.
What I checked:
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.d3d12_draw.inlruns aftercount_null_bindingand does not change the descriptor, view or texture that gets bound.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 failedx2w_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.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):
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.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.