Commit Graph
14017 Commits
Author SHA1 Message Date
Dean 51cee90311 Merge pull request #7295 from ionut27001/fix/libkernel-pshared-private-only
fix(libkernel): reject PTHREAD_PROCESS_SHARED as the PS5 does and add the missing pshared accessors
2026-10-18 12:02:32 +13:00
Dean d42e3e79ff Merge pull request #7253 from milescoviello/fix/msaa-sample-swapped-format
fix(agc): sample a multisampled target whose format differs only in red/blue order
2026-10-18 12:02:25 +13:00
CleverdeeandClaude Opus 5.5 1ee2c1c510 fix(recompiler): fold chained immediate addends of image-table record offsets
SplitImmediateAddend peeled a single immediate operand off a T# dword's
scalar offset. A title that loads a 32-byte record with two
s_load_dwordx4, the second at soffset (first soffset + 16) where the
first is (key << 5) + C, left IAdd32(key << 5, C) as the base of dwords
4-7, which never matched dword 0's base, and the image failed with
"GetImageResource dword 0 is not a valid runtime value".

Peel immediate IAdd32 operands until none is left and sum them modulo
2^32, as the scalar adds do. The chained offsets then reach the existing
folded-addend path. verifyChainedTableOffset is the pointer table offset
carry shader with the second offset chained off the first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 04:02:02 +05:00
Adrià 3cc1fc8f11 Merge pull request #7314 from adriadam10/fix/main-conventions-shards
fix(main): split conventions comment checks into 12 shards
2026-10-18 01:01:33 +02:00
Adrià Franch a49b8cce69 fix(main): split conventions comment checks into 12 shards
Failing run 39076267931 (push 55f82fee83): windows conventions_function_bodies_shard_4 hit the 30 s CTest timeout (others 15-26 s on the loaded runner). No culprit merge; shard cost sits near the limit since 541a4e705 (6 shards). Doubling the shard count halves each test's runtime.
2026-10-18 01:01:23 +02:00
Yunus Shaikh 9dcf408034 test(agc): expect a per-lane table image store to be supported
Main's #6402 runs image stores through an image table, so a T# keyed
per lane keeps its table with a supported image_store and an
unsupported mark for the other operations.
2026-10-17 15:59:06 -07:00
Yunus Shaikh 4cb0512329 Merge main into perf/shader-direct-cpu-evaluable-images
Main's #7101 reads a key buffer's words in one call where this branch
names the reason a narrowing is skipped. Keep main's bulk read and
count both of its unmapped-page skips as unmapped.
2026-10-17 15:58:42 -07:00
Yunus Shaikh 2a3946dbb0 Merge main into feat/videoout-performance-overlay
Main adds StorageTextureCacheBudget where this branch adds the public
LargestDeviceLocalHeap wrapper, in both the header and the source.
Keep both.
2026-10-17 15:57:45 -07:00
JJenkx 6326d05f02 fix(agc): inherit pending plane fills on fresh attachments 2026-10-17 18:54:24 -04:00
JJenkx 95670d0104 test(agc): allocate full tiled depth fixture footprints 2026-10-17 18:54:24 -04:00
JJenkx 1dca268754 test(agc): check both planes after stencil inheritance 2026-10-17 18:54:24 -04:00
JJenkx 3770d55011 fix(agc): preserve fresh HTILE depth and stencil clears 2026-10-17 18:54:23 -04:00
Romans Pokrovskis d6ad5b7f94 test(agc): allow native depth fixture command buffer resets 2026-10-17 22:50:30 +00:00
David cb72777843 docs: record the last provoking vertex on the barycentric tessellation route 2026-10-18 02:46:54 +04:00
David 44b13e6501 test(agc): check flat inputs with the first and last provoking vertex through tessellation 2026-10-18 02:46:53 +04:00
David 3b51986ccf feat(agc): draw the last provoking vertex through the barycentric tessellation stages
The generated evaluation stage writes the provoking vertex's flat values
at every corner of the patch, so the host's provoking vertex no longer
changes what the pixel shader reads and VK_EXT_provoking_vertex is not
needed for these draws.
2026-10-18 02:46:53 +04:00
David ac8e3c1ecc feat(shader): take flat values from the provoking vertex in the barycentric tessellation stages 2026-10-18 02:46:53 +04:00
HQasperandClaude Opus 5.5 6d4c7c3150 fix(libkernel): select on kqueues as kqueue_poll answers
A kqueue descriptor is readable while one of its events is triggered and
is never writable or exceptional, as FreeBSD's kqueue_poll answers, on
both hosts. On Windows select threw for it, and on Linux its /dev/null
placeholder was reported readable and writable.

A descriptor that stops being a socket, a kqueue or a pipe during the
wait now fails the call with EBADF when it was closed and is selected
again with the rest of the timeout when its number was reused, as
FreeBSD's kern_select looks every descriptor up again in each pass,
instead of throwing. On Windows a host descriptor that is not a pipe
throws when select starts, before waiting.

Depends on #7139.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 00:45:57 +02:00
Alexej Szpevák 74629458d3 feat(libkernel): poll descriptors 0 to 2 with the console model select uses
select takes descriptors 0 to 2 as a console title's terminal with no input: 0 is never readable and 1 and 2 are always writable. poll threw for them unless the host happened to attach a pipe, so the same title could select on its standard streams but not poll them. poll now gives the same answer, with POLLOUT, the one bit ttydev_poll reports for a writable terminal, for 1 and 2 and nothing for 0.
2026-10-18 00:45:56 +02:00
Alexej Szpevák aabd0e77aa fix(libkernel): answer select on files and the random device as FreeBSD's poll routines do
selscan asks a descriptor once, with the flags of every set it is in (POLLRDNORM for the read set, POLLWRNORM for the write set, POLLRDBAND for the exception set, plus POLLHUP and POLLERR), and marks each set whose flags the answer shares. A seeded random device's randomdev_poll narrows a request with POLLRDNORM to that bit and returns any other request whole, so in the read set it is readable and in no other set, and otherwise it is in each write and exception set it was asked in; select reported it readable and writable together and never exceptional. A regular file or directory went to the host poll, which on Windows threw; vop_stdpoll makes it readable and writable and never exceptional, which select now answers in process on every host, as poll does.
2026-10-18 00:45:55 +02:00
Alexej Szpevák d0c338561a feat(libkernel): poll the random device as randomdev_poll does
poll threw for /dev/random and /dev/urandom, which select already treats as ready. FreeBSD 11.4's randomdev_poll, once the device is seeded, narrows a request that has POLLIN or POLLRDNORM to those bits and returns any other request whole, POLLOUT and the band bits included. poll now answers that, and the test that relied on the random device throwing uses a kqueue descriptor, which poll still does not support.
2026-10-18 00:45:54 +02:00
Alexej Szpevák 7e26c1a4ea feat(libkernel): poll regular files and directories as vop_stdpoll does
poll threw for any descriptor that is neither a socket nor a pipe, so a title polling a file it also reads stopped there. FreeBSD 11.4 hands a vnode to VOP_POLL, and both vop_stdpoll and vop_nopoll return POLLIN, POLLRDNORM and POLLOUT of the requested events for every event poll accepts and never POLLPRI, POLLRDBAND or POLLWRBAND. A file, a directory or a file read from app0.zar now answers that without a host call. File::IsVnode tells such a descriptor apart from the host file type without throwing, so a host socket lent by libSceNet still reaches its own path.
2026-10-18 00:45:27 +02:00
Dean Galvin 0f0ae07084 ci(intake): let a maintainer reopen bypass the open-PR limit
The intake workflow re-closes a reopened PR whose author is still over the
open-PR limit, so a maintainer cannot rescue PRs it auto-closed. When the
reopening actor has write, maintain or admin permission, skip the limit and
remove the "open PR limit" label instead. Contributor reopens behave as
before, and if the permission lookup fails the limit still applies.
2026-10-18 11:45:21 +13:00
Dean 55f82fee83 Merge pull request #7044 from AlxcBTW/pr/dispatch-move
perf(agc): serve compute dispatches whose read-only buffers moved from the cached template
2026-10-18 11:44:09 +13:00
Morten HolmandClaude Sonnet 5.5 cf9e5a2567 test(relinker): keep an FS or GS access out of the window of a 256-bit store
Covers a thread-pointer read (FS and GS form) after the store with a movable
instruction before it, and the fallback to the following access when there is
no other neighbour.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-18 00:40:41 +02:00
Morten HolmandClaude Sonnet 5.5 513b2e181b fix(relinker): move a neighbour without an FS or GS prefix with a 256-bit store first
A 256-bit store is 4 bytes, so its stub window takes a neighbouring
instruction to make room for the jump. The window took the following
instruction first even when it was a guest TLS access (an FS or GS prefix).
The macOS writer cannot rewrite a TLS access inside a stub and refuses the
module with "AMD-only instruction is also a guest TLS access".

The window now tries the following and the preceding instruction without a
segment prefix first, and falls back to the old order only when neither
works, so outputs that can keep the access in the stub do not change.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-18 00:40:41 +02:00
David a968198710 Merge remote-tracking branch 'origin/main' into feat/shader-barycentric-tessellation
# Conflicts:
#	core/libs/prx/libSceAgcDriver/Graphics/src/Pipeline.cpp
#	docs/dev/debt/shader.md
2026-10-18 02:30:39 +04:00
jagrat Singh 7f1e12a4e1 feat(libSceProprietaryVoiceChatHelperPrx): export sceProprietaryVoiceChatHelperGetVoiceChat 2026-10-18 03:54:32 +05:30
hugodearaujo 12813101d2 fix(ampr): return EBUSY when a command does not fit and EPERM before a buffer is bound 2026-10-17 19:23:26 -03:00
Romans Pokrovskis b2d9880700 feat(agc): support thick 4 KiB standard XOR volumes 2026-10-18 01:22:36 +03:00
Dean b4f05ab328 Merge pull request #6631 from AlxcBTW/perf/dcc-key-presync
perf(agc): pre-sync the DCC key writers of a dispatch's images before the GPU mutex
2026-10-18 11:18:56 +13:00
Dean 0381ac76d1 Merge pull request #6632 from AlxcBTW/perf/handoff-spin
perf(agc): spin before blocking on the GPU mutex and the draw committer hand-offs
2026-10-18 11:18:40 +13:00
Dean 2a1aa7e84e Merge pull request #7231 from ErenYeager1836/feat/voiceqos-set-remote-endpoint-attribute
feat(libSceVoiceQoS): implement sceVoiceQoSSetRemoteEndpointAttribute
2026-10-18 11:18:34 +13:00
Dean e67bb9f034 Merge pull request #7274 from MarcZX100/codex/diagnose-mipmapped-3d-color-refusal-7260
chore(agc): report unsupported 3D mip target state
2026-10-18 11:18:29 +13:00
Dean fbb76ae3e6 Merge pull request #7095 from milescoviello/feat/sysarch-gsbase
feat(libkernel): read and set the GS base through sysarch
2026-10-18 11:18:15 +13:00
Dean b8be974b14 Merge pull request #7057 from Ondra97/codex/fix-device-buffer-bind-failure
fix(agc): discard device buffers after memory binding fails
2026-10-18 11:18:09 +13:00
David 91d5f577ea docs(shader): record the tessellation route of the barycentric emulation 2026-10-18 02:17:01 +04:00
David 48b7d3a34d test(agc): cover the tessellation route of the barycentric emulation 2026-10-18 02:16:51 +04:00
David 03f4f6718e feat(agc): emulate barycentrics through tessellation without geometry shaders
A triangle list without primitive restart whose pixel shader emulates
barycentrics draws through the generated tessellation stages when the
device has tessellation but no geometry shaders, as on MoltenVK. The
pipeline uses a three-point patch list for it, keeps it out of pipeline
libraries and validates the generated stages' modes and interface.
2026-10-18 02:16:51 +04:00
David 02a4bdf08a feat(shader): build the barycentric emulation stages from tessellation
On a device without geometry shaders, each triangle becomes a three-point
patch at tessellation level 1. The evaluation stage takes the corner
gl_TessCoord points at as its vertex and writes it as the weights, and
passes every vertex's parameters for raw reads. The vertex clip distances
are forwarded, so MoltenVK's stage interface matches the vertex output.
2026-10-18 02:16:51 +04:00
David f4b3f03580 refactor(shader): gather the emulated barycentric interface in one place 2026-10-18 02:16:42 +04:00
ivica00 64e6b3fe3c Merge remote-tracking branch 'upstream/main' into fix/rect-list-tess-coord-rounding
Co-authored-by: Cursor <[email protected]>

# Conflicts:
#	core/libs/prx/libSceAgcDriver/CMakeLists.txt
2026-10-18 00:14:02 +02:00
ivica00andCursor bf47f840ef fix(agc): keep pipelined DMA opt-in and order copies against queued writes
Co-authored-by: Cursor <[email protected]>
2026-10-18 00:14:02 +02:00
Dean b51c65dd11 Merge pull request #7263 from thuanquang/fix/buffer-atomic-misaligned-base
fix(shader): run buffer atomics through a V# off a DWORD boundary
2026-10-18 11:02:26 +13:00
Dean b928e6e99d Merge pull request #7184 from EagleBearerYS/perf/agc-address-read-passes
perf(agc): let a draw that only reads through the BDA table continue its render pass
2026-10-18 11:02:09 +13:00
Dean b39e85847e Merge pull request #7101 from XairRrR/perf/recompiler-bulk-table-key-scan
perf(recompiler): scan image-table key buffers in bulk
2026-10-18 11:01:48 +13:00
Romans Pokrovskis cace5dcb61 chore(agc): update sampled MSAA geometry onto current main 2026-10-18 01:00:42 +03:00
oskarlgsandClaude Opus 5.5 aed1ffbae8 fix(relinker): keep the Windows TLS rewrite from moving truncated branches
A short TLS access followed by a near branch with an operand-size prefix
decided the branch was relative from its flow kind and opcode alone, then
re-encoded it to the fall-through address or wrote its rel32 over the prefix
and opcode. Such a branch now counts as one that cannot move.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_016TFMtUC4L4wMS4eeEqaNSR
2026-10-17 21:55:21 +00:00
milescovielloandClaude Opus 5.5 7c4bc9a0ba test(agc): draw exact UNORM8 codes into the swapped multisampled target
The case drew 0.5 green, which lies halfway between two UNORM8 codes, so a
device that rounds 127.5 up (llvmpipe, LLVM 20.1.2) failed the half-code
tolerance with red and blue correctly swapped. It now draws 64, 128 and 32
of 255 from its own pixel program and names the loaded and expected codes
when a sample differs.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-17 21:54:08 +00:00
ionut27001andClaude Opus 5.5 c00c58ae34 fix(libkernel): reject PTHREAD_PROCESS_SHARED in pthread_condattr_setpshared and add pthread_condattr_getpshared
On a PS5 (firmware 12.70), of the values 0, 1, 2 and -1,
pthread_condattr_setpshared accepts only 0 and leaves the attribute
unchanged otherwise. pthread_condattr_getpshared reports 0 and returns
EINVAL for a null, uninitialized or destroyed attribute, also with a
null output. With an initialized attribute a null output crashes the
console; here it throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 00:50:09 +03:00