Repository navigation
Conversation
…ueue order A DMA_DATA copying into the GDS drained the device, and one copying out of the GDS read its source through the checked path, waiting for the recorded GPU work that writes the GDS. Pm4::DecodeGdsCopy recognises copies with the GDS on either side; preparePacketMemory records them with VulkanDevice::CopyMemoryOnGpu, a transfer between the host imports in the open batch, and falls back as before when a completion store is pending over either range or a range is not imported. ResolveStore also accepts an immediate fill of the GDS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV
Merged
9 tasks done
This was referenced Oct 9, 2026
Collaborator
|
Closing: the DMA_DATA time goes down, but the frame rate in PPSA01325 stays at ~13.7 fps, and the branch now conflicts with main in |
9 tasks done
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
Small DMA_DATA copies between the GDS and memory either drained the device or waited for the GPU:
ResolveStorerefused a GDS destination, so the packet fell through to the drain and the CPU copy.Titles move GDS counters in and out of memory with such packets between dispatches (append/consume counters, ordered counts). Each one cost a drain or a wait on the queue's worker.
This change:
Pm4::DecodeGdsCopyrecognises a DMA_DATA with the GDS on at least one side and memory or the GDS on the other. It requires:The GDS side maps to
GdsAddress() + offset, the guest memory that backs the GDS here.preparePacketMemoryrecords such a copy withVulkanDevice::CopyMemoryOnGpu: avkCmdCopyBufferbetween the two host imports, in the open batch, in queue order.CopyBufferuses.DumpSamplesOnGpualready uses.ResolveStorenow accepts a GDS destination for an immediate source (a fill of GDS counters) inside the GDS. It goes through the label store path like any other immediate DMA_DATA.Why not
CopyBuffer(the path #439 uses for large memory-to-memory copies): its completion-store test counts any pending label in a range as a completion store whenever completion labels exist anywhere. GDS ranges that labels write on the GPU then wait for their batch (SyncThrough). In PPSA01325 that took 2919 syncs in one run, and queue 0x3d still spent ~1.75 s per 10 s in DMA_DATA (numbers below). Changing that test would change every buffer copy, so it is left alone here.The selector values come from DMA_DATA's control dword:
SRC_SELbits 30:29 andDST_SELbits 21:20 (0 memory, 1 GDS, 2 immediate data for the source, 3 memory through L2).Pm4.cppalready decodes them (dmaSource,dmaDestination,DmaSelectGds). They matchS_411_SRC_SEL/V_411_GDS/V_411_DATA/V_411_SRC_ADDR_TC_L2andS_411_DST_SEL/V_411_DST_ADDR_TC_L2in Mesa'ssrc/amd/common/sid.h.Tested
Windows 11, WinLibs GCC 15.2, RTX 3060 Laptop.
New
agc_driver_gds_dma_copy_tests(tests/execution/GdsDmaCopy.cpp), run twice:ds_append/ds_consume(full and partial EXEC).Both memory results must hold the expected counters. The memory side is a registered, host-imported guest block.
CopyMemoryOnGpu. With itsvkCmdCopyBufferremoved, the test fails:GDS counter 0 copied to memory, back to GDS and out again reads 3735928559, expected 1064.agc_driver_pm4_testshas a newtestGdsCopyDecode:Two
ResolveStorechecks: an immediate GDS fill resolves toGdsAddress() + offset; one past the GDS end does not.Full
cteston currentmainwith this change: 494/495 pass.import_auditfails in my git worktree (source_commitisNonebecause git cannot resolve the worktree's commit), which this change does not touch.tools/check_conventions.py --base upstream/mainpasses.PPSA01325 (Astro's Playroom), title screen, 150 s runs. I measured on my local branch, since current
mainstops at boot onmissing static shader ABI register 201(fix(agc): defer shaders that cannot be prepared at registration to their first use #1836). The same change ran there behind a switch. Per 10 s:The
CopyBuffervariant of the same change gave 1691-1787 ms on queue 0x3d. The title's frame rate stays ~13.7 FPS: it is bound by queue 0's draws, not by these waits.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
https://claude.ai/code/session_01UTjpbMX7BUFMZZaxJE98zV