Repository navigation
Conversation
✅ NVIDIA GPU test: passedPR head
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (8 IDs in 531 tests)Skipped (50)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (7, not counted against this PR)Validation IDs already present on main (8 IDs in 531 tests)Skipped (61)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
…s erased Each reuse of a remembered image table looked every entry up in the sampled texture cache again to prove it was still cached: one hash lookup and weak pointer lock per element, about 14,000 per draw in PPSA18653. The table now keeps the cache iterators it proved, with the cache's erasure count at that time, and reuses them while the count is unchanged: entries leave the cache only through eraseTexture, which bumps it, so the iterators stay valid. ImageTableReuseCounts reports the full lookups as entryLookups. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d0cffb2 to
9213b85
Compare
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (13 IDs in 549 tests)Skipped (49)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
What
When an image table is reused (
FindReusedTable),CachedTableTexturesfirst proves that every kept element is still in the sampled texture cache, with onefindTexturehash lookup and one weak pointer lock per element. A table of about 14,000 entries repeats this on every draw that reuses it, even when nothing has left the cache since the previous reuse.The reused table now keeps the cache iterators it proved, together with the cache's
erasurescount at that time. While the count is unchanged, the next reuse takes those iterators instead of looking every element up again. A sampled cache entry leaves the cache only througheraseTexture, which bumpserasures, andstd::listiterators stay valid until their entry is erased, so the kept iterators still name the entries that were proved.findSampledEntryalready uses the same count for its memo. The entries are still touched and their textures returned as before.ImageTableReuseCountsreports the full lookups asentryLookups. Inagc_driver_image_table_reuse, three dispatches of one table in one epoch now expect exactly one full lookup for the two reuses. Onmainthis fails witha table reused twice while the texture cache dropped nothing looked its textures up again on the second reuse. The existing step for a kept table whose textures the cache dropped still covers the erasure path: with theerasurescheck removed, bothagc_driver_image_table_reusetests crash on stale iterators.Tested
ctest -V -R "table|texture|storage|sampled|bindless"withVK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_NO_SHADER_CACHE=1andANYPS5_REQUIRE_VULKAN=1, on the same machine. The table, texture and storage execution tests were built. Each log starts with its tested revision and these variables, and the build settings are attached.d0cffb2567): 117/117 passed.ShaderResources.cppfrommain1c8c0efc8c, with the new test. 115/117 passed; onlyagc_driver_image_table_reuseandagc_driver_image_table_reuse_draw_pipelinefail, both at the new check.VUID-error. The same 4 tests skip in both (multisampled pass order and 3 packed16 storage formats). Logs attached.APS5_TRACE_SECONDS=20:60after a warm run, with no other trace or profile switch, and the log not redirected.maindoes not reach this screen on its own. Both builds carry fix(agc): copy GPU-side indirect draw records when the packet is processed #15327, the opt-in clock change (feat(libkernel): fail unknown clock ids 16 to 31 with EINVAL on request #15656), perf(agc): reuse image tables that hold storage-viewed entries #15563, fix(shader): map image-table entries filled with ones to no record #15611, perf(shader): reuse an unwritten image table snapshot read through a pointer #15655 and a local change. The base is2e9401cb00, which is that stack with this commit reverted. The change is462334bc76, the same stack with it. Traces attached.Resources.Completeper frame{"commit":"2e9401cb0068","dirty":false,"env":{"APS5_FAIL_UNKNOWN_CLOCKS":"1","APS5_TRACE_SECONDS":"20:60"},"gpu":"NVIDIA GeForce RTX 5080","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":32404,"title_id":"PPSA18653","title":"Age of Mythology: Retold","content_version":"01.043.000","resolution":"3840x2160","window":{"spec":"seconds 20:60","first_present":499,"ms":60433.357},"presents":26,"frame_ms":{"p50":2376.245,"p90":2488.916,"p99":2528.053,"max":2528.053},"gpu_busy_ms_per_present":261.139,"worker_busy_pct":{"queue worker 0x0":99.940},"top_phases_ms_per_frame":{"Driver.Packet":2322.631,"Driver.Packet.draw":2259.760,"Driver.Draw":2259.364,"Driver.Draw.draw_and_resource_release":1298.953,"Graphics.Draw":1273.410,"Graphics.Draw.draw_and_resource_release":1265.634,"Resources.Complete":1163.255,"Driver.Draw.shader_compile_and_link":942.973},"trace_dropped":false,"trace":"aps5-trace-2e9401cb0068-23068.json.gz"}{"commit":"462334bc769d","dirty":false,"env":{"APS5_FAIL_UNKNOWN_CLOCKS":"1","APS5_TRACE_SECONDS":"20:60"},"gpu":"NVIDIA GeForce RTX 5080","driver":"NVIDIA 617.42","os":"Windows 10.0.26300","cpu":"AMD Ryzen 7 9800X3D 8-Core Processor","cpu_threads":16,"memory_mib":32404,"title_id":"PPSA18653","title":"Age of Mythology: Retold","content_version":"01.043.000","resolution":"3840x2160","window":{"spec":"seconds 20:60","first_present":503,"ms":60517.607},"presents":29,"frame_ms":{"p50":2100.817,"p90":2219.649,"p99":2263.247,"max":2263.247},"gpu_busy_ms_per_present":274.498,"worker_busy_pct":{"queue worker 0x0":99.935},"top_phases_ms_per_frame":{"Driver.Packet":2085.153,"Driver.Packet.draw":2021.594,"Driver.Draw":2021.203,"Driver.Draw.draw_and_resource_release":1065.119,"Graphics.Draw":1040.327,"Graphics.Draw.draw_and_resource_release":1032.766,"Driver.Draw.shader_compile_and_link":940.006,"Resources.Complete":934.589},"trace_dropped":false,"trace":"aps5-trace-462334bc769d-20744.json.gz"}tools/check_conventions.pypasses.tools/pr_overlap.py --branchreports:ShaderResources.cppL2070-2076: the loop condition here iselement.rejected, and perf(agc): reuse image tables that hold storage-viewed entries #15563 adds|| element.live. Whichever merges second keeps both.ShaderResources.hppL157, which adds an adjacent field. A merge keeps both.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)aps5-trace-2e9401cb0068-23068.json.gz
aps5-trace-462334bc769d-20744.json.gz
table-cache-entries-build-settings.txt
table-cache-entries-change-d0cffb2567-ctest.log
table-cache-entries-main-1c8c0efc8c-control-ctest.log
🤖 Generated with Claude Code