Repository navigation
Description
On main (5de0b114), a slot-70 memory SRV whose address range is reserved but not committed is probed twice before it is refused:
publish_tiled_texturecallsx2w_local::readable(address, bytes)and returns null (src/startup_stubs/d3d12_memory_srv.inl:557).- The caller then asks
texture_unavailable_reasonfor the census name, and that function callsx2w_local::readableon the same range again (d3d12_memory_srv.inl:548-549; call sites:719and:787). The second probe was added with the census cause in startup: name the cause of a slot 70 texture_unavailable refusal in the memory SRV census #2836.
readable is probe_readable (src/startup_stubs/local_log.h:135-171, :240-244, :260): it touches one byte per page under __try, so each failed probe is a first-chance access violation. The mapped_prefix pre-check refuses only MEM_FREE, so a reserved page still faults, and the shared run preset turns the pre-check off (X2W_PROBE_PRECHECK=0). Under debug_launch.py every first-chance exception stops the whole process for a debugger round trip (local_log.h:66).
A refusal that is also logged (the first 8, then the first of each new shape) probes one more byte of the same address in log_refused_memory_srv.
Measurement
One long run of the application under debug_launch.py: about 44k of these probe faults on about 15k distinct addresses in 85 s, while the frame rate fell from about 30 fps to 6-8 fps. The run stopped shortly after; the cause of the stop is not established.
Related
#2245 (open, changes requested, currently conflicting with main) replaces the first probe in publish_tiled_texture with a page-registry lookup and a 30-frame retry cache. Its diff does not touch texture_unavailable_reason, so on a refused view the second probe would still touch the range, including for an address its cache has just skipped. I found no other open issue or PR on this.
Plan
Probe once per refusal: publish_tiled_texture reports why it returned null (over 64 MiB, unreadable, no wrapper) and texture_unavailable_reason uses that instead of probing again. Census names and refusal decisions stay the same. Small and independent of #2245; it applies on top of either readability test.
Not in this change: caching unreadable ranges across calls. That is #2245's retry cache, and it needs a reliable commit signal to be invalidated correctly.
I'm working on this.
Activity