Commit Graph
14017 Commits
Author SHA1 Message Date
milescovielloandClaude Opus 5.5 193c540162 fix(shader): point-filter direct samplers paired with unsigned integer images
A direct sampled image of the unsigned integer class kept its sampler's
linear filter, while signed integer, converted and depth views got the
point-filtered copy. Vulkan formats like R32_UINT have no linear filter
support, so the sample was undefined (NVIDIA returned the point sample,
lavapipe did not) and the validation layer reported
VUID-vkCmdDispatch-magFilter-04553 for agc_driver_image_table. Unsigned
integer images now get the point-filtered copy too, as image table entries
already do.

Fixes #7699

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:22:37 +00:00
Dean 017f2151ca Merge pull request #6126 from fdfawef324/claude/json2-value-handlers
feat(libSceJson2): implement Value::setTypeMismatchHandler and store the element access failure and special float handlers
2026-10-19 14:21:53 +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à 876bd17af8 Merge pull request #6386 from JJenkx/fix/trace-digest-wait-subscopes-upstream
fix(tools): classify wait subscopes in trace digests
2026-10-19 03:17:30 +02:00
Adrià 0cc1cfa1cd Merge pull request #6449 from Izamaru/fix/apr-windows-read-staging
fix(libkernel): stage Windows APR reads through host memory
2026-10-19 03:17:25 +02:00
milescovielloandClaude Opus 5.5 79874b9c6d test(agc): give each failed-capture dump run its own folder
Two copies of agc_driver_failed_capture_dump that ran at once shared
temp_directory_path()/agc_failed_capture_dump, and one removed the
folder while the other was writing its captures there. The folder name
now carries a std::random_device value, as the pipeline journal test's
does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:09:23 +00:00
milescovielloandClaude Opus 5.5 2ab8deac1d fix(agc): dump a failing shader capture's own request
With APS5_DUMP_SHADERS, a dispatch or draw stage that failed named
shader_<address>.req, which is written once per address by the first call
that captures the shader: a later call's failure pointed at an earlier
call's user data and memory, and a failing capture's memory was never in
the dump. A failure now writes shader_<address>_failed.req with the failing
call's request and the memory its capture read, and names that file.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:09:23 +00:00
milescovielloandClaude Opus 5.5 7092dde6ee fix(shader): emit nothing for a vertex s_barrier that precedes every memory access
A vertex-path program with LDS, GDS or memory writes refused any s_barrier. NGG passthrough
programs start with the s_barrier that orders GS_ALLOC_REQ, before any memory access, and some
write buffers later. A barrier that runs before every load, store, atomic, image or LDS access of
the program has nothing to order, so it emits no instruction, like the barrier of a program
without memory access. Barriers after a memory access still throw.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 01:07:58 +00:00
JJenkx 992f4a2d4e test(videoout): keep live EOP tokens in NOP payload after a type2 filler 2026-10-18 21:07:33 -04:00
thibautandClaude Opus 5.5 96bacb7eb8 perf(shader): convert one f16 value instead of an (x, 0.0) pair
ConvertF16F32 built an (x, 0.0) f32 pair and packed it, and unary f16 results
(v_rcp_f16, v_sqrt_f16, ...) were packed with a 0.0 high half: the constant half
went through the whole f32-to-f16 conversion each time, which without native
f16 is a bit-level rounding sequence. Both now convert the one value; the high
half of the bits is zero as before, so the results are the same.

Test: agc_f16_single_convert recompiles four v_rcp_f16 with and without native
f16 and requires no (x, 0.0) f32 pair; on main each case emits four.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01XBXM4pgkMHYEtqN1EQni2P
2026-10-19 03:07:05 +02:00
milescovielloandClaude Opus 5.5 98600b489f fix(agc): free retired depth surfaces nobody samples
A depth surface stayed in the list until its device went, even after another
writer retired it. A title whose depth targets move or change extent (dynamic
resolution, a transient heap) adds one surface per new target and never frees
the old ones. Creating a surface now frees the retired single-sample ones whose
sampled views no one else holds, through the recorder so recorded work that
still uses them completes first. Framebuffers cached with a depth attachment are
dropped after a release, since a freed view's handle can be reused.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 03:06:24 +02:00
Adrià 0c25997a5a Merge pull request #6423 from Gashrod1/fix/agc-native-depth-first-refusal
fix(agc): keep the first native multisample depth sampling refusal
2026-10-19 03:05:40 +02:00
valenciana-nc 767ea1ea0f fix(libkernel): check the AIO Multiple batch limit before reading the requests 2026-10-18 19:04:54 -06:00
valenciana-nc 1a200a1e14 test(libkernel_sys): read accepted symlink targets back through readlink and remove them 2026-10-18 19:04:07 -06:00
Adrià 134a3510c8 Merge pull request #6419 from DavidSamir/fix/relinker-macos-tls-alu-reads
fix(relinker): rewrite ALU reads of guest TLS through %fs in macOS output
2026-10-19 03:02:09 +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
Nixitov ce8f32854a feat(libkernel): declare physhm_open and physhm_unlink 2026-10-19 03:00:55 +02:00
Adrià 819c5477b9 Merge pull request #6466 from whamre/fix/windows-sparse-load-image
fix(relinker): keep unmapped gaps out of the Windows load image
2026-10-19 03:00:53 +02:00
valenciana-nc 950eeb847d fix(libkernel): keep the getdirentries base guard open through its write and check the descriptor first 2026-10-18 19:00:40 -06:00
JJenkx 3018bc659f fix(agc): order raw shader reads after queued code writes 2026-10-18 20:57:47 -04:00
Adrià 7b12450b8f Merge pull request #6357 from MarcZX10/codex/relinker-relative-defined-symbol-3093
fix(relinker): accept matching defined relative symbols
2026-10-19 02:56:49 +02:00
Adrià 42d8666f29 Merge pull request #6458 from DavidSamir/fix/relinker-trap-macos-guest-gs
fix(relinker): trap guest GS accesses in macOS output instead of refusing the module
2026-10-19 02:56:44 +02:00
MaxandClaude Opus 5.5 5140b08d82 feat(libSceAgc): implement sceAgcDcbSetIndexIndirectArgs
Write the INDEX_ATTRIBUTES_INDIRECT packet the console's builder writes,
as measured by the prosper console oracle, with OpenAGC's signature, and
report its measured size of 16 bytes.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-19 02:53:01 +02:00
Adrià ad502d7170 Merge pull request #6341 from JJenkx/fix/draw-committer-trace
fix(agc): include draw committer work in CPU traces
2026-10-19 02:52:31 +02:00
Izamaru f7953ecac3 fix(libkernel): stage Windows APR reads through host memory
Copy bounded host reads into the destination in user mode so demand-committed pages can be handled by the process. Preserve short-read validation, zero-fill at EOF and HostWrite protection checks. Add synthetic read and Windows page-fault regressions. AI-assisted: yes.
2026-10-19 02:52:01 +02:00
JJenkx 97a8f1c7c9 fix(tools): classify wait subscopes in trace digests 2026-10-18 20:51:26 -04:00
JJenkx 72959f7c00 test(shader): compare sRGB loads at encoded texel precision 2026-10-18 20:46:43 -04:00
JJenkx 5daee96f35 fix(shader): read 2D textures through MSAA image loads 2026-10-18 20:46:43 -04:00
m.peau 635447572d fix(agc): keep the first native multisample depth sampling refusal
A native multisample depth surface refused when it is created (for example
because its range is not watched) had that reason replaced by any later
transition: a fast clear, an HTILE clear or a metadata fill. The sample
then reported the last transition instead of the cause that blocks it.
The first refusal now stays.

AI-assisted: yes
2026-10-19 02:45:32 +02:00
JJenkx e5e603d161 test(agc): cover incomplete GPU timing batch completion 2026-10-18 20:44:28 -04:00
Jota 3fdbecfe2e fix(tests): keep the async log test's aborting children away from the crash handler
agc_async_log_fatal starts four children that end in SIGABRT on purpose and requires each to end within 6 s. Setting RLIMIT_CORE to 0 does not stop the kernel from starting a pipe core handler such as apport or systemd-coredump, and the child is not reaped until that handler exits: about 1.1 s per child on an Ubuntu host with apport, and over 6 s when several crashes queue on the handler. Mark the children non-dumpable on Linux, as #6589 did for guest_host_standard_error and exception_runtime.
2026-10-19 00:42:45 +00:00
Adrià 659230f7b6 Merge pull request #6367 from Zenodeon/stk-rendering-correctness
fix(agc): preserve registered array slices on CPU write-back
2026-10-19 02:41:14 +02:00
Adrià bebc294607 Merge pull request #6443 from EagleBearerYS/fix/libkernel-host-stack-guard-page
fix(libkernel): keep a protected host stack's guard page, and protect the Linux main stack
2026-10-19 02:41:09 +02:00
Adrià f4e60cfde6 Merge pull request #6438 from JJenkx/fix/initial-htile-depth-clear
fix(agc): preserve fresh HTILE depth and stencil clears
2026-10-19 02:41:04 +02:00
Adrià c176007f5c Merge pull request #6422 from Amoenus/codex/test-vcc-sampler-runtime-main940
test(agc): execute MIMG sampler tuples ending in VCC
2026-10-19 02:40:59 +02:00
Adrià d265c58e40 Merge pull request #6351 from thuanquang/fix/layout-relative-output
fix(relinker): list converted modules correctly for a relative output path
2026-10-19 02:40:55 +02:00
Adrià d5c854dd9b Merge pull request #6339 from hypermoist/feat/libc-std-vector-algorithms
feat(libc): implement the __std vectorized algorithm helpers
2026-10-19 02:40:50 +02:00
Adrià 347c0a7934 Merge pull request #6420 from JJenkx/feat/kernel-error-conversion-upstream
feat(libkernel): convert guest POSIX error values
2026-10-19 02:40:46 +02:00
Adrià 80b2fc9212 Merge pull request #6417 from UnhealthyKraken/fix/invariant-image-table-phis
fix(shader): plan image tables through invariant descriptor phis
2026-10-19 02:40:40 +02:00
Hannah Lyons 15649b702f feat(libkernel_sys): implement fstatat 2026-10-18 20:39:35 -04:00
Adrià Franch 941b1588e9 test(agc): keep the split-set test's moved words alive for the span 2026-10-19 02:39:24 +02:00
Mehran 9d6279ccfa perf(agc): cut per-draw heap allocations 2026-10-19 02:39:16 +02:00
NevesHenryandClaude Opus 5.5 3fe7ba01c3 fix(libkernel): report ENAMETOOLONG and ELOOP from open, unlink and stat
Open.cpp passed host errno values 1 to 34 through and turned every
other one into EIO. On Linux, ENAMETOOLONG (36) and ELOOP (40) are above
that range, so sceKernelOpen and sceKernelUnlink returned EIO for a name
longer than 255 bytes or a symbolic link loop, where FreeBSD returns
ENAMETOOLONG (63) and ELOOP (62). sceKernelStat returned ENOENT for
both. sceKernelMkdir already reported them through the mapping in
Stdio.cpp.

Values above 34 now go through FilesystemError, the std::errc mapping
that path resolution already uses. sceKernelStat returns ENAMETOOLONG
and ELOOP when the status query fails with them. The POSIX open, unlink
and stat wrappers set the same errno values.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-18 21:35:18 -03:00
Jota 42fb02cdba fix(libc): let the macOS write watch fault handler go first
The macOS write watch serialized its fault handler and collections with
a ticket lock whose waiters spin on sched_yield. When the thread holding
the next turn is not running, every other thread waits behind it even
though the lock is free, so with more runnable threads than cores the
handoffs stall. write_watch_threads took 6.75 s and then timed out at
30 s on the macos-15-intel runner in run 39151604364, a run whose pull
request does not touch the write watch.

The lock is now a pthread mutex with the first-fit policy: a waiter
blocks in the kernel, and the mutex goes to whichever thread takes it
first instead of to the next turn in line. The ticket lock was there so
that a thread collecting in a loop cannot starve writers waiting in the
handler. That is kept by giving the handler precedence: a collection and
every other entry point wait on a condition variable while a fault is
waiting for the mutex or holding it. Faults cannot starve them in turn,
since a fault lifts the protection of a page and only those entry points
protect pages again.
2026-10-18 21:31:37 -03:00
Adrià FranchandClaude Sonnet 5.5 26ce3f2ef5 test(agc): skip draw pipeline trace disabled test when pipelining is off
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
2026-10-19 02:28:04 +02:00
JJenkx 4ee25dc4f1 fix(agc): include draw committer work in CPU traces 2026-10-19 02:27:57 +02:00
Jota a51bb03cc8 fix(agc): ignore Finder .DS_Store files in capture directories 2026-10-18 21:26:49 -03:00
Yunus Shaikh adc46f3ea0 fix(agc): keep a multisampled target alive under its sample-order work
MultisampleTargetOrderTarget handed out the target's image and order view with no owner, so a reordered draw recorded before the target retired could reach a destroyed image. The order target now holds the same owner the framebuffer holds since #6215, as the depth surface's order target already does, so the recorder keeps the image and its order view until the batch completes. agc_driver_multisample_retirement checks it: a sample-order target taken before a remap keeps the retired image until its batch completes.
2026-10-18 17:26:13 -07:00
valenciana-nc 25d26b54a8 test(libkernel): cover read-only getdirentries destinations on Windows 2026-10-19 00:22:09 +00:00
valenciana-nc 5d9a6483b5 fix(libkernel): validate getdirentries output buffers in the guest arena
sceKernelGetdirentries/sceKernelGetdents wrote up to nbytes into buf
and 8 bytes into *basep with only null checks, unlike sceKernelRead,
pread and readv which all gate on GuestArena::HostWrite. Validate both
buffers the same way so a forged pointer fails with EFAULT instead of
writing to an arbitrary host address.
2026-10-19 00:18:25 +00:00