Commit Graph
2501 Commits
Author SHA1 Message Date
Adrià d8b60b46ed Merge pull request #13931 from liskeee/perf/agc-persistent-pipeline-cache-upstream
feat(agc): keep driver pipeline caches and costly compute pipeline binaries across updates
2026-11-01 15:22:44 +01:00
Dean f1a7b02028 Merge pull request #7243 from gjonn/fix/agc-packed-target-replace-blend
fix(agc): write a replace blend into a packed color target without blending
2026-11-02 02:06:56 +13:00
Adrià 75df21b76e Merge pull request #13678 from Gonic0/feat/agc-label-trap-aliased
perf(agc): trap label reads of small images inside pending large ones on macOS
2026-11-01 12:26:41 +01:00
liskeeeandClaude Opus 5.5 5c1cac4112 fix(agc): disable pipeline binaries with outdated wrapping layers
Check the enabled layers before querying pipeline binary features. A
validation or gfxreconstruct layer older than Vulkan 1.3.294 wraps
handles but passes the extension's commands to the driver unchanged, so
keep the driver pipeline cache path there and when enumeration fails.
Cover the layer decisions with a fake enumerator.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 11:56:07 +01:00
liskeeeandClaude Opus 5.5 f1b0dbbf5d fix(agc): retain driver cache fallback after binary capture failures
A costly build whose binaries cannot be extracted or stored, and a
rejected capture build, now leave a capture-failure marker, so later
runs build that recipe through the driver cache instead of repeating a
capture build with a null pipeline cache. Lowering the time threshold
does not retry these markers; a driver change does. Existing
below-threshold markers stay compatible and retryable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 11:56:06 +01:00
liskeeeandClaude Opus 5.5 e02b717d56 fix(agc): skip unchanged periodic pipeline cache snapshots
Restore the cheap size-and-header check for the 10-second worker save,
with the size query still under the snapshot lock, so an unchanged cache
is no longer copied and hashed on every tick, including the first tick
after loading a current cache. A legacy import is still written by the
first periodic save. SaveNow and the final save keep the content
comparison that writes equal-size changes.

Cover periodic copy avoidance after saving and after reopening, legacy
migration and equal-size persistence.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 11:56:06 +01:00
liskeeeandClaude Opus 5.5 0c572f1c25 feat(agc): persist costly compute pipeline binaries
Capture costly compute builds and restore matching recipes after checking
full recipes, driver fingerprints and Vulkan compatibility keys. Add size
and time thresholds, opt-out, atomic persistence and corruption/rejection
fallback.

Remember below-threshold recipes in separate files so competing decisions
cannot overwrite captured binaries. Prefer saved binaries and retry
capture when the time threshold is lowered.

Cover compatibility, fallback, deterministic competing writers and
cross-process capture, restore and corruption.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 11:56:06 +01:00
liskeeeandClaude Opus 5.5 8413207b8e fix(agc): preserve driver pipeline caches across source updates
Keep driver blobs outside source-version cleanup and import compatible
legacy caches. Persist equal-size content changes and retry incomplete
snapshots without replacing the previous file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 11:56:06 +01:00
Adrià 541b8515df Merge pull request #13879 from sktharunbalaji13-cmd/feat/dcc-clear-write-order
fix(agc): order DCC clear fills against GPU writes in resident presentation
2026-11-01 11:49:32 +01:00
Dean e6f57307fa Merge pull request #10844 from Raghav314/perf/agc-dcc-word-fill-keys
perf(agc): read DCC keys from a pending word fill instead of waiting for the GPU
2026-11-01 23:40:11 +13:00
Dean d2593327b5 Merge pull request #11447 from iamthehimansh/split/macos-agc-build
build(agc): compile Lifecycle, GuestMemory and GuestBufferMemory on macOS
2026-11-01 23:39:32 +13:00
Adrià a644edf30c Merge pull request #13499 from Gonic0/feat/agc-label-read-trap
perf(agc): trap CPU reads of label readbacks on macOS instead of storing them
2026-11-01 11:09:34 +01:00
Tharun Balaji 90f0b5fd3b fix(agc): reset written-since-fill markers on CPU clear-key changes 2026-11-01 14:29:18 +05:30
Adrià 34c27fb890 Merge pull request #13894 from hugodearaujo/fix/agc-mesh-group-limit
fix(agc): continue a direct mesh draw past the X group limit in Z
2026-11-01 09:10:31 +01:00
Dean 15f719a5f9 Merge pull request #8365 from milescoviello/feat/journal-compressed-modules
feat(agc): store the pipeline journal's modules compressed
2026-11-01 19:45:54 +13:00
Nicolas GonzalezandClaude Opus 5.5 a3046f449c perf(agc): trap label reads of small images inside pending large ones
The label read trap skipped every image sharing a page with another
pending image. Large tiled images are never stored at a label, so an
image inside one no longer counts as sharing. A store of an image over a
trapped one now stores the trapped one in the same flush, and an
eviction or explicit write-back stores the trapped images inside it
first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:38:15 -03:00
Nicolas GonzalezandClaude Opus 5.5 0fdd66d900 fix(agc): hold a label read trap until the store and skip aliased memory
The trap was released when FlushPending took the image out of the pending
registry, before it waited for GpuMutex, so a read in between saw the old
bytes; cache eviction and explicit write-backs did not release it at all.
Every store now releases it in writeBackLayers: after recording the GPU copy
into the import, or before the first CPU access on the CPU path, which also
releases the traps of other images on the same pages. A trapped image is
stored whole, and direct memory mapped at a second address is not trapped.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:37:51 -03:00
Nicolas GonzalezandClaude Opus 5.5 2cf5b41ec8 perf(agc): trap CPU reads of label readbacks on macOS instead of storing them
Before a label, a pending linear or small storage image that shares no page
with another pending or storing image now gets a write-watch read trap
instead of its store. The first access to its pages stores it through the
host-read hook; any other store releases the trap first.
APS5_NO_LABEL_READ_TRAP=1 keeps the store at the label.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 03:37:51 -03:00
Dean 3a1457d34f Merge pull request #7261 from tibzejoker/perf/import-proof-reconcile
perf(agc): keep a resource set's import proof across registry changes that leave the imports in place
2026-11-01 19:18:32 +13:00
Adrià 588f2f6fe3 Merge pull request #13883 from hugodearaujo/fix/agc-own-unlanded-label
fix(agc): don't pass a label wait on memory its own queue already reset
2026-11-01 06:41:04 +01:00
Tharun Balaji e250a91f48 fix(agc): scope post-fill writes to units and add regression tests 2026-11-01 10:55:49 +05:30
Tharun Balaji e499e379c2 fix(agc): refresh presented resident fallback and verify clear fill write ordering 2026-11-01 10:55:49 +05:30
Tharun Balaji e5dddde592 fix(agc): order DCC clear fills against GPU writes in resident presentation 2026-11-01 10:55:49 +05:30
Dean a8b98da3a5 Merge pull request #7985 from milescoviello/fix/library-attachment-samples
fix(agc): copy a linked pipeline's color sample counts only when it has color attachments
2026-11-01 17:06:22 +13:00
Dean 8c91f25b39 Merge pull request #10886 from meh7an/perf/agc-unit-flags
perf(agc): track pending and borrowed texture units in 64-bit words
2026-11-01 16:52:46 +13:00
Dean 0db3833e33 Merge pull request #11602 from XatiX/perf/agc-untracked-htile-scan
perf(agc): keep the HTILE clear check of untracked memory until its stamp moves
2026-11-01 16:23:37 +13:00
milescovielloandClaude Opus 5.5 eb4ec317c0 feat(agc): store the pipeline journal's modules compressed
Module records are SPIR-V and take almost all of a journal's bytes, so
APS5_PIPELINE_JOURNAL_MAX_MIB fills with modules and later pipelines
are not recorded (#8309). A module record now keeps its identity, stage
and encoded size, followed by a zstd frame (level 1) of the encoded
result; EncodeModule writes it, and loading and replay expand it before
decoding. The journal format becomes 11: main is at 10 (8 for the point
lists of #6801, 9 for the 4_4_4_4 UNORM targets of #8564, 10 for the
colour logic operation of #9348).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-01 01:59:21 +00:00
Dean dcda6bbd53 Merge pull request #7310 from Amoenus/codex/feat-volume-color-mips-mainaf
feat(agc): render into mipmapped 3D color targets
2026-11-01 14:53:04 +13:00
Dean Galvin 3f74bf0f96 Merge main into perf/agc-unit-flags 2026-11-01 13:38:19 +13:00
Romans Pokrovskis 2c1f59472a merge: refresh volume mip tests after registration split 2026-10-31 23:29:28 +02:00
Kang, Harry Zixuan 4eb530d609 fix(agc): account for mesh window memory 2026-10-31 14:05:16 -07:00
Kang, Harry Zixuan 5b252678e7 fix(agc): keep deferred memory counted until actual release 2026-10-31 14:05:15 -07:00
Kang, Harry Zixuan fe1d6e4370 fix(agc): align accounting with merged memory paths 2026-10-31 14:05:07 -07:00
Kang, Harry Zixuan f0c40d8f24 fix(agc): reclassify reused buffer memory 2026-10-31 14:05:01 -07:00
Kang, Harry Zixuan 465aa0a238 feat(agc): trace device memory allocations and cache budgets 2026-10-31 14:05:00 -07:00
AshwinandClaude Sonnet 5.5 ed3b5393f1 fix(agc): keep mirrors with queued refresh blocks out of eviction
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 22:20:48 +05:30
hugodearaujo 7806d47120 fix(agc): number a layered mesh group from a pushed stride, not NumWorkgroups
A direct mesh draw split into layers now pushes the groups per layer in the
upper half of the mesh draw's index word, and the mesh prologue numbers its
group WorkgroupId.x + WorkgroupId.z * stride. A draw in one layer pushes 0,
so its number is WorkgroupId.x whatever the device reports for the other
components, and the mesh program reads NumWorkgroups only where main did.
Layers past an X limit above 65,535 keep at most 65,535 groups so the stride
fits.
2026-10-31 13:11:45 -03:00
AshwinandClaude Sonnet 5.5 902289426b fix(agc): drop queued refresh blocks of an evicted heap mirror
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-31 21:22:20 +05:30
Ashwin c5b518ff69 fix(agc): evict unreferenced heap mirrors under memory pressure 2026-10-31 21:22:20 +05:30
hugodearaujo e11df016ff fix(agc): hold a label wait on each awaited dword its own queue reset
UnlandedOwnLabel took a queued entry only when it was the caller's own and
fell back to the recorded one otherwise, so an older recorded store of the
waiting queue counted as its newest even when another queue had a newer
queued store of the dword, and an older own queued store won over a newer
recorded store of another queue. It also answered nothing unless every
awaited dword was the queue's own, so an 8-byte wait passed on memory that
the queue's pending reset of one dword was about to change.

The lookup now takes the newest tracked store of each dword, queued or
recorded, by stamp, and reports the value and the dwords whose newest store
is the queue's own and not overwritten. OwnStoreRejects composes what the
wait would read once those stores land (own dwords from the table, the rest
from memory) and keeps the wait only when that value fails the compare, so
the wait's mask and function decide as before and another queue's later
store of a dword still releases it.
2026-10-31 09:25:53 -03:00
hugodearaujo e011e34ad7 fix(agc): keep a zero-instance mesh draw and check the group total without overflow
A direct mesh draw with no instances dispatched zero Y groups before the
split and must not stop the title now. The total-group check divides the
limit instead of multiplying the three factors, which could wrap.
2026-10-31 09:13:38 -03:00
Adrià d50e1cef6e Merge pull request #13656 from jotitadev/fix/agc-slab-retile-index-after-slab-check
fix(agc): check a write-back piece is in a slab before reading its slab copy
2026-10-31 12:28:10 +01:00
Adrià 4e2c5a72e6 Merge pull request #13648 from JJenkx/windows/agc-clear-sampled-texture-on-gpu
perf(agc): clear a fast-cleared sampled texture on the GPU
2026-10-31 12:12:02 +01:00
hugodearaujo aa836fbcf7 fix(agc): continue a direct mesh draw past the X group limit in Z 2026-10-31 07:30:49 -03:00
Adrià 3a6711d08b Merge pull request #13621 from beardsciences/fix/idle-store-yield
fix(agc): yield the queue-idle storage write-back to new work
2026-10-31 11:03:08 +01:00
hugodearaujo 14bcc1a206 fix(agc): don't pass a label wait on memory its own queue already reset
A WAIT_REG_MEM passes as soon as guest memory satisfies its compare. A queue
that resets a label right after its wait on it passed, and waits on it again
before that reset reached memory (the store is recorded on the GPU behind
other work, or still queued), found the old value in memory and passed the
second wait without a new store from the other queue. Skyrim (PPSA03747)
does this on queue 0x28: two passes on 0x112a800020 per signal of queue 0
let the two queues drift a step apart, and later signals overlap and get
lost until both wait forever.

Recorder::UnlandedOwnLabel reports the value a queue's own newest stores of
a label leave once they land, when every awaited dword's newest tracked
store is that queue's, still queued or in a batch not reaped yet, and no
later recorded GPU write covers it. A wait whose memory satisfies the
compare while such a store rejects it keeps waiting (at entry, in the poll
loop and on the pipelined queue-0 path), and reaps while it sleeps so the
store's entry leaves once it landed. Landing waits are unchanged.
2026-10-31 05:16:03 -03:00
Celegans12 448aa816b6 perf(agc): expand an HTILE on the GPU behind a pending mask clear kernel
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
2026-10-31 05:46:37 +01:00
Adrià 6889f9a87d Merge pull request #13527 from JJenkx/windows/agc-dcc-clear-fill-doubling
perf(agc): fill a DCC fast-clear surface by doubling copies
2026-10-31 01:40:18 +01:00
Jota 23c2c9b302 fix(agc): check a write-back piece is in a slab before reading its slab copy
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).
2026-10-30 18:58:08 -03:00
Adrià c9d187be2b Merge pull request #13492 from wrocketdev/fix/agc-tessellation-cull-distance
fix(agc): accept cull distances from tessellation evaluation shaders
2026-10-30 22:51:23 +01:00