Commit Graph
336 Commits
Author SHA1 Message Date
Adrià 87aee045df Merge pull request #6821 from JJenkx/fix/point-context-sdk-defaults
fix(agc): initialize point size and limits from SDK defaults
2026-10-19 13:45:12 +02:00
Adrià f6eeca4f5f Merge pull request #6786 from fdfawef324/claude/agc-indirect-args-stale
fix(agc): wait for address-based writers before reading indirect dispatch arguments
2026-10-19 13:16:24 +02:00
Adrià 118266aec2 Merge pull request #6760 from Ondra97/codex/fix-f64-minmax-denormals
fix(shader): honor f64 min and max input denormal mode
2026-10-19 12:27:39 +02:00
Adrià 8e3d8b9bd8 Merge pull request #6723 from Tripchipp/fix/debt-file-unlinked-entries
fix(tools): keep debt entries without a core link in the index
2026-10-19 12:09:51 +02:00
Dean 7f37d45ed3 Merge pull request #6451 from EagleBearerYS/fix/agc-sample-location-grid-fallback
fix(agc): fall back to pixel (0,0)'s sample locations where the device has no 2x2 grid
2026-10-19 22:22:04 +13:00
Adrià f161098d3b Merge pull request #6563 from notaxeltv/feat/agc-msaa-enable-rect-list
fix(agc): allow MSAA_ENABLE single-sample rect lists
2026-10-19 10:44:32 +02:00
f6c8e8474f fix(agc): wait for address-based writers before reading indirect dispatch arguments
A CPU read of DISPATCH_INDIRECT arguments waited only through the flush
hook, which waits for the ranges recorded work noted as pending writes.
An address-based store (FLAT/GLOBAL, or through a descriptor the
recompiler cannot resolve to a static buffer) is not recorded as a
pending write: its batch leases the registered allocations, and only the
guest pin waiter finished that batch. So the thread-dimension,
misaligned and disabled paths, the fill-kernel path and the device's CPU
fallback read the arguments from before an address-based producer ran.
GTA V (PPSA04264) dies loading Story on such a read: a 64-thread clear
kernel read {160, 288, 0xffffffff} as thread dimensions
(3x288x4294967295 groups), bytes its 1-thread setup kernel had not yet
overwritten with {n, 1, 1}, and threw "workgroup count
3x288x4294967295 exceeds device limits".

Every CPU read of dispatch arguments at execution now first finishes the
recorder up to the newest batch recorded with a lease
(Graphics::FinishLeaseWork). The group read-ahead still reads without
waiting; a dispatch it resolved is adopted only when the execution-time
read gives the same counts, and one that differs is dropped and counted
in the [groupcap] line. The device limit error names the argument
address and cpuReason, and the driver adds the queue, path and
read-ahead outcome. The [indirect] read time includes the lease wait,
and the [recorder] sync-site table records the offset of
FinishLeaseWork's caller. The CPU reads that still miss address-based
writes (indirect draw arguments and count, the copy kernel's count
record, the awaits-title checks) are listed in the technical debt.

IndirectArgumentsPendingProducer covers the execution-time CPU argument
reads on compute queues and the pending-label CPU fallback in the Vulkan
device. Its sixth case records a real argument label behind a host Vulkan
event in an earlier batch and an address-based producer in the later open
batch. The event releases only after that producer batch is submitted;
a bounded watchdog releases for cleanup but fails the case. It requires
a deferred producer lease, an unsubmitted producer at the argument
decision, cpuReason 2 and the fresh arguments and counter result. Small
valid stale counts keep a broken-wait control finite on every driver.
Exact CPU-reason and watchdog diagnostics identify the failing path. This
replaces a spinning workload whose earlier label could retire before
the fallback decision on lavapipe, allowing a false green with cpuReason 0.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Codex <noreply@openai.com>
2026-10-19 10:18:11 +02:00
Adrià b715404323 Merge pull request #6646 from EagleBearerYS/fix/agc-heap-mirror-replan-unwatched
fix(agc): plan a heap again when its mirror's range has left the write watch
2026-10-19 10:15:31 +02:00
Adrià 9a5726cc18 Merge pull request #6601 from Amoenus/codex/feat-msaa-sampled-readback
feat(agc): read individual multisample image samples
2026-10-19 10:14:12 +02:00
Adrià 75ec3b5671 Merge pull request #6543 from karanvora2599/fix/agc-radv-fill-memory-hle
fix(agc): take RADV's fill-memory kernel as a buffer fill
2026-10-19 09:37:38 +02:00
notaxeltvandCursor 92f11a93ed fix(agc): allow MSAA_ENABLE single-sample rect lists
Filled rectangles (VGT_PRIMITIVE_TYPE 7 and 17) use the same single-sample MSAA_ENABLE path as triangles; PPSA03541 stops on a rect-list draw otherwise.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-10-19 09:23:53 +02:00
Dean Galvin 23fc286e4c Merge main into pr-6451
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-19 20:08:05 +13:00
Adrià 72aba1dff5 Merge pull request #6571 from klosixgaming-arch/fix/agc-cb-resolve-msaa-disabled
fix(agc): compare a CB resolve's sample count with the rasterizer onl…
2026-10-19 08:58:54 +02:00
JJenkx c8d7e37f4c fix(agc): initialize point size and limits from SDK defaults 2026-10-19 02:48:17 -04:00
Adrià fcde2cf95c Merge pull request #6529 from al3w0f205/feat/agcdriver-quadlist-primitive
feat(libSceAgcDriver): support quad-list primitive type
2026-10-19 08:38:11 +02:00
Adrià 22e59888ce Merge pull request #6467 from fogydes/feat/agc-driver-command-buffer-submit
feat(libSceAgcDriver): implement command buffer submission
2026-10-19 08:37:37 +02:00
Karan Vora 2907ca6cac fix(agc): take RADV's fill-memory kernel as a buffer fill
RADV initializes and fast-clears DCC keys with its fill_memory compute
kernel, which stores through a global address. Run as an ordinary
dispatch, its stores name no range. The DCC key tracking therefore saw
a key fill only once it had landed in guest memory, which could be
after later writes to the surface had already been recorded.

vkQuake (PPSA99010) hits this on every item pickup:
- the scene renders into a second color buffer;
- RADV's UNDEFINED -> GENERAL barrier fills color buffer 0's keys with
  DCC_CLEAR_0000;
- a screen-effects compute pass writes color buffer 0;
- the UI pass draws on color buffer 0.
The keys landed while the UI pass was being recorded. The refresh took
them for a clear made after the compute pass, dropped its results and
cleared the image to black. For the length of the pickup flash the
scene was black, with only the HUD drawn.

The fill HLE now matches the 16-byte variant of the kernel as a fill of
min(threads * 16, user[4] + 16) bytes. The kernel takes its address in
user[2..3], its largest store offset in user[4] and its value in
user[5]. A key fill through it is handled where it is in the command
stream.
2026-10-19 08:21:36 +02:00
fogydes c3775ea000 feat(libSceAgcDriver): implement command buffer submission 2026-10-19 11:28:13 +05:30
al3w0f205 55d4a9fa1d feat(libSceAgcDriver): support quad-list primitive type
Primitive type 19 (DI_PT_QUADLIST, 0x13) is used by Unity and other engines for UI quads, sprites and font glyphs. Because Vulkan lacks native quad-list primitive topology, quad draws are expanded on the CPU into indexed triangle lists with 6 indices per 4-vertex quad, respecting the first/last provoking vertex configuration and discarding incomplete trailing vertices. Adds unit tests and documents the functional debt.
2026-10-19 07:39:59 +02:00
Yunus Shaikh acf80cc109 docs(agc): describe the 2x checkerboard in the sample-location debt entry without title ids 2026-10-18 20:58:27 -07:00
elliot 11a7b61d72 fix(agc): split oversized dispatches with workgroup offset specialization
A dispatch over maxComputeWorkGroupCount was split into vkCmdDispatchBase
chunks whose base reached the limit, which VUID-vkCmdDispatchBase-baseGroupX-00421
forbids, and NVIDIA refused the split outright.

Compute modules now declare WorkgroupOffset specialization constants (default 0)
that the recompiler adds to WorkgroupId and GlobalInvocationId and keeps
unmaterialized. Each chunk is recorded with vkCmdDispatch from group 0, bound to
a pipeline variant specialized with the chunk's base. The NVIDIA throw is gone;
device-memory LDS splits still throw.

Fixes #7375
2026-10-18 22:54:33 -05:00
Dean 3ddbc4accc Merge pull request #4650 from Mouad-Scriptz-0/feat/agc-depth-range-remap
feat(agc): remap a viewport depth range the device cannot express into the vertex shader
2026-10-19 16:52:31 +13:00
klosixgaming-arch 0d4cbd538b fix(agc): compare a CB resolve's sample count with the rasterizer only under MSAA_ENABLE
PPSA08270 (Eternights) stopped after its story intro with "AGC graphics:
CB resolve from a target whose sample count differs from the
rasterizer's". It resolves a 4x 512x512 target into a single-sample one
with PA_SC_MODE_CNTL_0.MSAA_ENABLE off while PA_SC_AA_CONFIG still holds
2x from earlier draws. Without MSAA_ENABLE the scan converter does not
use PA_SC_AA_CONFIG's sample count, so the resolve takes its sample
count from CB0 as it already does when PA_SC_AA_CONFIG is single-sample.
2026-10-19 03:06:07 +00:00
Dean fa0ac6d5ce Merge pull request #5926 from xXPBSXx/fix/agc-vertex-fetch-overhang
fix(libSceAgcDriver): zero the overhanging record of a vertex fetch
2026-10-19 15:56:44 +13:00
Yunus Shaikh e19cf1ac21 Merge main into fix/agc-heap-mirror-replan-unwatched
The host-import debt entry takes main's budget sentence and keeps this branch's heap-mirror sentence.
2026-10-18 19:55:25 -07:00
AhirandClaude Opus 5.5 f970620d95 fix(agc): keep half the host heap out of the host import budget
Imports, type-3 mirrors and the buffers and textures placed in host memory share the driver's system memory heap. On Windows that heap is half the physical memory, so on a 16 GiB machine the old budget (the heap less 2 GiB) let imports hold about 6 of its 8 GiB, and host buffer allocations then overflowed into the 256 MiB device-local host-visible heap and failed. The budget now reserves the larger of 2 GiB and half the largest host heap.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-19 04:11:15 +02:00
xXPBSXxandClaude Sonnet 5.5 55b197d31c docs(debt): describe the vertex fetch overhang case without the title
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 03:47:33 +02:00
xXPBSXxandClaude Sonnet 5.5 d01548e81b fix(libSceAgcDriver): zero the overhanging record of a vertex fetch
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-19 03:47:33 +02:00
Dean Galvin 4d4ae6e5eb Merge main into pr-4650
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/ShaderMemory.cpp
#	core/shader/recompiler/ControlFlow/src/RequestSerializer.cpp
#	core/shader/recompiler/tests/RequestSerializerTests.cpp
2026-10-19 14:32:36 +13:00
Yunus Shaikh b6489b863a Merge main into fix/agc-sample-location-grid-fallback
The custom MSAA sample-location debt entry keeps this branch's grid stand-in text and takes main's sentence on ANCILLARY and the position inputs of a once-per-pixel shader.
2026-10-18 18:25:31 -07:00
Adrià 00666eeb36 Merge pull request #6470 from EagleBearerYS/fix/recompiler-once-per-pixel-sample-inputs
fix(recompiler): run a pixel shader the guest does not iterate once per pixel
2026-10-19 03:21:34 +02:00
Adrià 12c1d1875f Merge pull request #6464 from AymanFE/claude/project-thread-d8qx30
fix(agc): overestimate single-sample draws with centroid inputs
2026-10-19 03:02:01 +02:00
Dean a373e85e56 Merge pull request #7194 from XairRrR/fix/agc-htile-later-slice-clear
fix(agc): take a later slice's HTILE clear when every word has ZMask 0
2026-10-19 13:09:45 +13:00
Adrià a6dd29b3da Merge pull request #6215 from Ondra97/codex/fix-msaa-retired-target-lifetime
fix(agc): reclaim retired multisample color targets
2026-10-19 01:37:13 +02:00
Ondra97andRomans Pokrovskis 785f8f7bcf fix(agc): reclaim retired multisample color targets
Co-authored-by: Romans Pokrovskis <motivated.it@gmail.com>
2026-10-19 01:08:37 +02:00
Ondra97 a64d038154 fix(libs): flush pending GPU results before file writes 2026-10-19 00:53:25 +02:00
Dean Galvin cf4d1f4a97 Merge main into pr-4650
# Conflicts:
#	core/shader/recompiler/ShaderDiskCache.cpp
2026-10-19 11:15:57 +13:00
Yunus Shaikh d13a90d015 Merge main into fix/recompiler-once-per-pixel-sample-inputs
Resolves the shader debt file bullet by bullet: main's EmitSetAttribute entry, and this branch's PERSP_SAMPLE/LINEAR_SAMPLE and pixel-position entries.
2026-10-18 15:14:25 -07:00
Adrià 1158cb8aab Merge pull request #6255 from LeandroLP23/fix/agc-kill-demoted-quad-pixels
fix(shader): kill demoted quad-mask pixels when the pixel program returns
2026-10-18 23:26:48 +02:00
Adrià 05171bc66b Merge pull request #5987 from GustavoGamarra95/fix/agc-device-memory-host-fallback
fix(agc): place device memory in host memory when the driver refuses a device-local allocation
2026-10-18 22:02:03 +02:00
Adrià 8a7f434f19 Merge pull request #6196 from SandstromPL/fix/agc-msaa-enable-clear-one-sample-target
fix(agc): rasterize into one-sample targets as one sample when MSAA_ENABLE is clear
2026-10-18 20:49:55 +02:00
Yunus Shaikh dc47a81b02 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-18 11:30:31 -07:00
Yunus Shaikh 7da5ba7b3c Merge main into fix/agc-heap-mirror-replan-unwatched 2026-10-18 11:30:09 -07:00
Dean 0ff835652a Merge pull request #6445 from Amoenus/codex/fix-msaa-surface-footprint-mainff
fix(agc): complete sampled MSAA geometry after fragment sizing
2026-10-19 07:22:32 +13:00
Dean 79896f332f Merge pull request #7137 from Lberonio/fix/agc-eop-latch-queue-mode
fix(agc): suppress the flip end-of-pipe event on queues that raise release interrupts
2026-10-19 07:22:24 +13:00
Adrià c34e9d855c Merge pull request #6160 from fma-rc/feat/agc-fs-table-calls
feat(agc): link calls through the AGC FS table
2026-10-18 19:44:10 +02:00
Gustavo Ariel Gamarra Rojas 57fc04be01 fix(agc): place repacked and stencil copies in host memory after a refused reclaim
Repacked copies and depth stencil copies allocated device-local memory
directly and stopped the title on a refusal; they now take the same
allocation path as the other images. Device buffers choose their host
fallback type the same way, the host placement line carries the cumulative
MiB, and the debt file records that a placed image stays in host memory
for its lifetime.
2026-10-18 19:29:47 +02:00
Adrià e1338ff5ea Merge pull request #5999 from mazen320/fix/retroarch-windows-select-and-8_8-uint
fix(libkernel,agc): unblock RetroArch Windows select and 8_8 UINT
2026-10-18 18:53:13 +02:00
Adrià cd04995e01 Merge pull request #6054 from Dextroid17/feat/srgb-copy-pr
feat(agc): sample 8 and 8_8 sRGB textures through an RGBA8 sRGB copy
2026-10-18 18:44:08 +02:00
Maz bb39eba819 fix(agc): decode COLOR_8_8 UINT as R8G8_UINT 2026-10-18 18:17:52 +02:00