Commit Graph
546 Commits
Author SHA1 Message Date
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
Dean 3fda339541 Merge pull request #7169 from Ondra97/codex/fix-command-batch-fence-failure
fix(agc): ignore failed fence creation outputs
2026-10-19 16:52:12 +13: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
Dean Galvin 41764f27ac Merge main into pr-4650
# Conflicts:
#	core/shader/recompiler/ShaderDiskCache.cpp
2026-10-19 15:36:07 +13: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 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
Adrià 23629c2847 Merge pull request #6454 from EagleBearerYS/perf/shader-image-table-reuse-v3-pr
perf(agc): share one image table per heap and write epoch through capture, compare, resolution and descriptors
2026-10-19 03:39:03 +02:00
Adrià 72b0ab3e8e Merge pull request #6312 from meh7an/perf/agc-cut-draw-allocations
perf(agc): cut per-draw heap allocations
2026-10-19 03:38:58 +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
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
Mehran 9d6279ccfa perf(agc): cut per-draw heap allocations 2026-10-19 02:39:16 +02:00
Yunus Shaikh 106b79e007 Merge main into perf/shader-image-table-reuse-v3-pr
The data-hit verification keeps this branch's pending-span query on its ShaderMemory and takes #5958's CaptureInvocation, which retries a capture with converted samples.
2026-10-18 17:04:23 -07:00
Yunus Shaikh 10b798fb99 Merge main into perf/shader-image-table-reuse-v3-pr
Keeps this branch's tagVariantRuns declaration next to main's dumpRequest suffix parameter in Driver.hpp, and reads #6232's pointer-chain test words from its table's snapshot, where this branch keeps them.
2026-10-18 17:03:39 -07: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
Adrià 58242e7bcb Merge pull request #6320 from fdfawef324/codex/copy-transfer-budget-current-1015
fix(agc): count transient copy buffers toward the recorder budget
2026-10-19 01:24:48 +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
fdfawef324andCodex ea02128b5b fix(agc): count transient copy buffers toward the recorder budget
Charge read-only GPU-copy input snapshots and depth-copy linear scratch for their requested bytes while the batch retains them. Exercise both production paths with CPU Vulkan mocks, including the budget boundary and fence-governed resource retention.

Co-Authored-By: Codex <noreply@openai.com>
2026-10-18 18:21:23 -04: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à 3f16b82132 Merge pull request #6297 from Gashrod1/fix/agc-undrawn-msaa-z-footprint
fix(agc): sample undrawn multisampled Z and D 64 KiB swizzle textures, and Z ones whose HTILE is cleared
2026-10-18 23:55:01 +02:00
Adrià 946e9d936b Merge pull request #6212 from milescoviello/fix/agc-inverted-scissor
fix(agc): treat an inverted scissor rectangle as empty
2026-10-18 23:26:54 +02:00
m.peau 69afb0569f fix(agc): sample undrawn multisampled Z and D 64 KiB swizzle textures, and Z ones whose HTILE is cleared 2026-10-18 22:44:13 +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 d0325058f7 Merge main into perf/shader-image-table-reuse-v3-pr
#7527's selected-record limit test reads a record's descriptor words through the
table snapshot's shared words list; this branch keeps a snapshot's words per column,
so the test reads them from its column instead.
2026-10-18 11:33:00 -07:00
Yunus Shaikh dc47a81b02 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-18 11:30:31 -07:00
Maz bb39eba819 fix(agc): decode COLOR_8_8 UINT as R8G8_UINT 2026-10-18 18:17:52 +02:00
Adrià 9b6837704f Merge pull request #6014 from SandstromPL/fix/agc-msaa-enable-clear-depth-target
fix(agc): rasterize a multisampled depth target without MSAA_ENABLE at the pixel center
2026-10-18 17:26:06 +02:00
Dean f834e249c4 Merge pull request #6129 from fdfawef324/claude/agc-tessellation-refusal-fields
fix(agc): print the VGT_TF_PARAM and VGT_LS_HS_CONFIG fields of a refused tessellation draw
2026-10-19 02:54:51 +13:00
Yunus Shaikh 54f2cf31b1 Merge main into perf/shader-image-table-reuse-v3-pr 2026-10-18 05:06:50 -07:00
Dean 0d078f75d3 Merge pull request #7089 from pushkarreddyy/fix/agc-driver-buffer-descriptor-reserved-bit
fix(libSceAgcDriver): normalize reserved bit 30 in guest buffer descriptors
2026-10-19 00:51:55 +13:00
Dean 3e3e8b9050 Merge pull request #7374 from thuanquang/fix/mesh-last-provoking-vertex
fix(agc): draw geometry programs with the last provoking vertex
2026-10-19 00:13:37 +13:00
Dean 721f29c7e1 Merge pull request #7487 from DavidSamir/fix/shader-barycentric-tessellation-clip-moltenvk
fix(shader): keep clip distances in the blocks between the barycentric tessellation stages
2026-10-19 00:13:33 +13:00
pushkarreddyy c3c400a6f8 fix(libSceAgcDriver): normalize reserved bit 30 in guest buffer descriptors 2026-10-18 16:38:59 +05:30
Dean Galvin b876d43fb1 fix(agc): journal whether a vertex shader reads the depth remap push words
The flag that adds the vertex stage to the push constant stages was not part
of the encoded result, so a journalled remapped vertex shader replayed
without it. Encode and decode it with the invocation and cover it in the
result round trip and the push stage test.
2026-10-18 23:28:51 +13:00
pushkarreddyy f07df07969 feat(libSceAgcDriver): support polygon primitive type 21 2026-10-18 15:56:57 +05:30
Yunus Shaikh dad24e3a4f Merge main into perf/shader-image-table-reuse-v3-pr 2026-10-18 02:56:48 -07:00
David f982c1c5bd test(agc): check where the barycentric tessellation stages keep clip distances 2026-10-18 13:08:53 +04:00
Dean 80249ea54e Merge pull request #7330 from MarcZX100/codex/fix-barycentric-interface-7328
fix(shader): match barycentric tessellation clip interfaces
2026-10-18 18:51:47 +13:00
Yunus Shaikh db622e1c4f Merge main into perf/shader-image-table-reuse-v3-pr 2026-10-17 21:26:16 -07:00
thuanquangandClaude Opus 5.5 8f03282f5e fix(agc): draw geometry programs with the last provoking vertex
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 10:07:02 +07:00
pushkarreddyy 991df771fc feat(libSceAgcDriver): support CMASK fast clears on base mip 0 of mipmapped 2D targets 2026-10-18 08:06:35 +05:30
Yunus Shaikh 6720211da1 Merge main into perf/shader-image-table-reuse-v3-pr 2026-10-17 19:24:20 -07:00
Yunus Shaikh 2848253fe4 Merge main into fix/recompiler-once-per-pixel-sample-inputs 2026-10-17 19:06:51 -07:00
NikoandClaude Opus 5.5 a3067a04d4 fix(agc): clamp a remapped depth at narrower bounds instead of rescaling it
ApplyDepthRemap gives the Vulkan viewport the console's clamp bounds
clipped to [0, 1]. A zero-to-one viewport maps the shader's z/w linearly
onto [minDepth, maxDepth], so with bounds narrower than [0, 1] the remap
rescaled the depth into them instead of clamping it there; only bounds
of [0, 1] or wider (Minecraft's [-1, 1]) came out right. Scale and offset
are now divided by the clamp range and the offset moved by its minimum,
so the viewport and the depth clamp together give scale * z/w + offset
clamped to the bounds.

agc_driver_depth_range_remap_draw draws through the remap path and,
when the device has VK_EXT_depth_range_unrestricted, through the
unrestricted path, then checks the stored depth with probe draws and
that the two clip distances cut at the near and far planes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 14:27:48 +13:00
Mouad-Scriptz-0andClaude Fable 5.1 53212b18ac feat(agc): remap a viewport depth range the device cannot express into the vertex shader
Without VK_EXT_depth_range_unrestricted a viewport depth range outside
[0, 1] threw. Minecraft (PPSA17221) draws its world with scale 1 and
offset 0 in negative-one-to-one clip space, so its depth is the raw z/w
clamped by PA_SC_VPORT_ZMIN/ZMAX. On such a device the vertex shader now
scales clip z so z/w is the console's depth, the pipeline clamps depth at
the console's bounds, and two clip distances restore the near and far
planes that depth clamping removes. Mode, scale and offset travel as
pipeline specialization constants from the draw's vertex stage info, in
both the per-draw and the registration-module path; mesh and tessellation
draws with such a range still throw.

The console's depth clamp bounds are clipped to [0, 1]: exact for a
normalized depth target or none, and reported once for a tested or
written float depth target, where a depth below 0 is stored as 0
(Minecraft clamps its float depth target to [-1, 1]). The shader
validator accepts the remap's two extra clip distances next to the one
a program may already export.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-18 14:27:48 +13:00
Yunus Shaikh 49788713ac Merge #6243's head into perf/shader-image-table-reuse-v3-pr
#6243's new head merges main f1af6c5915, whose #7325 adds
verifyChainedTableOffset next to the selected-record tests this
branch carries from #6243. That test reads the record words from the
snapshot's shared word list; this branch keeps the words with each
table's snapshot, so the merge reads them from the table it checks.
2026-10-17 17:57:47 -07:00
milescovielloandClaude Opus 5.5 6c47f92b52 fix(shader): pass clip distances through the rect-list stages as the vertex shader writes them
The recompiled vertex shader writes gl_ClipDistance through a variable of
its own beside its position block, but the rect-list control and
evaluation stages read and wrote it as a second member of their
per-vertex block, so the stage interfaces did not match
(VUID-RuntimeSpirv-OpVariable-08746). They now take and forward the clip
distances through ClipDistance variables of their own.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-18 00:43:33 +00:00
MarcZX100 06379ceac7 fix(shader): match barycentric tessellation clip interfaces 2026-10-18 00:37:36 +00:00
Yunus Shaikh ddf072e6f3 Merge main into fix/recompiler-once-per-pixel-sample-inputs
Main's EmitSetAttribute debt entry now says the generated rect-list and
barycentric tessellation stages forward the vertex shader's clip array.
It sits next to this branch's PERSP_SAMPLE and pixel position entries,
which main left as they were; keep main's entry and this branch's two.
2026-10-17 17:03:27 -07:00