Commit Graph
1196 Commits
Author SHA1 Message Date
Dean 108a85a325 Merge pull request #11104 from EagleBearerYS/feat/unbuilt-exports-guard
feat(tools): fail when a library source that defines exports is never built
2026-11-03 21:09:59 +13:00
Dean 6e08dc3d6e Merge pull request #14243 from Tamalero/fix/agc-fp16-abgr-uint-target
fix(libSceAgcDriver): export FP16_ABGR into UINT color targets
2026-11-03 21:08:31 +13:00
Dean fec9ceae93 Merge pull request #14005 from hugodearaujo/fix/agc-nohtile-uniform-depth
fix(agc): import a native multisample D32S8 target without HTILE whose planes each hold one value
2026-11-03 21:08:19 +13:00
Dean 8b1be62353 Merge pull request #14302 from hugodearaujo/fix/agc-storage-cpu-rewrite
fix(agc): keep a CPU store that rewrote a pending block with its baseline bytes
2026-11-03 21:08:14 +13:00
Dean ff8faeb7d6 Merge pull request #14311 from XatiX/fix/agc-store-occasional-images
fix(agc): store an occasionally written image before a label
2026-11-03 21:08:07 +13:00
Dean a8544c6745 Merge pull request #14815 from hugodearaujo/perf/agc-staging-shadow-headroom
perf(agc): refuse a staging shadow that would take the last eighth of the device-local budget
2026-11-03 21:08:02 +13:00
Dean 1d922bd0b1 Merge pull request #6185 from ee6aba54/fix/agc-changed-copy-back
fix(agc): copy only the dwords a shader changed back from a GPU-copied buffer
2026-11-03 21:07:12 +13:00
Dean a9e723b83b Merge pull request #14909 from kallmek3nny/feat/shader-alpha-to-coverage-sample-mask
feat(shader): combine alpha-to-coverage with a sample-mask export
2026-11-03 18:12:13 +13:00
Yunus Shaikh b211f54b97 test(libSceAgcDriver): drop the user data writers main implemented from the pending list
#13474 implemented sceAgcDriverUserDataWritePacket,
sceAgcDriverUserDataWritePushMarker, sceAgcDriverUserDataWriteSetMarker
and sceAgcDriverUserDataWritePopMarker in Submit/src/Dcb.cpp, with their
firmware signatures, and removed their stubs from Export.cpp. The
pending export list still named them as no-parameter stubs, so
UnsupportedDiagnostics.cpp stopped compiling once merged with main.

The list drops them, and the debt entry counts the 24 exports that are
still pending. The other listed exports are still stubs on main.
2026-11-02 17:11:54 -08:00
Yunus Shaikh 48f0002490 Merge main into feat/unbuilt-exports-guard 2026-11-02 17:03:14 -08:00
Dean 1f272537eb Merge pull request #12764 from Pipodi/perf/flat-private-aperture-1028
perf(recompiler): back compute scratch with a device buffer slot pool
2026-11-03 11:35:12 +13:00
hugodearaujo d2399ff2cd Merge main a4eca2a056 into the uniform-plane depth branch 2026-11-02 15:35:08 -03:00
hugodearaujo 2c6b5e4477 Merge main a4eca2a056 into the rewritten-baseline branch 2026-11-02 15:23:42 -03:00
XatiXandClaude Opus 5.5 44df0c5fbc fix(agc): store an occasionally written image before a label
A title can render a tiled image by compute and read it on the CPU after a label. StoreReadbackBeforeLabel took only linear images and those up to 64 KiB, so the CPU read the old bytes at that address. PPSA06866 renders its save thumbnail into a 768 KiB image this way and stored noise as every save's PNG. An image up to 1 MiB on its first write or not written in the last 8 flips now takes one store before a label. The label clears the flag when it chooses the image, so with no flips it cannot store the image at every label. Images written on consecutive flips stay on the GPU.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 17:34:17 +00:00
Dean 7d6055732f Merge pull request #13474 from BunnyFl/feat/libsceagcdriver-user-data-writers
feat(libSceAgcDriver): write the user data packets as firmware 13.42 does
2026-11-03 06:31:28 +13:00
Dean f01a601be2 Merge pull request #13146 from Prophet069/pr/agc-msaa-color-upload
feat(agc): upload varying guest samples of a multisampled texture no draw rendered to
2026-11-03 06:27:12 +13:00
Dean cf8dbaed2e Merge pull request #12651 from slopgobblercobbler/fix/agc-eq-event-and-queue-context-validation
fix(agc): validate queue context alignment and event queue parameters
2026-11-03 02:39:15 +13:00
Dean ead4b80484 Merge pull request #12348 from vingelvatten/feat/oracle-vulkan-runner
feat(agc): run hardware oracle kernels through the recompiler on Vulkan
2026-11-03 02:37:27 +13:00
Dean 906597a512 Merge pull request #12246 from B-Howell/feat/agc-1d-array-layer-rows
feat(agc): sample 1D arrays past maxImageArrayLayers as rows of a 2D image
2026-11-03 02:36:11 +13:00
Dean 94a803bd39 Merge pull request #11886 from Sumaiter/fix/issue-10199-label-memory-write
fix(agc): order queued labels behind every earlier write at submit
2026-11-03 01:27:49 +13:00
Dean b6ab5e7abd Merge pull request #7893 from thuanquang/fix/strip-first-provoking-order
fix(shader): hand a geometry program strip and fan triangles in the order of its provoking vertex mode
2026-11-03 01:25:32 +13:00
Dean Galvin e9d8998d58 Merge main 3c3b3cda73 into #12764 (fee187ee67)
SpirvEmitter.cpp: main now calls Finalize() before filling info and checks
spanned-wave barriers on the words; keep that and run this branch's
VerifyScratchPoolReturns(state, words) on the same words before returning.
2026-11-02 23:39:24 +13:00
Dean 54746cb800 Merge pull request #11280 from Michael-KD/feat/linear-texture-custom-pitch
feat(agc): honour the DEPTH row pitch of linear 2D textures as RDNA2 does
2026-11-02 23:27:24 +13:00
Dean d7809ef62b Merge pull request #11126 from shahulmubeen-a/feat/agc-unnormalized-mirror-samplers
feat(agc): sample unnormalized S#s with mirror and mirror-once clamp modes
2026-11-02 23:27:03 +13:00
Dean 12683e2cef Merge pull request #10435 from ntamas94/fix/ps4-htile-macro-tile
fix(libSceAgcDriver): size a PS4 depth target's HTILE in 512x512 blocks
2026-11-02 23:25:57 +13:00
Dean e4119e9455 Merge pull request #10333 from SleglJan/test/6868-driver-store-tests
test(agc): cover repeated driver stores into a shared block's exact ring
2026-11-02 23:25:51 +13:00
Dean baba4197ad Merge pull request #10940 from TechLevelZero/fix/storage-idle-flush-own-device
fix(agc): keep a device's idle stores and storage write-backs on its own recorder
2026-11-02 23:25:17 +13:00
Dean 0d02927bd0 Merge pull request #10906 from EagleBearerYS/fix/shader-null-storage-image-type0
fix(agc): bind a written TYPE 0 or 1 static image slot as a null storage image
2026-11-02 23:24:59 +13:00
Dean d4ee73b8cd Merge pull request #10760 from lgqdaxia/codex/fix-capture-trace-backpressure
fix(agc): keep capture trace output nonfatal
2026-11-02 23:24:20 +13:00
Dean Galvin fee187ee67 Merge commit '88e804b0a7df1f1ac373a9e2f72fb378d925fdd4' into HEAD
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/VulkanDevice.cpp
#	docs/dev/debt/libSceAgcDriver.md
#	docs/dev/debt/shader.md
2026-11-02 21:17:34 +13:00
Dean Galvin f0a15aeb5e Merge commit '88e804b0a7df1f1ac373a9e2f72fb378d925fdd4' into HEAD
# Conflicts:
#	core/libs/prx/libSceAgcDriver/tests/Recorder.cpp
#	core/libs/prx/libSceAgcDriver/tests/cmake/agc_driver_recorder_tests.cmake
2026-11-02 21:06:52 +13:00
Dean 2403a74f49 Merge pull request #10026 from winstrex/fix/agc-unwatch-baseline
fix(agc): hash an idle unit when its range leaves the write watch instead of at every upload
2026-11-02 20:59:45 +13:00
Dean a4b76b2c0a Merge pull request #9717 from EagleBearerYS/feat/agc-msaa-d32s8-stencil-view
feat(agc): sample the stencil plane of a native multisampled D32S8 target
2026-11-02 20:58:14 +13:00
Dean 00069c0920 Merge pull request #8874 from JJenkx/perf/agc-heap-reference-reuse
perf(agc): reuse heap mirror reference buffers between builds
2026-11-02 20:57:02 +13:00
Dean 8c96e69367 Merge pull request #8542 from milescoviello/fix/journal-replay-limit-per-kind
fix(agc): bound a journal replay's graphics and compute pipelines apart
2026-11-02 20:56:51 +13:00
Dean 9f33492f6a Merge pull request #8395 from hugodearaujo/fix/agc-fast-launch-input-topology
fix(agc): decode a fast-launch draw as one point per subgroup whatever its input type
2026-11-02 20:56:41 +13:00
Dean 48d8915ff5 Merge pull request #8014 from 011010/feat/agc-bda-atomics-moltenvk
fix(agc): skip the pixel interlock test where BDA atomics are not atomic
2026-11-02 20:56:36 +13:00
Dean 8ea18deb39 Merge pull request #7717 from xXPBSXx/fix-agc-view-range-adjustment
fix(agc): bind a V# of exactly the range limit within the limit
2026-11-02 20:56:31 +13:00
Dean 5a53826b8d Merge pull request #7446 from EagleBearerYS/fix/agc-draw-recapture-on-change
fix(agc): prepare a draw or dispatch again when the memory it captured changed before it was recorded
2026-11-02 20:55:57 +13:00
Dean 0c0b1b22b9 Merge pull request #6959 from JJenkx/fix/mesh-layer-windows-main2fab
fix(agc): render layered mesh targets within device limits
2026-11-02 20:55:52 +13:00
Dean a20477ae0b Merge pull request #4449 from Mouad-Scriptz-0/fix/dmabuf-import-coherence
feat(libSceAgcDriver): import scattered direct memory as a dma-buf run list and probe its coherence
2026-11-02 20:55:19 +13:00
Alex ColliniandClaude Opus 5.5 ce38162aa1 fix(agc): hold one compute scratch pool under 2 GiB and the total budget
On an RTX 4090 (driver 617.42) a scratch pool buffer of 2049 MiB returned wrong scratch values in the scratch dispatch bench, while 2047 MiB was correct, though maxStorageBufferRange is larger. One pool is now held under 2 GiB, under APS5_SCRATCH_POOL_MIB and under APS5_SCRATCH_POOL_TOTAL_MIB, so a large APS5_SCRATCH_POOL_MIB no longer creates a pool over the total budget or over 2 GiB.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:35:35 +01:00
Alex ColliniandClaude Opus 5.5 cc61c3ae31 perf(agc): hold all compute scratch pools under one memory budget
Each compute program that uses scratch kept its own pool of up to APS5_SCRATCH_POOL_MIB (64 MiB) until device teardown, so the pools of many such programs added up without bound.

All pools together are now held under APS5_SCRATCH_POOL_TOTAL_MIB (default 256 MiB). A new or enlarged pool first drops the least recently used pools until it fits; the newest pool is always kept. A dropped pool stays alive until the batches that recorded it complete, since the recorder keeps a reference, and the program gets a new pool with a zeroed header when it dispatches again.

The test dispatches two scratch programs over a 1 MiB budget and checks that the second evicts the first, and that the first then runs correctly in a recreated pool.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:35:35 +01:00
Alex ColliniandClaude Opus 5.5 f369273365 fix(agc): zero the scratch pool header when the pool is created
The slot-lock header of a compute scratch pool was cleared by a fill recorded
into the first dispatch batch that used the pool, and a flag set at record time
said it was done. A batch that Recorder::Submit discarded unsubmitted (for
example a vkEndCommandBuffer failure) left the pool cached with the flag set,
so later dispatches skipped the clear and slot acquisition read uninitialized
ownership words and could spin; a second dispatch recorded against the same
pool before the first batch submitted trusted the same flag.

The header is now zeroed by a one-off command batch that is submitted and
waited on when the pool is created, before the dispatch's own batch opens, so
discards and recording order no longer matter. The zeroed flag and the
in-batch fill are gone. A new test discards the first batch that uses a pool
(two dispatches against it) on top of dirtied pool memory and checks that the
header reads zero and the retried dispatch completes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:35:35 +01:00
Alex ColliniandClaude Opus 5.5 a46f050af8 perf(recompiler): back compute scratch with a device buffer slot pool
NVIDIA's front end spends tens of seconds per large compute program on the
dynamically indexed Function arrays that held the per-lane scratch. A compute
program that uses scratch (scratch_* or a FLAT access that the aperture split
routes to the private aperture) now keeps it in a storage buffer instead, so
no Function array is declared or indexed. FLAT routing is unchanged.

The driver allocates one buffer per compute pipeline on its first dispatch,
capped by APS5_SCRATCH_POOL_MIB (default 64), holding a lock word and an
invocation counter per slot followed by the slots, and binds it in descriptor
set 2 (the layout of the device-memory LDS buffer). The shader takes the slot
count from the array length. Invocation 0 of each workgroup claims a slot with
a compare-exchange scan that starts at its linear workgroup id and spins until
it wins one; a barrier publishes the slot. Every invocation decrements the
slot's counter on every compute exit and the last one frees the lock, so
divergent exits and concurrent dispatches of one pipeline share the buffer
safely. The emitter fails the compile if a compute return lacks the release.
Programs without scratch keep their SPIR-V and pipeline layout.

The buffer is decorated Coherent: without it NVIDIA lost earlier byte stores
of a sequence of byte read-modify-writes to one dword. Lane-private
read-modify-writes no longer use atomics.

Tests: a new execution test covers the private aperture reached through a
table load, a literal and a computed address (store, atomic, and both ways
through scratch_*), a callee reached through s_swappc_b64, isolation of 64
workgroups over one or two slots, divergent wave exits with a second dispatch
reusing the slots, and the module shape (no Function array, no binding in a
program without scratch). The guarded memory load fixture skips the slot
acquisition.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 04:35:35 +01:00
JJenkx de5afa8144 chore(agc): merge main preserving reference storage and split tests 2026-11-01 20:14:35 -05:00
kenny solo 0004d35125 feat(shader): combine alpha-to-coverage with a sample-mask export
With alpha-to-coverage and DB_SHADER_CONTROL.MASK_EXPORT_ENABLE the pixel shader now writes SampleMask as the AND of its MRT0 alpha coverage and its MRTZ mask export instead of throwing, as Vulkan multisample coverage ANDs the shader sample mask with the alpha-to-coverage mask. Adds eight- and two-sample GPU tests and a shader debt entry for the rule, which is not measured on hardware.
2026-11-01 18:54:23 -05:00
Dean 66e1f7f993 Merge pull request #8123 from JJenkx/fix/msaa-dcc-register-clear-mainf295
fix(agc): import multisampled DCC register clears
2026-11-02 12:29:51 +13:00
Dean e3c27da3fb Merge pull request #7844 from Mouhand-Kaddo/fix/agc-host-import-reserve-cap
fix(agc): keep at most 4 GiB of the host heap from the host import budget
2026-11-02 12:29:08 +13:00
Dean 4ac683fe02 Merge pull request #8319 from Aryansh1520/docs/agc-multisample-depth-htile-gap
docs(debt): record the non-pipe-aligned depth HTILE import gap
2026-11-02 12:05:40 +13:00