fix(agc): leave the GDS unallocated until it is used when no importable GDS was requested #15610
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15610"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-11-03T21:42:41Z.
What
Since #13159,
Pm4::GdsImportable()andPm4::GdsShared()callGdsAddress()to answer, and the Vulkan device asksGdsImportable()when it is created. So every process maps the 64 KiB GDS guest mapping at device creation, also on discrete GPUs, which never request an importable GDS. Before, the GDS was mapped by its first use. On Windows the extra early mapping makesagc_driver_direct_write_completionfail (#15564):the completion of a buffer write dropped image results recorded after it.How
GdsImportable()andGdsShared()answerfalsewithout mapping the GDS unless an importable GDS was requested (ImportableGdsRequested()). Both could only be true when one was requested anyway, so neither answer changes.Tested
agc_driver_direct_write_completion,agc_driver_gds_dma_fillandagc_driver_linear_target_direct_write_completion, 3 runs each side:main086c0686c8agc_driver_direct_write_completionfails all 3 times with the error above7c53e47f34agc_driver_direct_write_completionpassed 6 of 10 onmainand 10 of 10 with this PR. On the integrated Radeon of the Ryzen 7 7700X it passed 0 of 10 onmainand 1 of 10 with this PR. #15551 passes 10 of 10 on both.7c53e47f34: 3 of 3 pass in each of 3 runs (they pass onmainthere too).7c53e47f34merged intomain1c8c0efc8c, 5 runs each.agc_driver_direct_write_completionpassed 0 of 5 onmainand 5 of 5 with this PR; the other two tests passed 5 of 5 on both.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1: base086c0686c83 of 3 and head7c53e47f343 of 3 pass. The layer was loaded in each, 6 Vulkan devices were created per side, and noVUID-lines appeared.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.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code