Repository navigation
fix(agc): count owned texture copies in the sampled cache budget - #23726
Conversation
|
Ran the focused tests with the Khronos validation layer on Linux and an NVIDIA GPU, since CI runs the GPU tests only on lavapipe and the NVIDIA run in the Tested section is on Windows. Setup: Arch Linux (kernel 7.3.4), GCC 16.2.1, Release, NVIDIA GeForce RTX 4090 (vendor
The four Negative control: with main's No new AI-assisted: yes (Claude Code) |
|
Head No new failures and no new validation messages on either GPU.
Layer runs used AI-assisted: yes |
|
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.
|
MarcZX10
left a comment
There was a problem hiding this comment.
Reviewed — looks good
The sampled cache now accounts for owned storage-copy allocations, with focused assertions covering the sRGB and repack recovery cases; the review found no verified blocking defects.
What I ran
Reviewed head bca0d038e2b57645f253147a89fb3d7a15df4ab1 using the prepared diff and repo_read.py for targeted source context. No tests were run by me; the description reports four focused CTests run by the author.
Results
| Check | Result | Note |
|---|---|---|
| Diff and targeted code review | passed | Accounting and recovery paths inspected |
| Tests run by reviewer | not run | Author reports four focused CTests passed |
Findings
Blocking
None.
Non-blocking
None.
Not verified
The full text of ShaderResources.cpp was excluded from the review folder and inspected only through targeted repo_read.py ranges. No other changed files were excluded. The reported CTest runs and hardware behavior were not independently verified.
To get this to a good state
Nothing is required.
|
Windows run on RTX 50 and the AMD Windows driver (RDNA2 iGPU), with a red check. Head Setup: Windows 11 Enterprise 10.0.26300, Ryzen 7 9800X3D, WinLibs GCC 15.2.0, Release. NVIDIA GeForce RTX 5090 (
Every layer log shows GPUs tested: NVIDIA GeForce RTX 5090, driver 617.42, Windows 11; AMD Radeon(TM) Graphics (Ryzen 7 9800X3D iGPU), driver 32.0.21045.29003, Windows 11 AI-assisted: yes |
|
Tested head Setup: Windows 11 Pro 10.0.26200, Ryzen 7 9800X3D, WinLibs GCC 15.2.0 r7, Release,
Whole batch: the full This is one combined tree, not a run of this PR alone. AI-assisted: yes (Claude Code) |
What
When a sampled texture needs its own image copied from a storage image, the sampled cache only charges for the source if the storage cache no longer holds it. The copy's GPU allocation is omitted, so the sampled cache can retain more bytes than its budget accounts for.
Charge the sampled entry for its own allocation while preserving the existing charge for a source held outside the storage cache. A view that shares the source image has no separate allocation. Check the resulting byte count in the existing sRGB and format-repack allocation recovery tests.
Tested
Windows 11 Pro (build 26300), NVIDIA GeForce RTX 3080 Laptop GPU, NVIDIA 621.14. Four focused CTests ran on
a0f6ff94e917with the new assertions and on21fbc23a4ddfwith the same patch as this PR. The sRGB and format-repack cases allocated separate 4 MiB and 1 MiB images on the baseline. Both reported only the 256 KiB already in the sampled cache after reclaiming the idle texture. All four tests passed with the fix, including ordinary sampled allocation recovery and the sampled cache budget test.Both runs inserted Vulkan validation layer 1.4.368 and reported zero
VUID-errors. Both usedANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation, andVK_LOADER_DEBUG=error,warn,layer. The measurements cover cache accounting and allocation recovery.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)