The conflict in core/libs/prx/libSceAgcDriver/CMakeLists.txt from #12862's split is resolved with tools/agc_test_split.py resolve, which moves this PR's test registrations into tests/cmake/.
The conflict in core/libs/prx/libSceAgcDriver/CMakeLists.txt from #12862's split is resolved with tools/agc_test_split.py resolve, which moves this PR's test registrations into tests/cmake/.
Main comes in through #9533's main merge 071ca5b609, which keeps
#9533's resolution; this branch carries #9533 but not #9742.
Beyond keeping both sides:
- CMakeLists.txt:3150-3154: agc_driver_native_depth_buffer_clear joins
the branch's set_tests_properties lists, which also carry
agc_driver_native_depth_stencil_view.
Beyond keeping both sides:
- CMakeLists.txt:3149-3153: agc_driver_native_depth_buffer_clear joins
the branch's set_tests_properties lists for the native depth tests
(and the WIN32 list) instead of main's own line that re-lists clears
and clear_refusals; the properties are the same.
- NativeMultisampleDepth.cpp:1153-1170: main's two
completionCandidate && fault == ClearFault::None blocks sit around
ArmHtileDepthClear inside the branch's ClearSource::HtileDispatch path,
where the branch moved that code; the fill paths make no HTILE clear
candidate.
- NativeMultisampleDepth.cpp:2556: main's --buffer-clear call passes
ClearSource::HtileDispatch, the parameter the branch added to
CheckDepthTarget.
Record an HTILE clear's mask/value with its pending note and recorder ID.
When that write covers the HTILE and determines its ZMask/SMem bits,
expand the metadata on the GPU without a readback. Retire mask proofs
with their recorder or depth device, preserving other owners and the
bounded cache's conservative overlap invalidation.
Recognize the structured-buffer variant and carry its completion range
through preparation, upload and binding. Admit only that range while
its native owner has a pending clear, retaining color guards and
excluding these resources from dispatch and recipe caches.
Cover store-back, PM4 buffer clears, guard refusals, recorder recreation,
live owner isolation and scoped cleanup with GPU byte/wait assertions.
AI-assisted: yes
The whole-window retile check bound slabPieces[part.pieces].copies[part.copy]
before testing part.slab. A piece stored into the import records pieces = 0,
and when no piece of the write-back went to a slab slabPieces is empty, so
the lookup binds a reference through a null pointer (UBSan: reference
binding to null pointer, Texture.cpp:3514).
A sampled texture made from a surface whose DCC keys hold a fast-clear
code was filled on the CPU with the clear texel (FillDccClear over the
whole surface), copied into a staging buffer, copied to a tiled device
buffer, detiled and copied into the image. A target cleared every
frame and sampled while cleared repeats all of it each time.
When the texture's format is the one the clear texel is encoded in and
the texel has an exact clear value (ClearColorForTexel), the image is
now cleared with vkCmdClearColorImage instead, in the same recorder
batch the upload used. Comparison, sRGB-expand, repacked, block
compressed and register-clear surfaces keep the upload. A clear-code
cache hit never compares bytes, so such an entry keeps no snapshot.
The [textures] profile line counts these as cleared on the GPU, and
SampledTexturesCleared() reports them for the new execution test.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Queue 0's idle store wrote every pending storage image back to guest memory
in one pass once the queues had been idle for 50 ms. In a title's movies
that is about 15 upscaled 3840x2176 targets (~0.5 GB) per pass, and the
title's next flip waited ~0.6 s behind it, about every 3 s.
The idle store now writes back 4 MiB at a time, in the block units the
images already track, and stops as soon as queue 0 has queued work or
another queue is running; the rest stays pending for the next idle period.
The quiet period is unchanged.
FillDccClear wrote a cleared texture one element at a time, with one
memcpy of 4 to 16 bytes per element. A cached texture whose DCC keys
say cleared is filled this way on every upload, so a 4K RGBA8 surface
took about eight million calls. Copy the first element, then copy the
filled prefix onto the rest, doubling each time; the last copy is
clipped at the last whole element and the trailing partial element is
zeroed as before. The bytes written are unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Staging a swept write-only element (#7618) costs a copy-in and a
copy-back per use. In PPSA03912's town that saves GPU time, but in its
main menu the 202 MiB element is faster in place (73 vs 91 ms of GPU
time per frame), so the menu lost about a fifth of its frames.
Decide per element by measurement. The busiest element is probed in
its current mode, the other mode and its current mode again; the other
mode is kept when its frames are faster by more than twice the
standard error. A repeated answer doubles the wait for the next probe
from 20 s up to 160 s, and a jump of the frame GPU time by more than a
quarter (a scene change) probes again at once. The frame GPU time comes
from the whole-batch timestamps, which the first probe turns on.
Resource builds made under the other decision are not reused.
APS5_NO_ADAPTIVE_STAGING=1 stages every eligible element, as before.
The policy is in AdaptiveStaging.hpp, fed by the caller with frame
counts and time; agc_adaptive_staging covers keeping the faster mode,
frame noise, the back-off cap, a scene change and the share threshold.
AI-assisted. Tested by me on my own machine.
On a device without VK_KHR_fragment_shader_barycentric and without geometry shaders, a pixel shader that reads barycentrics is drawn through tessellation stages generated for the draw. Those stages carry no variant id, so ValidationKey left every such draw unkeyed and ValidateShaders decoded all four stages again on every draw. The generated stages are built from the vertex and fragment results the key already names and from the provoking vertex, so they are keyed like the rect-list stages, with the provoking vertex added to the key.
Keeps both sides of the debt doc: this branch's multisampled color
target entry and #6498's shader buffer entry. The test file merges with
both sides' test blocks. HostOnlySampleRanges from #12566 reads the
host-only flag from the range's TargetUse.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
DeviceMemoryType placed an image or device buffer in host memory up front
when VK_EXT_memory_budget showed the device-local heap without room, so the
texture-cache release that a driver refusal gets never ran. It now asks the
caches for the allocation plus the heap's overage first and keeps the
device-local type when they release that much, or when the budget read again
has room.
Co-Authored-By: Claude Opus 5.5 <[email protected]>