Repository navigation
perf(agc): reserve resource keys for their serialized payload - #4783
Conversation
|
Acknowledged the overlap report. #1345 normalizes buffer ranges and #4206 clears recycled sparse-buffer holes. This PR changes neither path: its production change is confined to ContentKey reservation in ShaderResources.cpp. The reported overlaps are shared includes and fixture/CLI dispatch in Graphics.cpp. It does not require either PR; their test modes/assertions must be retained when combining the runner changes. Current GitHub mergeability is MERGEABLE; no claim that future merges will remain conflict-free. AI-assisted: Codex. |
|
The updated overlap report also lists #4795. Its production change concerns pipeline-cache synchronization, while #4783 only reserves ContentKey payload storage. The shared Graphics.cpp dispatch location should retain both independent test modes when combined; neither PR depends on the other. Current mergeability remains MERGEABLE. AI-assisted: Codex. |
253ac3c to
8e7cdd9
Compare
|
Rebased and pushed 8e7cdd9 on main 88107b7. The Graphics.cpp conflict was between the new sparse-buffer-holes CLI mode and our resource-content-key mode; both are retained. Full mocked graphics PASS 5.01s, focused content-key policy/count checks PASS, preserved sparse-buffer-holes control PASS. Scoped conventions/diff checks pass; source clean. Production reservation unchanged. Earlier ABBA measurements stay explicitly tied to base 584cc4c, rather than claimed as a rerun on this base. No libraries from this build staged into 007. AI-assisted (Codex). |
|
Checked that the reserved count matches what |
|
Thanks for the review and current-main graphics cross-test. Head remains8e7cdd975f47c5f57b9641ff9d4442bda7cc7795 and it still merges cleanly. I checked the current checks: conventions/report/eligibility succeeded, but windows, linux, relinker, register-context and write-watch were skipped. That does not establish the full Build is green. If a maintainer-triggered Build is required, that gate is still outstanding; I have not represented those skipped jobs as passes. AI-assisted: yes (Codex). |
|
Checked that the reserved count matches what Added on top of your commit:
Merging once the full Build is green. |
8e7cdd9 to
49a88a7
Compare
49a88a7 to
6d7b1d1
Compare
|
Rebased again onto current main: Merging once the full Build is green. |
What
Resource content keys reserve
8 + 12 * binding_countwords, even though descriptor payloads, packed masks and sampler associations can make the key much larger. Constructing such keys repeatedly grows the vector and copies its contents.Reserve the complete serialized word count before emitting the key. The count respects the existing data-word and movable-buffer policies and checks cumulative size against the vector limit.
VisitContentKeyand the serialized key contents are unchanged. No cache validation or shader behavior changes.Tested
Windows 11, Ryzen 7 7800X3D, MinGW GCC15.2, Release. Rebased base
88107b7de6cd7c7952c496345ffc4f413bef374b; head8e7cdd975f47c5f57b9641ff9d4442bda7cc7795.agc_driver_graphicsmocked graphics suite passed (5.01s). The focused key mode and the preserved sparse-buffer-holes control also passed.ShaderResources.cpprestored to baseline passes the policy checks. All24 cases have matching key lengths, FNV checksums and benchmark checksums between variants. Restoring/rebuilding the patch passes again.git diff --checkpass. No Vulkan device is used by the key benchmark.Earlier benchmark on base
584cc4c57(not rerun after the rebase): three ABBA cycles, six processes per variant,256 key constructions per timing case; identical compiler flags/harness and no game, build or other test running concurrently. Representative process medians with data words off and movable buffers off:The large-case ranges were419.143–443.021us baseline and176.343–200.913us patched. Across its four modes, large-key medians decreased47–59%. Some small-case ranges overlap; they are sub-microsecond measurements. The large key's capacity falls from180224 to152128 words (152385 with data words). These are isolated CPU key measurements, not overall title FPS results or a game-unblock claim.
Reproduce with
agc_driver_graphics_tests --resource-content-keyandagc_driver_graphics_tests --benchmark-resource-content-key. To compare, leave the harness unchanged and restore onlyGraphics/src/ShaderResources.cppfrom the recorded base.Checklist