Commit Graph
1275 Commits
Author SHA1 Message Date
blu 445a549d88 Merge branch 'boykopovar:main' into fix/agc-driver-frame-dump-wait 2026-10-21 19:04:09 -07:00
Adrià 0c6a5bd593 Merge pull request #8519 from MarrasFederico/fix/agc-zero-stride-oob-select
fix(agc): follow RDNA 2's range checks for zero-stride vertex fetches
2026-10-21 21:54:30 +02:00
Dean 584c5a80fd Merge pull request #6718 from Zenodeon/stk-resource-performance-pr
perf(agc): avoid redundant texture-array CPU transfers
2026-10-22 08:30:01 +13:00
Adrià 1698d1ea6a Merge pull request #8642 from MarcZX10/codex/color-compare-format-support-7934
fix(agc): match measured color comparison formats
2026-10-21 21:02:30 +02:00
Federico Marras 58afce1ad1 fix(agc): follow RDNA 2's range checks for zero-stride vertex fetches 2026-10-21 20:16:30 +02:00
Adrià 5fe3a62644 Merge pull request #7981 from fisherjoey/fix/import-window-digests
fix(agc): hash the pages of an import window instead of copying them
2026-10-21 20:05:58 +02:00
Adrià 95d17687ae Merge pull request #8267 from thuanquang/fix/amd-robust2
fix(agc): give AMD's proprietary driver robustBufferAccess2 again
2026-10-21 19:59:43 +02:00
Adrià 60976d8a4a Merge pull request #7827 from MarcZX10/codex/fix-lds-split-before-allocation-7794
fix(agc): refuse LDS split before allocation
2026-10-21 19:55:16 +02:00
Dean 4ec064d29b Merge pull request #6887 from Amoenus/codex/test-msaa-reader-retile-main143
test(agc): connect MSAA sample readback to tiled layouts
2026-10-22 06:14:29 +13:00
Adrià 5bd9912658 Merge pull request #8317 from hypermoist/feat/agc-static-buffers
feat(libSceAgc): implement static buffers and qwords
2026-10-21 15:32:19 +02:00
Romans Pokrovskis b4fbf24d1e feat(agc): upload individual multisample image samples 2026-10-21 16:06:59 +03:00
Dean fdf22f9546 Merge pull request #7911 from savvaniss/fix/agc-release-mem-system-counter
fix(agc): name the RELEASE_MEM system counter instead of GDS data
2026-10-22 01:54:27 +13:00
Dean 0c83831421 Merge pull request #8975 from milescoviello/rebase/5499-db-depth-copy
feat(agc): run DB depth copies into a single-sample R32 float target
2026-10-22 01:20:22 +13:00
Savvanis Spyros 123768abcd Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into fix/agc-release-mem-system-counter
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-21 14:15:53 +03:00
Adrià 98145b48d8 Merge pull request #7426 from DavidSamir/feat/shader-barycentric-tessellation-last-vertex
feat(agc): draw the last provoking vertex through the barycentric tessellation stages
2026-10-21 13:08:47 +02:00
Adrià 2cca5c0fd6 Merge pull request #7600 from milescoviello/feat/msaa-dcc-comp-to-single
feat(agc): take RADV's comp-to-single clear of a multisampled DCC target
2026-10-21 13:07:42 +02:00
Adrià 27fabb6b7d Merge pull request #7869 from savvaniss/feat/agc-polygon-mode
feat(agc): draw point and line polygon modes
2026-10-21 12:48:05 +02:00
Joey Fisher ed921e225f fix(agc): hash the pages of an import window instead of copying them
ImportWatched kept a copy of every non-zero page of the range being imported, so that a page the
write watch reported during the import could be told from one that still held its bytes. The copy
had the range's footprint: a first import of a 0.5-3 GiB guest heap held that much host memory
while it ran.

The window now keeps a 64-bit digest per 4 KiB page (four xxHash64 lanes) and compares digests:
8 bytes per page, 1/512 of the range. Same decision for every page, same reads of guest memory.

CheckImportWindowFootprint imports a 64 MiB watched range and requires the heap held during the
import to stay under 1 MiB. It failed with "held 64 MiB" before this change.
2026-10-21 04:13:49 -06:00
Dean aa37bc7aef Merge pull request #6683 from EagleBearerYS/fix/agc-sample-location-grid-exact
fix(agc): keep the guest's sample order where pixel (0,0)'s locations stand in for a 2x2 grid
2026-10-21 23:00:12 +13:00
milescovielloandClaude Opus 5.5 127aba3ed6 fix(agc): order and address DB depth copies like the surfaces they read
- Drain the draw pipeline before recording the copy, as the CB metadata
  pass does, so the copy follows the queued draws that render the plane.
- Address the plane as decodeDepth registers it: a multisampled plane's
  pipe-bank XOR bits are stripped and a DB_DEPTH_VIEW slice is added.
  Mipmapped or partially resident planes are refused.
- Refuse a color target with CMASK fast clears, as the CB resolve does.
- Find the source through the depth owner (planeSurface) and require a
  32-bit float surface with the decoded sample count.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 08:54:50 +00:00
codingreapermapsandClaude Opus 5.5 191c8a8d2b feat(agc): run DB depth copies into a single-sample R32 float target
A draw with DB_RENDER_CONTROL.DEPTH_COPY copies one sample of the
Z_32_FLOAT depth surface into color target 0. It now runs as a compute
pass that fetches that sample and stores it into the R32 float target,
when the draw covers the whole surface without depth or stencil tests.
With COPY_CENTROID the sample is the first one the draw covers, which is
sample 0 under the full sample mask the driver requires, as radeonsi
programs its per-sample DB to CB copies.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 08:03:33 +00:00
Savvanis SpyrosandClaude Opus 5.5 e61d31d287 feat(agc): draw point and line polygon modes
PA_SU_SC_MODE_CNTL with POLY_MODE set to a point or line type was refused,
and every triangle was drawn filled. The state decode now takes the polygon
type of the faces that are not culled into State::polygonMode, ignores the
types when POLY_MODE is clear or the primitives are points or lines, and
keeps refusing front and back types that differ while both faces are drawn.

Points are drawn one pixel wide (PA_SU_POINT_SIZE 0x00080008 inside
PA_SU_POINT_MINMAX), the size VK_KHR_maintenance5 gives a point whose
shader does not write PointSize, and lines one pixel wide (PA_SU_LINE_CNTL).
The device enables fillModeNonSolid and maintenance5 when they are
available. The polygon mode joins the pipeline, library and draw keys and
the pipeline journal (format 5).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 10:13:32 +03:00
Yunus Shaikh 8c9c8eb5b5 Merge main into fix/agc-sample-location-grid-exact
main 7ce3b1df3e took disk-cache format 43 (#8295) for its own layout, so this
branch's format moves to 44. The request serializer stays at 42: main
still writes 41.
2026-10-20 23:48:14 -07:00
thuanquangandClaude da5c7a895d fix(agc): give AMD's proprietary driver robustBufferAccess2 again
enabling it broke agc_driver_layered_volume_draw, agc_driver_layered_volume_vertex
and agc_driver_subvector_loop on an RX 6700 XT. With #7623 and #7828 on
main, those tests pass with the feature on, in either library-mode order.
This reverts 48b394d1e and keeps the record of #7623's empty-mask test in
the s_subvector_loop debt entry.

Co-Authored-By: Claude <[email protected]>
2026-10-21 13:43:39 +07:00
blu 8fe945e590 Merge branch 'boykopovar:main' into fix/agc-driver-frame-dump-wait 2026-10-20 23:37:16 -07:00
Celegans12 952ddb7844 feat(agc): skip draws whose graphics stage the recompiler refuses behind APS5_SKIP_REFUSED_DRAWS
When a draw's stage fails to prepare, capture or recompile, the packet
worker fails the queue and the next Submit or WaitIdle rethrows the
error, which ends the title. With APS5_SKIP_REFUSED_DRAWS set,
materializeDrawStage rethrows that error as a RefusedDraw; the packet
loop skips the draw, counts it as a thrown skip, logs the shader once
per address and runs the rest of the submission. The frame then lacks
that draw. Compute refusals and errors outside the stage build fail as
before, and without the switch nothing changes.

agc_driver_draw_unsupported_buffer_type_skip_refused submits a draw
whose pixel shader is refused twice with the switch: the WRITE_DATA
after it lands both times and the color target stays untouched.

AI-assisted: yes
2026-10-21 08:17:59 +02:00
Dean 53a0a27bb6 Merge pull request #8134 from wachi35676/fix/shader-amd-wave-lds-memory-barrier
fix(shader): order wave LDS accesses with a memory barrier on AMD's proprietary driver
2026-10-21 18:46:41 +13:00
Yunus Shaikh 6d09797d6b Merge main into fix/agc-sample-location-grid-exact 2026-10-21 05:39:42 +00:00
Dean GalvinandZenodeon 5f7fa7abcc Merge origin/main into PR 6718
Co-authored-by: Zenodeon <[email protected]>
2026-10-21 18:10:12 +13:00
Dean e0e57a3270 Merge pull request #8263 from milescoviello/fix/profile-differing-value-set-hashes
fix(agc): remember the differing statistics' value sets by hash
2026-10-21 15:48:28 +13:00
Dean GalvinandMuhammad Wasif Ali Wasif 490adefc09 Merge origin/main into PR 8134
Co-authored-by: Muhammad Wasif Ali Wasif <[email protected]>
2026-10-21 14:56:22 +13:00
Dean a4fc462a6d Merge pull request #8108 from milescoviello/fix/rewind-tail-end-timer
fix(agc): end a pipelined submission's EndSubmission time before its REWIND tail runs
2026-10-21 14:24:14 +13:00
Dean 3b5a24c0d6 Merge pull request #8075 from johandavidcm/feat/agc-sample-committer
feat(agc): sample the draw committer with APS5_SAMPLE_COMMITTER
2026-10-21 14:12:36 +13:00
Dean 57fdffd915 Merge pull request #8697 from oneandonlydean/feat/f32-denorm-preserve
feat(shader): request DenormPreserve 32 where the device preserves f32 denormals
2026-10-21 13:29:41 +13:00
Dean 926ed2eda1 Merge pull request #7480 from Scramblrrrr/codex/videoout-force-sdr-main
feat(videoout): allow forcing SDR output
2026-10-21 12:28:40 +13:00
Dean 466ce3ac45 Merge pull request #7474 from Dripl1x/codex/ui-lab-immediate-exit-cache
fix(agc): preserve pipeline caches on immediate guest exit
2026-10-21 11:23:40 +13:00
Dean Galvin a07ad30578 feat(shader): request DenormPreserve 32 where the device preserves f32 denormals
The recompiler asked for DenormPreserve only for 16-bit and 64-bit floats,
so a device that flushes 32-bit denormals by default (RADV, MoltenVK) flushed
them whatever the guest's float mode said. target.float32DenormPreserve is set
from shaderDenormPreserveFloat32 when denormBehaviorIndependence allows a 32-bit
mode, is part of the cache key and of the request serialization (version 41),
and makes the module declare DenormPreserve 32 unless the 32-bit flush is
already taken in hardware. APS5_NO_HW_F32_PRESERVE=1 turns it off.
2026-10-21 10:45:24 +13:00
bluandClaude Fable 5.1 3ed129ab33 fix(agc-driver): make the presenter wait for a full frame dump queue
With APS5_DUMP_FRAMES, FrameDumpWriter::Enqueue threw "frame dump queue exceeded 64 MiB" when the
writer thread fell more than 64 MiB behind, which failed the presentation and ended the title.
#4320 made that rare at the default APS5_DUMP_SCALE=4; at APS5_DUMP_SCALE=1 a 1920x1080 title
reaches it within nine frames and a 3840x2160 one on the third.

Enqueue now waits on the writer's condition variable until the frame fits, and the writer
notifies after each file; a single frame larger than the queue still throws. The VideoOut frame
dump queue test gets a wait mode at scale 1 whose third frame has to wait for the held first one.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
2026-10-20 14:29:09 -07:00
Adrià e48bbff9ff Merge pull request #8578 from imellag/perf/agc-f32-flush-probe-moltenvk
perf(agc): probe the f32 denormal flush on MoltenVK
2026-10-20 23:27:16 +02:00
Adrià 73b6a4cc71 Merge pull request #8066 from HQasper/perf/gpu-thread-dimensions
perf(agc): resolve DISPATCH_INDIRECT thread dimensions on the GPU
2026-10-20 23:06:48 +02:00
MarcZX10 745ff15b80 test(agc): skip unsupported sampled color images 2026-10-20 20:39:55 +00:00
Dean 50e0624d7a Merge pull request #7154 from XairRrR/fix/agc-depth-plane-buffer-coherence
fix(agc): keep depth planes coherent with buffer reads and writes of their memory
2026-10-21 09:38:25 +13:00
Dean 2185dbf92e Merge pull request #5656 from Raghav314/perf/agc-data-hit-user-word-mask
perf(agc): data-only draw hits compare only the user words a stage reads
2026-10-21 08:32:28 +13:00
Dean b7596be595 Merge pull request #6658 from nicolasabosch/perf/gpu-wake-sleeps
perf(libkernel): end short sleeps when the GPU or a flip completes
2026-10-21 07:55:28 +13:00
Dean GalvinandZenodeon 779edd3b2d Merge main into stk-resource-performance-pr
Co-authored-by: Zenodeon <[email protected]>
2026-10-21 07:09:19 +13:00
Dean 2ea00aae40 Merge pull request #6436 from LeandroLP23/fix/agc-key-modules-by-gpl-mode
fix(agc): key shader modules by the pipeline library mode
2026-10-21 07:02:24 +13:00
Dean 2cdb06295c Merge pull request #6759 from Zenodeon/write-watch-page-restoration-main
fix(agc): restore write-watch coverage for remapped pages
2026-10-21 07:02:07 +13:00
Nicolas Abosch f857616caa Merge remote-tracking branch 'origin/main' into perf/gpu-wake-sleeps
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Execution/src/Driver/EntryPoints.cpp
#	core/libs/prx/libSceAgcDriver/Graphics/include/Recorder.hpp
2026-10-20 14:29:10 -03:00
Emanuele 1b81383137 perf(agc): probe the f32 denormal flush on MoltenVK
The startup probe that lets shaders use the device's f32 denormal flush
instead of the emulated one only ran on devices that declare
shaderDenormFlushToZeroFloat32 with independent denormal behavior.
MoltenVK declares neither flushing nor preserving f32 denormals, so every
shader kept the emulated flush on every f32 add, multiply, fma, min, max
and comparison.

On MoltenVK the probe now runs too. Since the device declares no
DenormFlushToZero capability there, a module compiled for the hardware
flush declares no DenormFlushToZero execution mode and relies on the
native behavior the probe measured; when any probe result differs from
the emulated flush, shaders keep the emulation as before. Devices that
declare the capability are unchanged.
2026-10-20 19:16:39 +02:00
LeandroLP23andClaude Opus 5.5 28ce7bc0b8 fix(agc): create every shader module through the pipeline-library cache key
Six vkCreateShaderModule calls added to main since this branch's base
still passed their SPIR-V unchanged, so on AMD's Windows driver they
shared on-disk cache entries across the two pipeline library modes:
splitComputePipeline's recompiled compute programs, the multisample
readback modules, the dispatch-arguments module, the texture repack
module and the two performance overlay modules.

Graphics::CreateShaderModule now keys the generator word and creates the
module in one place. Every module the driver creates goes through it,
including the recompiled graphics and compute programs that copied the
key inline, so new call sites can't skip it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-20 18:12:06 +02:00