Commit Graph
588 Commits
Author SHA1 Message Date
Dean 348157914f Merge pull request #6218 from harry-z-kang/codex/issue-6119-packed-storage
fix(agc): support packed 16-bit storage images
2026-10-23 22:44:30 +13:00
Dean 16319642a4 Merge pull request #6946 from Raghav314/perf/agc-draw-pipeline
perf(agc): draw finisher pipeline (APS5_DRAW_PIPELINE)
2026-10-23 18:24:48 +13:00
Dean a701f9f788 Merge pull request #6801 from JJenkx/feat/geometry-points-sized
feat(agc): rasterize geometry points with their point size
2026-10-23 14:38:10 +13:00
Dean Galvin 6990044dfb Merge main into feat/geometry-points-sized 2026-10-23 12:43:00 +13:00
Dean 775b50729c Merge pull request #9086 from xdCloudy/feat/agcdriver-evidenced-impls
feat(libSceAgcDriver): implement diagnostic fallbacks
2026-10-23 12:11:16 +13:00
raghav314andClaude Opus 5.5 c0dbd1871c perf(agc): draw finisher pipeline (APS5_DRAW_PIPELINE)
The second half of a pipelined draw (stage materialization, cache insert,
enqueue) runs on a finisher thread, overlapping the next draw's packet
work; draws whose stages could write memory are held back. Commits skip
work whose inputs did not change since the last commit, color metadata
passes are ordered through the pipeline, resource and storage-image proofs
are reused within one collect epoch until a write breaks them, and a shape
entry is refreshed in place at the second sight of the same read user words.
APS5_VERIFY_DRAW_PIPELINE checks reused proofs against a full check.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 03:46:57 +05:30
milescovielloandClaude Opus 5.5 36559da793 feat(agc): draw one-sample color targets beside a multisampled depth target with sample 0's coverage
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 19:58:10 +00:00
Dean a62feecd6c Merge pull request #7948 from Amoenus/codex/feat-native-owner-fmask
feat(agc): expose expanded FMASK for tracked native owners
2026-10-23 08:54:11 +13:00
Kang, Harry Zixuan f30acac3cf docs(agc): keep packed texture limitations with driver debt 2026-10-22 12:39:55 -07:00
Dean d6e7ab42df Merge pull request #6727 from simonbronk/fix/native-msaa-depth-unwritten-guest-access
fix(agc): retire an unwritten native multisample depth surface on guest access
2026-10-23 07:55:56 +13:00
xdCloudy 36a7a09dae feat(libSceAgcDriver): implement diagnostic fallbacks 2026-10-22 11:42:42 -07:00
xXPBSXxandClaude Sonnet 5.5 7e2cc7ec6b fix(agc): accept the standard component order for 11_11_10 float color targets
PPSA12361 binds color format 7 (COLOR_11_11_10, float) with COMP_SWAP 0
and stops on "unsupported color format 7 number type 7 component swap 0".
Only the reversed order (COMP_SWAP 2) was accepted.

The format keeps its 10-bit component in the low bits. The standard
swap puts red in the first slot, as Mesa pairs SWAP_STD with
COLOR_10_11_11 for R11G11B10_FLOAT, so COMP_SWAP 0 puts red there and
COMP_SWAP 2 blue. Swap 0 now decodes with the identity export mapping
0xe4 and the same packing; the other swaps still throw.

The decode test accepts swap 0 and keeps refusing swaps 1 and 3. The
execution test renders both orders into tiled and linear targets and
compares each stored word with the packing of the order. Its program
pool grows to fit the second pass. The debt entry names the accepted
orders and says the swap 0 layout is derived, not measured.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-22 19:46:23 +02:00
Adrià 0def01bcb5 Merge pull request #8538 from LeandroLP23/fix/recompiler-flat-p20-provoking
fix(recompiler): read P20 of a flat input as the provoking vertex
2026-10-22 19:26:58 +02:00
Dean 6a6a35fdf5 Merge pull request #7965 from frankea/ps5-measured-1340
fix(libs): values measured on a PS5 (firmware 13.40) from inside retail games
2026-10-23 06:18:10 +13:00
Dean e5c5329251 Merge pull request #8099 from LuisAguilarDev/fix/agc-stencil-clear-absent-plane
fix(agc): ignore a stencil clear on a target without a stencil plane
2026-10-23 05:43:36 +13:00
LeandroLP23andClaude Opus 5.5 1bf43f9b02 fix(recompiler): read P20 of a flat input as the provoking vertex
A FLAT_SHADE input without pass-through that a pixel shader reads
through v_interp_mov_f32 P20 and not P10 stayed an explicit per-vertex
input and read vertex 2 minus vertex 0. For a flat value that is the same
on every vertex the difference is 0, and with the first provoking vertex
nothing refused it.

ps5-opengl lowers every flat input to a load of one vertex: vertex 1
(P10) by default, which #4030 reads as the provoking vertex, and vertex 2
(P20) for triangles when GL's flatshade_first is set. SuperTuxKart's
deferred point lights are drawn that way, so all twelve flat inputs of
pointlight.frag read 0, the attenuation 0 * -inf was NaN, nothing was
discarded, and the starting-line referee's light quad blacked out the
scene behind it (#8364).

A P20-only read now returns the provoking vertex's value, as P10 and P0
do. The lane was not measured on the console either, so FragmentParameter
records it and a pipeline using the last provoking vertex throws. An input
read through both P10 and P20 keeps its per-vertex differences.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 18:37:47 +02:00
Dean 751b2881ae Merge pull request #8871 from thuanquang/fix/msaa-enable-clear-lines
fix(agc): draw line lists and strips into a multisampled target with MSAA_ENABLE clear
2026-10-23 05:20:48 +13:00
Romans Pokrovskis b8c6a94572 chore(agc): refresh PR 7948 on current main 2026-10-22 19:13:40 +03:00
Dean b7d1d47a5f Merge pull request #8083 from DavidSamir/feat/agc-barycentric-tessellation-strips
feat(agc): draw triangle strips through the barycentric tessellation stages
2026-10-23 03:22:55 +13:00
simonbronkandClaude Opus 5.5 bf0806ecd6 fix(agc): retire an unwritten native multisample depth surface on guest access
A guest read over the depth or HTILE range of a native multisample depth
surface threw even when the host had not written the surface since its
import. Its samples are then still the clear value the import took from
the guest HTILE, so the guest bytes already describe it. Retire such a
surface and its guards instead, and keep the refusal for a surface the
host wrote: draws with depth or stencil writes, depth/stencil copies and
storage write-back.

Onimusha: Way of the Sword (PPSA27836) imports a 4-sample D32 target,
draws into it once with depth tests only and no color target, then reads
the memory back as a structured buffer in a compute dispatch.

Unblocks PPSA27836.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 10:02:25 +02:00
Dean 865e06f1bc Merge pull request #7927 from whamre/feat/agc-depth-mips
feat(agc): render into depth mip levels
2026-10-22 19:09:06 +13:00
thuanquangandClaude 0efe28a839 fix(agc): draw line lists and strips into a multisampled target with MSAA_ENABLE clear
A line list or strip drawn with PA_SC_AA_CONFIG above 1x and
PA_SC_MODE_CNTL_0.MSAA_ENABLE clear threw, and METAL GEAR SOLID: Peace
Walker (PPSA18216) draws such lines into its 4x target. They now take
the path triangles already take in this state: the target's sample
count with every sample at the pixel center, or one sample under a
one-sample color target.

The refusal now reads the primitive the draw rasterizes
(RasterPrimitiveOf) instead of VGT_PRIMITIVE_TYPE: a point list that a
geometry program turns into triangles or lines is drawn as those, and
rasterized points and alpha-to-coverage still throw. No draw on main
rasterizes points in this state, because a vertex-path point list and
a geometry program's point output throw earlier; the point term takes
effect once they are drawable, as with #6801.

The new GPU test decodes a line list and a line strip into a 4x target
in this state with DecodeState, draws the decoded state, and requires
every pixel to be covered in all four samples or in none.

Co-Authored-By: Claude <[email protected]>
2026-10-22 10:48:35 +07:00
frankea 41d551eb60 Merge branch 'main' of https://github.com/boykopovar/AnyPS5 into ps5-measured-1340
# Conflicts:
#	core/libs/prx/libSceSystemService/Export.cpp
2026-10-21 17:37:31 -04: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
Adrià f0de89a506 Merge pull request #9026 from milescoviello/perf/depth-plane-unit-stores
perf(agc): store only the depth plane units a read overlaps
2026-10-21 21:29:26 +02:00
David 46e2b86d0b Merge remote-tracking branch 'origin/main' into feat/agc-barycentric-tessellation-strips
# Conflicts:
#	docs/dev/debt/libSceAgcDriver.md
2026-10-21 22:17:56 +04:00
Adrià FranchandClaude a3d739f170 docs(agc): record the all-past OOB_SELECT 1 throw and the gfx1010 measurement
Co-Authored-By: Claude <[email protected]>
2026-10-21 20:16:32 +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à d27d05ec14 Merge pull request #7883 from thuanquang/fix/strip-last-provoking-gs
fix(agc): draw triangle strips through a geometry program with the last provoking vertex
2026-10-21 20:10:30 +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
thuanquangandClaude 0bd8f6188a fix(agc): draw triangle strips through a geometry program with the last provoking vertex
An RX 6700 XT hands a geometry shader odd strip triangle i as
(i+1, i, i+2) with the last provoking vertex, which is the order the
translator already uses, and since #7374 last mode takes the flat
outputs of the program's primitives from their last index. Keep the
last-mode refusal for fans only, which reach the program as
(i+1, i+2, 0) while the hardware gives (0, i+1, i+2). TEKKEN DARK
RESURRECTION (PPSA31371) stops on such a strip draw.

Co-Authored-By: Claude <[email protected]>
2026-10-21 21:41:01 +07:00
Dean 2c4b116da9 Merge pull request #7729 from milescoviello/fix/one-sample-depth-iter
fix(agc): draw a PS_ITER_SAMPLE program once per pixel into a one-sample depth target
2026-10-22 03:14:54 +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
JJenkx 4f76eb75ce feat(agc): apply register and exported sizes to mesh points 2026-10-21 09:13:32 -04:00
milescovielloandClaude Opus 5.5 f71ead79e9 docs(agc): put the vertex point list entry's gaps first and shorten it
The entry was twice the 1000-character limit, led with the behaviour
rather than the gaps, and named a title. It now lists what throws and
what is inferred first, and names no title.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:13:32 -04:00
milescovielloandClaude Opus 5.5 f3433b0a11 fix(agc): keep the written point size above zero
Vulkan needs PointSize above zero. A PA_SU_POINT_SIZE of 0 without
USE_VTX_POINT_SIZE, and a PA_SU_POINT_MINMAX maximum of 0 with it, now
throw. With USE_VTX_POINT_SIZE the clamp's lower bound is at least the
smallest positive float, so an exported size of 0 or less, which a
clamp minimum of 0 lets through, is written as a positive value.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:13:31 -04:00
milescovielloandClaude Opus 5.5 e7ea490325 feat(agc): draw point lists on the vertex path with their point size
A point list routed through the vertex path was refused, and so was
PA_CL_VS_OUT_CNTL.USE_VTX_POINT_SIZE on it. OliSe Player (PPSA01153)
stops on the latter with two of its MilkDrop presets.

The vertex path now draws point lists as Vulkan points. The vertex stage
writes PointSize: the misc export's X clamped to PA_SU_POINT_MINMAX when
USE_VTX_POINT_SIZE is set, and the PA_SU_POINT_SIZE height otherwise.
The point state travels in the recompile request (version 31) and the
cache and draw keys. Non-square register sizes, inverted clamps, point
sprite texture coordinates and, without largePoints, sizes other than
one pixel throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 09:13:09 -04:00
Romans Pokrovskis b4fbf24d1e feat(agc): upload individual multisample image samples 2026-10-21 16:06:59 +03:00
Romans Pokrovskis b8297adab9 feat(agc): add fragment-preserving R_X and Z_X layouts 2026-10-21 16:06:32 +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 ce7d547175 Merge pull request #8856 from klosixgaming-arch/feat/agc-point-list-geometry-output
feat(agc): draw point-list output of NGG geometry programs as mesh points
2026-10-22 01:46:18 +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
David 6d8ff2d5b8 Merge branch 'main' into feat/agc-barycentric-tessellation-strips 2026-10-21 15:10:49 +04: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à 275e896797 Merge pull request #7696 from MaxLikesCode/feat/agc-set-index-indirect-args
feat(libSceAgc): implement sceAgcDcbSetIndexIndirectArgs
2026-10-21 12:52:39 +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
milescovielloandClaude Opus 5.5 f57bbc936a perf(agc): store only the depth plane units a flush overlaps
A read of memory inside a stale D32 Z_X depth plane (FlushDepthPlanes) stored
the whole plane: a copy of the depth image into the mirror, MarkWholeWritten
and a write-back of every byte. In Super Meat Boy 3D (#8840) a read-only
buffer ending about 3 KiB inside a stale 3840x2160 plane makes
ShaderResources::Revalidate flush ~1000 times per 5 s, each one moving
31.9 MiB, bound by transfer bandwidth.

A depth surface now tracks its plane as 64 KiB units, each one 128x128 tile
of the mirror's block units: a stale bit and a write generation per unit
replace memoryStale and the plane-wide syncedGeneration.

- FlushDepthPlanes stores only the stale units the range overlaps: the depth
  to mirror copy takes one region per unit rectangle (UnitRects, from the
  mirror's slice windows), the mirror marks just those units written
  (MarkUnitsWritten) and the write-back covers their hull. The other units
  stay stale and the plane stays registered. Stale bits are cleared only
  after the copy was recorded, and the stored units' generations advance
  only when FlushPending stored them. A depth fast clear still pending at
  the store rewrites the whole image, so it makes every unit stale first.
- SyncFromMemory copies from the mirror only the units the guest wrote since
  their own generation (one ChangedBlocks scan; untracked memory counts as
  unwritten, as WrittenSince did), so a guest write into one unit no longer
  replaces GPU depth that is still unstored in the others.
- Flushes followed by a retire keep the whole-plane store: the color target
  flush in Draw and a written storage view (DepthPlaneScope::Whole). The
  retire of an overwritten surface in DepthSurfaceTexture first stores its
  remaining stale units the guest did not write.
- A mirror without block units (APS5_NO_BLOCK_TRACKING, unaligned base)
  falls back to the whole-plane copy, and APS5_DEPTH_PLANE_WHOLE_STORE=1
  tracks the plane as one unit, the previous behaviour.
- DepthPlaneStoreCounts reports stores, units and bytes stored.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 10:03:00 +00: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