Commit Graph

574 Commits

Author SHA1 Message Date
Adrià 461fcfc7f3
Merge pull request #1436 from tototomate123/fix/hfw-offline-imports
fix(prx): add missing HFW imports with strict offline handling
2026-10-08 15:52:39 +02:00
Adrià 5fbddcdf53
Merge pull request #1435 from ewraj/fix/linux-guest-varargs
fix(libc): read every variadic argument of the Linux printf and scanf exports
2026-10-08 15:52:17 +02:00
Adrià 63c57d2222
Merge pull request #1432 from ToyuAU/build/standalone-relinker
build(relinker): add a dependency-free conversion build mode
2026-10-08 15:43:51 +02:00
Adrià f4028921f8
Merge pull request #1412 from TheAggie/fix/recompiler-ngg-vertex-wave-info
fix(recompiler): give vertex-path shaders a full NGG merged wave info
2026-10-08 15:08:22 +02:00
Adrià c68c7576b9
Merge pull request #1399 from hugodearaujo/fix/rtc-parse-datetime-rfc2822-hardware
fix(rtc): parse RFC 2822, RFC 850 and asctime text like the console
2026-10-08 15:05:42 +02:00
Adrià Franch c39476459b docs: record the inferred NGG merged wave info layout in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 15:05:40 +02:00
Adrià fd5f63a2d0
Merge pull request #1393 from xsvm/fix/relinker-rewriter-reference-sites
fix(relinker): classify rewrite reference sites with the instruction decoder
2026-10-08 15:03:48 +02:00
Adrià 79d23eb76c
Merge pull request #1321 from TibixDev/pr/guest-path-case
fix(libc): resolve case differences in guest paths and mounts
2026-10-08 15:01:28 +02:00
Adrià 09a17e963a
Merge pull request #1398 from hugodearaujo/fix/rtc-parse-datetime-iso-hardware
fix(rtc): parse ISO text in sceRtcParseDateTime by the RFC 3339 rules
2026-10-08 14:56:12 +02:00
Adrià e08c816abc
Merge pull request #1383 from nisbenz/fix/shader-memtime-narrow-subgroup-clock
fix(shader): read s_memtime from the device clock where RADV's subgroup clock is 20 bits
2026-10-08 14:51:41 +02:00
Adrià 0596a7a274
Merge pull request #1385 from gjonn/feat/recompiler-lwe-on-samples
feat(recompiler): accept lwe on MIMG samples and gathers
2026-10-08 14:43:27 +02:00
nisbenz f025a9e506 fix(shader): read s_memtime from the device clock where RADV's subgroup clock is 20 bits
On GFX10.3 to GFX11.7, ACO lowers a subgroup-scope OpReadClockKHR to
s_getreg_b32 of SHADER_CYCLES, 20 bits zero-extended to 64, so s_memtime
wrapped every 2^20 cycles and went backwards. Detect those families from
the RADV device name and read the device clock there instead.

Fixes #985

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 14:42:40 +02:00
Adrià cba8d86da8
Merge pull request #1270 from Celegans12/fix/agc-unaligned-buffer-views
fix(agc): bind guest buffer views that start off a DWORD boundary
2026-10-08 14:34:45 +02:00
TibixDev 4f23830d89 fix(libc): resolve guest filename case on host filesystems
Resolve ASCII case differences in guest paths and mount aliases while preferring exact names and rejecting ambiguous fallback matches. Preserve new filenames and host roots. Five filesystem tests pass; Skyrim now loads its INI and shader archives, initializes Vulkan and uploads intro textures instead of dereferencing null shader metadata. Written with AI assistance.
2026-10-08 14:33:17 +02:00
Adrià 0b3cc73e1c
Merge pull request #1112 from Celegans12/feat/agc-conservative-rasterization
feat(agc): implement overestimating conservative rasterization
2026-10-08 14:31:38 +02:00
Adrià 8087092234
Merge pull request #1350 from gjonn/feat/usbd-no-devices
feat(libSceUsbd): report a USB stack with no devices attached
2026-10-08 13:54:00 +02:00
Adrià 947a267f4d
Merge pull request #1302 from TibixDev/pr/ngs2-legacy-userfx
feat(ngs2): implement legacy submixer UserFx callbacks
2026-10-08 13:37:56 +02:00
Gjon Gojcevic 6e5d70f0cd feat(libSceUsbd): report a USB stack with no devices attached
Init and exit succeed, the device list is empty, event handling waits for its timeout, and calls that need a device throw.
2026-10-08 13:34:39 +02:00
Adrià 4f41832dc0
Merge pull request #1320 from TibixDev/pr/temporary-storage-lifecycle
fix(appcontent): track temporary storage mounts
2026-10-08 13:31:44 +02:00
Celegans12 29c22442dc feat(agc): implement overestimating conservative rasterization
A draw whose PA_SC_CONSERVATIVE_RASTERIZATION_CNTL (context 0x313) was
not the default 0x6000 threw in DecodeState and the draw precheck.
0x6001 sets OVER_RAST_ENABLE and now decodes to Vulkan's overestimation
mode, chained to the pipeline's rasterization state and its key.

The device enables VK_EXT_conservative_rasterization only when its
primitiveOverestimationSize is at most 1/256 pixel and it rasterizes
degenerate triangles; elsewhere the pipeline throws. Overestimation is
accepted only when triangles reach the rasterizer: VGT_GS_OUT_PRIM_TYPE
behind a geometry shader, VGT_TF_PARAM's output topology behind
tessellation, VGT_PRIMITIVE_TYPE otherwise. Other 0x313 values and
centroid interpolation still throw.

Adds the agc_driver_conservative_rasterization GPU test and extends
agc_driver_graphics.
2026-10-08 13:20:22 +02:00
Nikhil Panchal 43074a805e fix(recompiler): avoid illegal narrow constants during optimization
Skip CCP and Simplification for storage-only narrow types while keeping
the remaining passes and arithmetic-capable folding.

Add compiler and Vulkan readback regressions for default/full/none modes.

Tested: Linux/llvmpipe, full CTest with SPIRV-Tools on/off, ASan/UBSan
optimizer checks, and cold-cache Vulkan wave32/wave64 readback.

Fixes boykopovar/AnyPS5#1276
2026-10-08 13:20:06 +02:00
TibixDev 0d4db860a6 feat(ngs2): implement legacy submixer UserFx callbacks
Invoke the title callback on planar mixed samples and silence. Preserve per-voice callback data, reset registration on setup, and release the render guard on callback failure. Include behavioral tests and source references. Written with AI assistance.
2026-10-08 13:18:41 +02:00
Adrià 44ef694870
Merge pull request #1308 from TibixDev/pr/implicit-cube-extents
fix(agc): decode implicit six-face cube extents
2026-10-08 13:08:02 +02:00
Celegans12 38e89df1a5 fix(agc): bind guest buffer views that start off a DWORD boundary
A V# whose base is not a multiple of 4 bytes from the start of its GPU
owner threw in GuestBufferMemory::Descriptor, because the shader added
the offset below the view only in whole dwords.

Descriptor now binds from the offset alignment below the view and
passes the whole remainder. Such a view's range covers the dwords
around it, and its descriptor region starts and ends on dword
boundaries, so a lone view copied to its own buffer binds the same way.

The buffer specialization records the V# base's low two bits. Raw
vector loads through such a V# join two dwords, glc dwordx2 loads
included, stores merge their bytes into both with compare-exchange
loops, and bounds checks include the second dword. s_buffer_load
ignores the low two bits, as SrtEvaluator does. Formatted accesses
whose element alignment (min(element bytes, 4)) the base breaks throw,
as they fault the wave on RDNA2, and so do atomics.
2026-10-08 13:01:27 +02:00
TibixDev 33555244c3 fix(appcontent): track temporary storage mounts
Preserve files across unmount, block new lookups until remount, and validate mount-dependent operations. Keep prior-run storage inaccessible after initialization.

Written with AI assistance.
2026-10-08 13:00:00 +02:00
Adrià b599fe0586
Merge pull request #1268 from Celegans12/fix/shader-wave64-half-wave-reductions
fix(shader): read the half-wave scans of wave64 reductions on any host subgroup
2026-10-08 12:58:18 +02:00
Adrià 81f31ef1a9
Merge pull request #1301 from TibixDev/pr/ngs2-atrac9-loops
feat(ngs2): parse forward ATRAC9 waveform loops
2026-10-08 12:53:11 +02:00
Adrià 7c4dfac50e
Merge pull request #1293 from TibixDev/pr/savedata-progress-dialog
fix(savedata): keep progress dialogs running until closed
2026-10-08 12:50:48 +02:00
Scott Schuster 408e305ca0 feat(libkernel): implement poll for guest sockets
Translate the FreeBSD pollfd layout and flags to WSAPoll on Windows and
poll on Linux. Closed socket descriptors report POLLNVAL, a timeout below
-1 fails with EINVAL and a null array with EFAULT. Non-socket
descriptors, unknown event bits, POLLPRI on Windows and an infinite wait
without sockets throw; these are recorded in TechnicalDebt.

DOOM (PPSA99666) imports poll for its upload server.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 12:23:41 +02:00
xsvm 70b3ae082b docs(relinker): drop the VEX/0F38/0F3A gap from the rewriter debt entry 2026-10-08 18:20:14 +08:00
Adrià e28fa01ca6
Merge pull request #1253 from popcoder565/feat/shader-system-opcodes
feat(shader): decode halt, trap return, code end, GWS and ordered count instructions
2026-10-08 12:19:38 +02:00
Celegans12 9513703244 fix(shader): read the half-wave scans of wave64 reductions on any host subgroup
The GFX10 lowering of a wave64 reduction scans rows with DPP row_shr
1/2/4/8 and v_permlanex16_b32 under EXEC -1, then joins lanes 31 and 63
with a scalar op. The console fills lanes outside the entry EXEC with
the identity, but on the host they can be helpers that sit out subgroup
operations or invocations that were never launched: on 64 lanes (RADV)
the emulated chain reads 0 or stale values from them, and on 32 lanes
lane 63 throws since #997.

EmitReadLane now recognises the sequence on any host for UMin, UMax,
SMin, SMax, IAdd, AND and OR when the keys are the identity outside the
entry EXEC. On 64 lanes, lanes 31 and 63 become subgroup reductions of
the keys of invocations 0-31 and 32-63; on 32 lanes or fewer, lane 31
reduces all keys and lane 63 is the identity. It throws without
subgroup arithmetic or on a subgroup wider than the wave. VulkanDevice
reports GroupNonUniformArithmetic and ShaderValidation checks it.
2026-10-08 12:10:32 +02:00
Adrià 915e3b753f
Merge pull request #1264 from Celegans12/fix/shader-wave64-exec-host-lanes
fix(shader): mask EXEC copies to the host subgroup's lanes
2026-10-08 12:08:54 +02:00
Adrià 3069680b70
Merge pull request #1130 from Celegans12/feat/agc-ordered-pixel-shader
feat(agc): implement primitive-ordered pixel shaders with fragment shader interlock
2026-10-08 12:01:03 +02:00
Adrià Franch 2e0b7bb90e docs: record the s_sethalt 0 measurement in TechnicalDebt
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 11:49:24 +02:00
popcoder565 f11080ceef chore: move the s_sethalt debt entry below the libSceAudio3d entries
#1398 and #1399 both rewrite the sceRtcParseDateTime entry that the s_sethalt entry followed. It now follows the libSceAudio3d entries, which no open pull request edits, so either can merge first without a conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:49:17 +02:00
popcoder565 67b28480d8 chore: move the wave control decode test and s_sethalt debt entry off shared lines
#1372 adds its test after the vop1 decode tests and #1314 its debt entry after s_setkill, the places where this branch added its own. The wave control decode test now precedes the vop1 decode tests and the s_sethalt entry follows sceRtcParseDateTime, so either pull request can merge first without a conflict.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:49:17 +02:00
popcoder565 a5717b6613 feat(shader): decode halt, trap return, code end, GWS and ordered count instructions
s_sethalt with SIMM16[0] clear is a no-op; s_sethalt 1, s_sendmsghalt, a reached s_code_end, s_rfe_b64, the ds_gws_* instructions and ds_ordered_count throw with the reason at translation. Linear decoding stops at s_code_end like at s_endpgm, so code padded with s_code_end after a final backward branch decodes. Encodings from LLVM SOPInstructions.td and DSInstructions.td, checked against the gfx10 MC tests; semantics from the RDNA 2 ISA guide.
2026-10-08 11:49:06 +02:00
Adrià 73ac9ef7f4
Merge pull request #1218 from hashaam1217/feat/relinker-rip-relative-stubs
feat(relinker): relocate RIP-relative operands into --to-intel stubs
2026-10-08 11:40:17 +02:00
Adrià b36718214c
Merge pull request #1206 from CnRJay/feat/http-ssl-and-callbacks
feat(libSceHttp): accept the SSL version, SSL error and redirect and cookie callback calls
2026-10-08 11:38:43 +02:00
Adrià b680d5adac
Merge pull request #1198 from Sanjaysrinivas/feat/shader-conditional-exchange
feat(shader): add LDS conditional exchange
2026-10-08 11:34:31 +02:00
Celegans12 e1d4e699be feat(agc): implement primitive-ordered pixel shaders with fragment shader interlock
DecodeState and the draw precheck rejected DB_SHADER_CONTROL bit 16,
PRIMITIVE_ORDERED_PIXEL_SHADER (POPS), which runs the ordered section
of overlapping pixels' shaders in primitive order. The bit now reaches
the recompiler as a pixel stage field, and such a pixel shader declares
PixelInterlockOrderedEXT and runs its whole body between
OpBeginInvocationInterlockEXT and OpEndInvocationInterlockEXT; an
invocation that a BDA read fault kills ends the interlock first. The
POPS collision SGPRs read 0, so a title skips its POPS wait and runs
its per-collision loop once. An image_load still reads a sampled
binding, which misses an earlier overlapping primitive's image_store in
the same draw. The device enables VK_EXT_fragment_shader_interlock when
it has fragmentShaderPixelInterlock; without it the recompile throws,
as does a nonzero POPS_OVERLAP_NUM_SAMPLES. The field is part of the
recompile cache key, the draw key and the serialized request (version 10).
2026-10-08 11:18:46 +02:00
Adrià Franch 274b070ac2 docs: mark the VRSQRTPS/VRCPPS native-site count as predating RIP-relative followers
Co-Authored-By: Claude <noreply@anthropic.com>
2026-10-08 11:10:42 +02:00
Hashaam Zafar a571a7f100 feat(relinker): relocate RIP-relative operands into --to-intel stubs
SHA-1 and SHA-256 instructions with a [rip+disp32] operand, and
instructions with one that a short site absorbs, now move into the
stub. The stub records each displacement as a relocation relative to
the site, and the Linux, guest and Windows placements resolve it once
the stub address is known. Indirect branches through [rip+disp32]
still fail the relink.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 11:10:38 +02:00
Adrià e3d5e79eb8
Merge pull request #1126 from Fishybeing/fix/libc-utf16-conversions
fix(libc): parse and collate guest wide strings as 16-bit units
2026-10-08 11:09:24 +02:00
Adrià ac951f8d09
Merge pull request #1215 from polysius/fix/agc-versioned-nid-names
refactor(libSceAgc): name exports after the versioned SDK names their NIDs hash to
2026-10-08 11:05:42 +02:00
Sanjaysrinivas 34d4cf1796 fix(shader): preserve LDS conditional addresses
Use the shared atomic bounds check instead of wrapping at 64 KiB.
Expect zero returns and unchanged LDS for aligned out-of-range accesses,
and record the gfx1035 hardware measurements.
2026-10-08 11:04:26 +02:00
Adrià e82e03f11e
Merge pull request #1093 from kjhq/fix/libkernel-sync-access-denied
fix(libkernel): flush only the paths the guest changed in sceKernelSync on Windows
2026-10-08 10:58:55 +02:00
Claude 3ed954fb90 feat(libSceHttp): accept the SSL version, SSL error and redirect and cookie callback calls
No request reaches the network, so sceHttpsSetSslVersion has no TLS
connection to configure, sceHttpSetRedirectCallback and
sceHttpSetCookieRecvCallback register callbacks that are never called,
and sceHttpsGetSslError reports error 0 with detail 0. A null errNum or
detail returns SCE_HTTP_ERROR_INVALID_VALUE like sceHttpGetLastErrno.
Signatures follow shadPS4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-08 10:57:14 +02:00
Adrià 0e173a4634
Merge pull request #1143 from AchrafReyani/feat/libc-bad-weak-ptr
feat(libc): implement std::bad_weak_ptr and _Throw_bad_weak_ptr
2026-10-08 10:30:41 +02:00