Repository navigation
Conversation
A surface straddling two registered allocations has no single import, so it fell back to a CPU read (waiting for the GPU) and a waited batch. Its pieces are now copied from each import into one device buffer and detiled in the open batch. APS5_NO_GATHERED_UPLOAD=1 restores the CPU path.
9 tasks done
Collaborator
|
Could you add a test for the gathered path: a storage surface that crosses two registered allocations, uploaded with host imports on, its texels compared, and a check that the upload did not go through the CPU path? No test in the tree reaches the new branch of |
Contributor
Author
|
Yea I'll do that |
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
A storage image upload with no DCC keys goes through the host import of its memory when one import covers the whole surface. A surface that straddles two registered allocations has no single import (
HostImportForfails), soStorageTexture::uploadfell back to the CPU path:GuestMemory::ReadCommittedof the whole surface (which first waits for the GPU writers of that memory), a staging copy, and a waited batch.PPSA28416 (STAR WARS: Galactic Racer, UE5) has 3840x2160 surfaces (formats 36 and 56) that cross from a 2 MiB allocation into the 848 MiB heap right after it. At the main menu that is ~54 uploads and ~1.5 s per 10 s on the CPU path.
When every part of the surface is served by an existing import, each import's piece is now copied into one device buffer and detiled from there, recorded in the open batch like the single-import path: shadows published, stores flushed, the pending read noted, the image kept until the batch completes. When any piece has no import, the CPU path runs as before.
APS5_NO_GATHERED_UPLOAD=1turns the new path off.Tested
Windows 11, WinLibs GCC 15.2.0, Release, RTX 4080.
add_test_executabletargets oflibSceAgcDriverthat build on Windows: all pass.VK_LAYER_KHRONOS_validation(~3000 uploads through the new path) reports no errors from it.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)