Commit Graph
6138 Commits
Author SHA1 Message Date
Nahuel Genchi 2b83a533b8 test(libc): match the immortal classic locale and run guest_locale in ctest 2026-10-07 00:00:12 -03:00
hugodearaujoandClaude Opus 5.5 bdfd0287e1 feat(libSceAgc): implement sceAgcGetRegisterDefaultsInternal
Return the version 0 internal register defaults, the internal
counterpart of sceAgcGetRegisterDefaults.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 23:43:04 -03:00
raghav314andClaude Opus 5.5 f5a6a31b61 fix(agc): read unwritten user data registers as zero
A stage's user data registers are read for the count in its RSRC2
(COMPUTE_PGM_RSRC2 for compute). A register the title never wrote no
longer refuses the draw or dispatch: it reads 0, as Kyty and SharpEmu
read it and as AMD PAL and Mesa initialize the user data registers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 08:09:54 +05:30
Dean 0c952fe574 Merge pull request #994 from CnRJay/fix/map-no-overwrite-enomem
fix(libkernel): refuse fixed no-overwrite mappings over live memory with ENOMEM
2026-10-07 15:31:12 +13:00
Dean 9ec263cec0 Merge pull request #887 from adriadam10/feat/libc-fiopen
feat(libc): implement std::_Fiopen
2026-10-07 15:30:30 +13:00
Dean 18b9994c76 Merge pull request #885 from adriadam10/feat/libc-collate-getcat
feat(libc): implement collate<char>::_Getcat
2026-10-07 15:29:48 +13:00
Celegans12 f7d4fbab9a perf(shader): share the BDA byte read fallback between read sites
A BDA dword read whose span the probe rejects falls back to four byte
lookups with a branch each, and every fault was recorded inline with a
compare-exchange and seven stores. Both were copied into every read
site and both wave64 lane halves, so one large compute program grows
to about a million SPIR-V words and spends about 95 s in
vkCreateComputePipelines.

Faults are now recorded by one DontInline function, record_bda_fault,
and the byte fallback of a dword is read_bda_dword_bytes, in a stop
and a coherent variant, returning the value and whether the invocation
stops. Read order, fault reasons, pcs, Volatile and the stop behaviour
are unchanged, and so is the probe path.
2026-10-07 04:29:27 +02:00
Dean dc2bf2a55c Merge pull request #882 from adriadam10/feat/libc-wide-format-count
feat(libc): support %n in wide formatting
2026-10-07 15:29:07 +13:00
Dean f6f47bf1de Merge pull request #880 from adriadam10/feat/kernel-mtypeprotect-type
feat(kernel): apply the memory type in sceKernelMtypeprotect
2026-10-07 15:28:25 +13:00
Dean 1d773dad2e Merge pull request #722 from alfalfa-star/feat/libkernel-rtld-thread-atexit
feat(libkernel): implement the rtld thread atexit reference count
2026-10-07 15:27:44 +13:00
Dean 558e56b09a Merge pull request #899 from alfalfa-star/fix/agc-indirect-register-placeholders
fix(agc): accept indirect register placeholders without an address
2026-10-07 15:27:02 +13:00
Dean f495475ee8 Merge pull request #840 from merwie/fix/agc-se-primitive-discard
fix(agc-driver): accept per-engine primitive discard in PA_SC_MODE_CNTL_1
2026-10-07 15:26:21 +13:00
Dean a826cfa3c9 Merge pull request #849 from meh7an/fix/agc-teardown-pooled-buffers
fix(agc): release pooled buffers and image mirrors before the device
2026-10-07 15:26:10 +13:00
Dean e50814c9e7 Merge pull request #860 from ebosido444-ai/feat/libc-std-execute-once
feat(libc): implement std_execute_once
2026-10-07 15:25:29 +13:00
Dean fc5341aca2 Merge pull request #872 from Fishybeing/fix/guard-nominmax
build(windows): guard NOMINMAX before including windows.h
2026-10-07 15:24:47 +13:00
Dean 0e58c7034f Merge pull request #837 from MathiasDevelopes/claude/relinker-shared-elf-constants
refactor(relinker): use the shared ELF constants
2026-10-07 15:24:05 +13:00
Dean 1f3d5c9c12 Merge pull request #829 from LeandroLP23/fix/agc-derivatives-skip-offsets-without-maintenance8
test(agc): skip the 2D derivative cases without non-constant texel offsets
2026-10-07 15:23:52 +13:00
Gjon Gojcevic 5bae4df0b6 feat(libSceNgs2.native): mix a stereo mastering voice into a 6 or 8 channel render buffer
The mixing stage threw when a mastering voice and its render buffer had different channel counts. A 2-channel voice is now mixed into the first two channels of a 6- or 8-channel buffer; other mismatches still throw.
2026-10-06 22:23:40 -04:00
Celegans12 4e18def4c1 fix(agc): accept unaligned shader headers
Driver::RegisterShader required the Shader header at an 8-byte
boundary (alignof(Shader)) and read its fields through the pointer.
PPSA26344 uses its shader packs in place: its compute shader objects
point at headers 4 and 1 bytes past an 8-byte boundary, so the first
sceAgcCreateShader of such a header threw "null or misaligned address".

The header is now checked for null and readable memory at any
address, and its fixed fields and the registers the trace prints are
copied out with memcpy. The code address must still be 256-byte
aligned, and the header and size checks are unchanged. The console's
rule is unknown and is listed in TechnicalDebt.
2026-10-07 04:23:21 +02:00
Dean f223016895 Merge pull request #956 from JAB-dev/fix/vulkan-loader-race
fix(agc): don't create the Vulkan instance while SDL creates the Vulkan window
2026-10-07 15:23:10 +13:00
Dean 148b888c3a Merge pull request #947 from ebarr24/codex/libc-scanf-count-length
fix(libc): honor sscanf_s count conversion lengths
2026-10-07 15:22:29 +13:00
Dean 6e2c1f8992 Merge pull request #965 from hugodearaujo/feat/agc-async-cond-exec-patch
feat(libSceAgc): implement the async COND_EXEC patches
2026-10-07 15:21:47 +13:00
Dean 8545f330f1 Merge pull request #963 from JAB-dev/feat/agc-registration-max-name-length
feat(libSceAgcDriver): implement sceAgcDriverGetResourceRegistrationMaxNameLength
2026-10-07 15:21:05 +13:00
Dean 8cb1667cd0 Merge pull request #941 from ThisIsAkill/fix/agc-sampler-unused-border-table
fix(agc): accept a table border colour when no axis uses a border mode
2026-10-07 15:20:24 +13:00
Dean 990c69645d Merge pull request #936 from CnRJay/feat/agc-write-data-patch
feat(libSceAgc): implement the WRITE_DATA destination and cache policy patches
2026-10-07 15:19:43 +13:00
Dean 2129a6ef29 Merge pull request #1001 from Dextroid17/fix/application-heap-finalize-order
fix(libc): register the application heap finalizer when libc loads
2026-10-07 15:19:33 +13:00
Dean f8975a8ef8 Merge pull request #1015 from hugodearaujo/feat/agc-dcb-end-of-shader-action-size
feat(libSceAgc): implement sceAgcDcbQueueEndOfShaderActionGetSize
2026-10-07 15:18:50 +13:00
Dean e28b9f4b94 Merge pull request #977 from hugodearaujo/feat/agc-driver-cond-write
feat(libSceAgcDriver): execute COND_WRITE
2026-10-07 15:18:09 +13:00
Dean f1efcc6786 Merge pull request #975 from hugodearaujo/feat/agc-cb-cond-write
feat(libSceAgc): implement sceAgcCbCondWrite
2026-10-07 15:17:27 +13:00
Dean c0eb929c09 Merge pull request #930 from ebarr24/fix/relinker-dynamic-segment-bounds
fix(relinker): reject malformed dynamic segments
2026-10-07 15:16:45 +13:00
Dean 293d1218e9 Merge pull request #684 from nicolasabosch/fix/windows-import-module-binding
fix(relinker): bind Windows imports to their declared modules
2026-10-07 15:16:03 +13:00
Dean e4048a0989 Merge pull request #709 from merwie/fix/videoout-unsupported-output-mode
fix(videoout): report unavailable output modes instead of throwing
2026-10-07 15:15:22 +13:00
Dean 8789a8d1db Merge pull request #978 from ebarr24/codex/libc-memcpy-s-overlap
fix(libc): reject overlapping memcpy_s ranges
2026-10-07 15:15:11 +13:00
Dean a2073010c4 Merge pull request #972 from ebarr24/codex/libc-fscanf-abi
fix(libc): translate Windows fscanf guest arguments
2026-10-07 15:14:30 +13:00
Gjon Gojcevic 1bdc37bb86 test(libSceNgs2.native): write the ParseWaveformFile test file where the guest path resolves
On Linux every absolute guest path is resolved under the working directory, so the temporary file in the host temp directory was not found. The test now asks ResolvePath_nid_no_patch for the host path of a guest path and writes the file there.
2026-10-06 22:14:23 -04:00
Gjon Gojcevic 74a7a1d9f1 fix(libSceNgs2.native): take (path, offset, info) in sceNgs2ParseWaveformFile and reject PCM data that does not fit
The call site of PPSA21402 sets only three argument registers, so the function has no size parameter. A data chunk that runs past the buffer or ends inside a frame returns INVALID_WAVEFORM_DATA instead of being shortened. The test no longer writes padding from a string literal.
2026-10-06 22:14:23 -04:00
Gjon Gojcevic 64230cf95a feat(libSceNgs2.native): implement sceNgs2ParseWaveformFile and parse 16-bit PCM waveforms 2026-10-06 22:14:23 -04:00
Dean 87ab98b9e9 Merge pull request #968 from ebarr24/codex/libc-stdio-binary
fix(libc): preserve guest stdio bytes on Windows
2026-10-07 15:13:48 +13:00
Dean a0f79d5b4f Merge pull request #962 from JAB-dev/feat/ngs2-plain-module
feat(libSceNgs2): build libSceNgs2 from the libSceNgs2.native implementation
2026-10-07 15:13:07 +13:00
hugodearaujoandClaude Opus 5.5 425ed24795 feat(libSceAgc): implement sceAgcDcbClearState
Write the 2-dword CLEAR_STATE (0x12) packet with a 4-bit command, the
packet the driver already validates and executes by restoring the
initial context registers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 23:06:15 -03:00
Dean 66e0a1e9c5 Merge pull request #1019 from fisherjoey/feat/agc-semaphore-memory-register-multiple
feat(agc): declare sceAgcSetSemaphoreMemory and sceAgcDriverRegisterMultipleResources
2026-10-07 15:04:53 +13:00
hugodearaujoandClaude Opus 5.5 8ab5fab84a feat(libSceAgc): implement sceAgcDcbSetCfRegisterDirect and RangeDirect
Write SET_CONFIG_REG (0x68) packets like the context, shader and user
config register setters: one register from a ShaderRegister, or a range
of values at an offset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 22:52:29 -03:00
Dean 5f96e1e040 Merge pull request #1018 from Raghav314/feat/ajm-resample
feat(ajm): implement sceAjmBatchJobSetResampleParameters and sceAjmBatchJobGetResampleInfo
2026-10-07 14:47:49 +13:00
hugodearaujoandClaude Opus 5.5 54eeadb3a2 feat(libSceAgc): implement sceAgcWaitRegMemPatchMask
Patch the mask of a wait packet like sceAgcWaitRegMemPatchReference
patches its reference: a 32-bit value written to the low mask word of a
32- or 64-bit WAIT_REG_MEM, rejected above 32 bits.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-06 22:34:29 -03:00
Celegans12 bcdf19ee4e perf(shader): memoize SPIR-V emission failures
The source entry remembers a resource plan that failed to build, but
not a failed emission: findOrCompileVariant kept only successful
variants, and the first attempt used up the prepared program, so every
request for a program whose emission throws ran PrepareResourceProgram
and the emitter again before the draw was skipped.

compileVariant now reports an exception from SpirvEmitter::Emit (and
from SPIRV-Tools validation when enabled), and the source entry keeps
it per code address, binding layout and resource specialization; the
next request for that variant rethrows it before the disk-cache lookup.
Descriptor population depends on the snapshot and an out-of-memory
error is transient, so neither is kept. Nothing reaches the disk cache,
and APS5_NO_FAILURE_MEMO=1 turns the memo off as for plan failures.
2026-10-07 02:49:35 +02:00
raghav314andClaude Opus 5.5 60e16537dc docs: record the AJM resample assumptions in technical debt
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 05:41:46 +05:30
Dean ee391a5614 Merge pull request #1016 from ArjenS-LA/fix/autorun-posix-path-quoting
fix(relinker): quote literal autorun paths on POSIX
2026-10-07 13:11:16 +13:00
Dean e69f196f09 Merge pull request #1006 from Dextroid17/fix/agc-command-tests-full-mode
test(agc): fix the stale 32-bit WriteWait expectation and run the full suite
2026-10-07 13:10:03 +13:00
Joey Fisher 23a6859a51 feat(agc): declare sceAgcSetSemaphoreMemory and sceAgcDriverRegisterMultipleResources 2026-10-06 18:07:53 -06:00
raghav314andClaude Opus 5.5 72be77590c feat(ajm): implement sceAjmBatchJobSetResampleParameters and sceAjmBatchJobGetResampleInfo
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-07 05:36:31 +05:30