Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e context address Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…max reduction Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
samplerTableCapabilityTests runs one table entry three times per field, with the field supported, unsupported, then supported again, for min/max reduction, anisotropic filtering, the anisotropy and LOD bias limits and mirror-once clamping. Dropping any of them from the verdict key now fails a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. Walkthrough
Change: Refactor Merge Risk:
|
What
ShaderResources::addSamplerTabledecodes and validates every sampler of a sampler table entry on every capture. When an entry is refused, it throws and catches an exception per sampler, every time. A shader that binds the same refused entry on each dispatch pays that cost on every dispatch.This change remembers each entry's verdict: accepted, or the refusal text. The key is the context address, the entry's guest descriptor words and its depth-compare flags. The next capture of the same entry reuses the verdict without decoding. The memo is cleared at 65536 entries. An entry over the device's sampler table capacity is never memoised.
Tested
ctest --test-dir build -R "sampler|image_table": 46/46 passed, withANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationandVK_LOADER_DEBUG=layer, validation layer from Vulkan SDK 1.4.363.1. The loader log showsInsert instance layer "VK_LAYER_KHRONOS_validation"and contains noVUID-.mainvs changetools/trace_digest.pycomparison:mainalone does not reach the scene. CPU samples inaddSamplerTablewent from 654 to 163 over 45 s.Speed capture
Windows 11 (26300), AMD Radeon RX 9070, AMD proprietary driver 26.11.2 (LLPC), Ryzen 9 5950X, 32 GB. PPSA01317, Café scene, 3840x2160, validation layer not loaded. Same environment on both sides, one warm-up run then one measured run per side,
APS5_TRACE_SECONDS=0:100from the Café entry.This is not a
mainvs change capture:mainalone does not reach the scene (boykopovar#7256). Both commits are local snapshots of one downstream tree (e2c5cb724bb5plus unmerged split table call work) and are not pushed. They differ only inShaderResources::addSamplerTable:0114600e6d8chas no verdict memo,d24d6e5c38d8has the memo with this PR's key.Vulkan.DispatchmsRecorder.SyncmsDriver.SplitDispatchmsOver the window,
Vulkan.Dispatch.shader_resourcesgoes from 17479 ms to 6867 ms andResources.Preparefrom 13821 ms to 3058 ms. Frame time does not improve in this scene:Recorder.Syncand GPU busy time are higher on the side with the memo. There is one run per side, so the noise is unmeasured and I do not know the cause of that rise. Both traces dropped events on queue worker 0x0, so slice-based figures in the digests are partial.tools/trace_digest.py, without
285 frames over 98460.1 ms (no summary line found)
Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 2313.2, Driver.WorkerWait.dequeue_order 1201.5, Driver.WorkerWait.idle_and_completion_poll 1111.7, Driver.Packet 208.1, Driver.Packet.dispatch 178.7, Driver.Dispatch 178.2, Driver.SplitLookup 159.6, Driver.SplitDispatch 144.1, batch 107.4, Recorder.Sync 62.4
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
tools/trace_digest.py, with
285 frames over 98000.0 ms (no summary line found)
Incomplete trace: recorded data was lost. Slice-based timings, waits and batch inventories cover retained events only; missing slices are not idle time. Summary statistics are reported separately.
Slowest frames (largest slices inside each, inclusive)
Persistent spikes (frame time above the fastest frame that separates it from a longer frame; one entry per stall, not per frame)
Threads (ms per frame)
Largest slices (ms per frame, inclusive, all threads): Driver.WorkerWait 2379.5, Driver.WorkerWait.dequeue_order 1206.3, Driver.WorkerWait.idle_and_completion_poll 1173.1, Driver.Packet 226.9, Driver.Packet.dispatch 195.8, Driver.Dispatch 195.4, Driver.SplitLookup 176.5, Driver.SplitDispatch 161.5, batch 142.7, Recorder.Sync 101.5
Longest waits
Largest GPU batches (GPU ranges inside, and the CPU slices that recorded each, inclusive)
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Summary by CodeRabbit