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]>
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]>
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]>
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]>
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
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]>
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]>
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.
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
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.
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]>
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.
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.
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.