startup: name the cause of a slot 70 texture_unavailable refusal in the memory SRV census #2828
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2836"
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 tedin7 on 2026-11-26T12:45:27Z.
Part of #870
Fixes #2831
What this unblocks: a run that shows slot 70
texture_unavailablerefusals can say whether to chase a missing resource, unreadable texels or the 64 MiB limit.What changed.
device_memory_srvrefused withtexture_unavailablefor three different situations. It now names the cause, in the census line, the per-call log line,tools/startup/triage_run.py(SLOT70_REASONS) anddocs/startup-runtime.md:texture_no_resource: no live resource matches the base address and description (the lookup of an existing texture found nothing),texture_unreadable: the texels of the published layout cannot be read,texture_over_64mib: the layout is larger than the 64 MiB the transient upload ring accepts for one copy (max_published_texture_bytes, the constantpublish_tiled_texturealready used),texture_unavailablestays for a publication that fails for any other reason.The decision is one pure function,
x2w_startup::texture_unavailable_causeinmemory_srv_census.h(the 64 MiB limit is one constant there), sostartup_memory_srv_census_checktests every branch without a device.Why it is correct. The three causes are the three exits the existing comment named ("no resource there, or texels not readable or over 64 MiB"); the new helper
texture_unavailable_reasonre-derives the cause with the same size limit and the same readability testpublish_tiled_textureapplies. No view is published or refused differently: only the refusal name changes.What stays as before. Which views are published or refused; the hold reasons (
partial_tile_*,console_layout_*,unsupported_desktop_format,overlapping_resource).Note for review.
texture_unavailable_reasoncalls the readability test again on the refusal path, so a refusal whose cause is neither size nor unreadable memory pays one extra pass over the layout's pages; a count-only fast path is possible later if refusals are frequent.Source: this repository: src/startup_stubs/d3d12_memory_srv.inl (
publish_tiled_texture, the 64 MiB single-copy limit and the readable-texels test), src/startup_stubs/memory_srv_census.h, tools/startup/triage_run.py.Verification:
python3 -B tests/startup_triage_run_check.py->startup triage_run checks: 0 failedx86_64-w64-mingw32-g++ -std=c++17 -static -Isrc tests/startup_memory_srv_census_check.cpprun under wine ->memory SRV census: PASS; with the mutanttexture_over_64mib->texture_unreadableinmemory_srv_census.hit fails two checks ("over the limit: named by size", "over the limit and unreadable: still size").a243e5b4c(independent peer run, proxmox, HEAD_SHA in the log): dev 27/27 and release 27/27, regexstartup_memory_srv|startup_address_srv|startup_address_volume_srv|startup_triage. The mutant above is killed bystartup_memory_srv_census(patch applied); an earlier mutant (texture_no_resource->texture_unavailable) is killed bystartup_address_srvandstartup_address_volume_srvon warp and hardware.startup_address_volume_srv_check.pyacceptstexture_no_resourceortexture_unreadable, because its short backing can be either.Real-hardware testing: @Makto94 - thanks for the help.
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T13:37:02Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
a243e5bℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by SimSalabimse on 2026-11-26T16:07:02Z.
Hardware and WARP result for head
a243e5b4c1f0bf84166274315561bc880fec2fe3: all pass. Part of #870.Environment: Windows 11 25H2 (26200), MSVC 19.42,
devpreset, NVIDIA GeForce RTX 4070 Ti, driver 621.35 (32.0.16.2135). Tests run serially, one ctest process.Command
Result (measured): 31/31 passed, exit code 0.
startup_memory_srv_census(the pure functiontexture_unavailable_cause).startup_address_srv,startup_address_volume_srvandstartup_memory_srv_diag, WARP and hardware (these read the newtexture_no_resourceandtexture_unreadablenames).startup_triage_runandruntime_startup_triage_run_cli_check(SLOT70_REASONS).startup_memory_srv_{report,buffer,as,volume}with controls,dxr_slot70_as(WARP and hardware),startup_address_buffer_srv(WARP and hardware).What this shows: the renamed refusal causes read correctly on an NVIDIA adapter and nothing else in the slot-70 group changed.
What this does not show: I did not run the mutants from the description, and I did not run a game, so I cannot say which of the three causes a real run reports. The extra readability pass on the refusal path was not timed.
AI-Assisted
Imported from R0Y00/Xbox2Windows. Originally posted by pigalot on 2026-11-27T19:36:02Z.
Review: APPROVED
Independently reviewed
a243e5b4integrated overmain6057071b(tree76d5b436, clean merge).What I traced. I checked the
publishedflag at the second call site against the code above it. It is true exactly whenpublish_tiled_texturewas reached:bc64views, through the ternary;Every other view only went through
existing_memory_texture, sotexture_no_resourceis right there. That name also covers a live resource with a different description, or two matches at the same base, which the docs line covers with "base and description".The single-element site always attempted publication, so
trueis right there.address_texture_bytesand the readable probe now run a second time, but only on the refusal path, and the probe is skipped above 64 MiB as the unit test checks. Inserting the three names in the middle ofmemory_srv_reasonsis safe: the census indexes by name throughmemory_srv_reason_index, and the counts are sized bymemory_srv_reason_count.What I ran. I built
startup_stream_consumer,startup_memory_srv_census_checkandd3d12_xs_shimindevandrelease, then ran:ctest --test-dir out/build/<preset> --no-tests=error -j 1 -V -R '^(startup_memory_srv_census|startup_address_srv_(warp|hardware)|startup_resource_address_index_missing_control_warp|startup_memory_srv_diag_(warp|hardware)|startup_memory_srv_diag_supported_control_warp|startup_address_volume_srv_(warp|hardware)|startup_address_single_element_(warp|hardware)|startup_triage_run)$'12/12 passed in Debug and Release
/O2, with no skips.Mutant. I passed
trueforpublishedat the second call site, as if every view had attempted publication. That fails two tests on WARP:startup_address_srv_warpfails atreason=texture_unavailable res{dim=3 fmt=61 size=1x2x1 ...}(expectedtexture_no_resource);startup_address_volume_srv_warpfails the same way on itsres{dim=4 fmt=28 size=4x4x2 ...}line.Restored, both pass.
git diff --checkis clean.Non-blocking notes.
startup_address_volume_srv_check.pyacceptstexture_(?:no_resource|unreadable). The run only ever emitstexture_no_resource: pinning the regex to that passes, and pinning it totexture_unreadablefails on that line. The exact name would keep the check as strict as it was before.texture_unreadableandtexture_over_64mib. No draw test does.Verdict: approve on
a243e5b4.Environment: NVIDIA GeForce RTX 5090, driver 32.0.16.1088; WARP 10.0.26100.9818; Windows 11 25H2 build 26200.9974; MSVC 19.52.37029; DXC 1.9.2602.17; debug layer on.
CI:
Build and test on Windowspasses ona243e5b4. There are no review threads.This reply was AI-assisted.