Repository navigation
Conversation
|
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.
|
Contributor
|
AMD / Windows run of this PR at 5b3c1ea: Radeon 780M (RDNA 3, 0x15bf), AMD driver 25.10.20.01 (32.0.21020.1007), Windows 11 Home 10.0.26100, WinLibs GCC 15.2.0 r7, Release. Every ctest entry built from the test targets this PR changes passes (14):
AI-assisted: yes (runs made on the device above). |
12 tasks done
12 tasks done
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
ResourceCacheholds the shader resource objects of draws and dispatches. Its keys are about a hundred words: the device, the stages and their bindings' guest descriptors. Every draw and every dispatch looks one up (Find, orTouchon a recipe hit). The cache indexes its LRU list with anstd::unordered_map<Key, iterator, KeyHash>:KeyHashis FNV-1a over every word: one multiply per word, each waiting on the one before.KeyHashisnoexcept, so libstdc++ keeps no hash code in the nodes. A lookup's bucket walk hashes the key of every node it passes again, to find where its bucket ends.The index is now a
HashSlotMap(Execution/include/HashSlotMap.hpp) keyed by the key's hash:RemoveImage.hashSlotMapTests(graphics tests) covers:On the S2 page of Sonic Origins Plus's main menu, the queue worker spent, per frame (APS5 sampler, 15 s):
ResourceCache::Find: 0.52 to 0.27. In a profile of an earlier build, 45 of its 70 samples were its own code, mostly the inlined FNV over the key, and 23 the bucket walk.std::_Hashtable::_M_find_before_node, the bucket walk: 0.26 to 0.06. What remains belongs to other hash tables.That is about 1.5% of the worker's frame (31 samples).
#6492 adds another walk over the cache's entries that reads
it->firstandit->second. Whichever of the two lands second changes them toit->hashandit->resources.Tested
Windows 11 (10.0.26300), WinLibs GCC 15.2.0 (UCRT), Release, NVIDIA GeForce RTX 2080 Ti, driver 617.14.
agc_driver_gpu_indirect_arguments_misaligned_writer_aheadis not run: main itself does not compile it with MinGW (alignas(65536)).select_testsfails in its setup on Windows without the symlink privilege (WinError 1314fromsymlink_to), as on main.agc_driver_multisample_fill_host_onlyfailed once ("the sentinel fill did not land"). That is main's own race, agc_driver_multisample_fill_host_only fails intermittently: the sentinel fill after an absorbed multisampled clear does not land #6512, which fix(agc): record a multisampled target's commands on its own device #6522 fixes. With fix(agc): record a multisampled target's commands on its own device #6522's line added it failed 0 of 200 runs (8 at a time).guest_positioned_close(libkernel and libc only) ended with 0xc0000409 once in the parallel run. Alone it passes 5 of 5.APS5_TRACE_SECONDS=200:15on the same machine in one session, caches warm. Traces attached.This pair overstates the change: its target is about 1.5% of the worker's frame, and windows of this page vary by a few percent at the median. The title FPS during the two captures was 10.82 and 11.12. The sampled pair, 10.56 to 10.84 FPS, is the better estimate.
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)Traces and summary lines (baseline 245e355, whose summary says b1909f4; this change 557d4da, whose summary says 245e355):
keyhash-traces.zip