Commit Graph
6138 Commits
Author SHA1 Message Date
Celegans12andClaude Opus 5.5 51c98a3983 fix(agc): store sceAgcGetIsTrinityMode's flag through its out pointer
sceAgcGetIsTrinityMode takes a pointer to a one-byte flag; the only
known caller ignores the return value. The export took no argument and
never wrote the flag. That caller's flag is in zero-initialised .bss,
so this corrects the signature; it does not fix a visible failure.

The function now stores false, as sceKernelIsTrinityMode reports a base
PS5, returns 0 and throws on a null pointer, whose error code is
unknown. It moves from Unimplemented.cpp to Misc/src/Platform.cpp, and
the new agc_platform_tests ctest target covers it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 17:51:03 +02:00
Celegans12andClaude Opus 5.5 f7ede9cd7d feat(shader): implement the DPP16 row_share controls
EmitDppTargetLane threw "DPP control 336 is not supported" for the
DPP16 row_share controls 0x150-0x15f. row_share:sel now reads lane
sel of the reading lane's own row, (lane & ~15) | sel, as the RDNA2
ISA defines it. The source never leaves the row, so the target is
always valid and an inactive source follows the existing fi and
bound_ctrl rule, as for row_xmask.

The new agc_driver_dpp16_row_share_xmask execution test covers
v_mov_b32, v_add_nc_u32, v_sub_nc_u32 and v_max_f32 with row_share
and row_xmask under a partial exec mask, with fi, bound_ctrl and
row/bank masks, as wave32 and wave64; row_xmask had no test before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 17:51:00 +02:00
Celegans12andClaude Opus 5.5 2eff3c8386 feat(agc): accept linear attribute clipping in PA_CL_CLIP_CNTL
DecodeState and the draw precheck rejected PA_CL_CLIP_CNTL bit 24
(DX_LINEAR_ATTR_CLIP_ENA), so every draw that sets it was skipped.
Vulkan requires clipped NoPerspective outputs to vary linearly in
framebuffer space, and RADV and radeonsi set this bit for every draw
they emit. With the bit set the console therefore clips the way the
host driver already does, and the pipeline needs no extra state.
Clip space, depth clamping and the viewport depth range decode as
with the bit clear. Every other unsupported bit still rejects the
draw, with or without bit 24.

TechnicalDebt records that a clear bit, which was already accepted,
gets the same clipping.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 17:50:57 +02:00
boykopovar e248f404ef Merge pull request #636 from Celegans12/feat/usbd-module
feat(usbd): add the libSceUsbd module
2026-10-05 18:46:17 +03:00
Adrià FranchandClaude 93d14fa5f4 test(shader): split the flat and global loads test to keep it within CI's time limit
Co-Authored-By: Claude <[email protected]>
2026-10-05 17:32:46 +02:00
Pouare514 7fea9e00b6 fix(libkernel): drop direct mappings when physical backing is released
ForgetDirectMemory erased the physical pages but left g_directMappings entries pointing at the dead backing, so sceKernelVirtualQuery kept reporting is_direct with a stale physical offset. Erase (and split, on the phys axis) the affected mapping tracking on release; mapped views are untouched, so no new faults are introduced.
2026-10-05 17:22:41 +02:00
Adrià FranchandClaude 14a00e6963 test(shader): split the global atomics test to keep it within CI's time limit
Co-Authored-By: Claude <[email protected]>
2026-10-05 17:19:12 +02:00
MichonandClaude Opus 5.5 3d014251a5 fix(shader): lower only exact sample id and layer field extracts of the packed pixel ancillary
Any other live use of the packed register keeps throwing, as on main, instead of
reading SampleId << 8 | Layer << 16 with the other bits zero. The field range
check no longer underflows for an extract that starts past a field's end.
Adds the pixel_ancillary recompiler test.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 17:18:02 +02:00
MichonandClaude Opus 5.5 5a6e2b8eb5 fix(shader): packed pixel ancillary as SampleId and Layer, gl_Layer via Geometry, Z export formats
Bit-field extracts of the packed ancillary VGPR become gl_SampleID and gl_Layer reads. A pixel
shader reading gl_Layer needs the Geometry capability instead of ShaderLayer and SPIR-V 1.5, and
the Geometry capability is available whenever the geometryShader feature is. 32-bit
SPI_SHADER_Z_FORMATs and 32_ABGR are accepted with the depth and sample-mask export enables.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
2026-10-05 17:18:02 +02:00
Slick Daddy 6b086da94f Merge remote-tracking branch 'origin/main' into opt-2
# Conflicts:
#	core/libs/prx/libSceAgcDriver/CMakeLists.txt
2026-10-05 18:09:27 +03:00
raghav314andClaude Opus 5.5 23c2816d21 fix(ajm): release a batch when sceAjmBatchWait returns
sceAjmBatchStart records the batch id it hands out and sceAjmBatchWait
removes it. Waiting on a batch id that was never issued or was already
waited on returns INVALID_BATCH instead of 0, as in shadPS4.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 20:36:40 +05:30
Adrià FranchandClaude 4066e6dd29 test(shader): keep the flat cache bits test within CI's time limit
Co-Authored-By: Claude <[email protected]>
2026-10-05 16:54:53 +02:00
hamb3r ca2cbc29a3 style(pad): remove disallowed explanatory comment 2026-10-05 16:34:57 +03:00
Nahuel Genchi 22dad020b0 docs: record the fused assumption of v_fma_legacy_f32 in TechnicalDebt 2026-10-05 10:34:45 -03:00
Dean af92452ff6 Merge pull request #631 from DotDebian/feat/npcppwebapi-intrusive-ptr
feat(libs): implement NpCppWebApi IntrusivePtr construction, copy, release and access
2026-10-06 02:33:43 +13:00
Dean caf24225aa Merge pull request #630 from DotDebian/feat/npcppwebapi-common-string
feat(libs): implement NpCppWebApi Common::String constructor, destructor and c_str
2026-10-06 02:33:32 +13:00
Dean 961acb0c7e Merge pull request #629 from adriadam10/tools/progress-endpgm-aliases
fix(tools): count s_endpgm_saved and s_endpgm_ordered_ps_done as decoded shader instructions
2026-10-06 02:32:49 +13:00
Nahuel Genchi a93faff19f feat(shader): implement global_atomic_csub
GLOBAL opcode 0x34 subtracts the data register from a global dword and
clamps the result to zero, returning the previous value. It only exists
in the global segment, so the flat form throws in the decoder, and the
form without glc throws like buffer_atomic_csub does. The clamped
subtract is now a shared helper used by both opcodes.
2026-10-05 10:32:48 -03:00
Dean 4c57426b51 Merge pull request #501 from adriadam10/fix/vop3-legacy-mods
fix(shader): v_mullit_f32 legacy rules, v_cvt_pk_u8_f32 rounding and VOP3 neg/abs
2026-10-06 02:32:06 +13:00
Dean a2b0e24e9e Merge pull request #508 from adriadam10/feat/vop3-cube-clamp
feat(shader): accept clamp on v_cube*_f32 and match their zero and subnormal results
2026-10-06 02:31:22 +13:00
Adrià FranchandClaude b6c7f1c7e3 fix(shader): match v_dot2_f32_f16 and v_dot2c_f32_f16 to hardware
Single rounding of the whole sum, f32 accumulator denormals flushed, NaN
picked on the bits, clamp ignored and the v_dot2c accumulator read from
the lane itself under DPP, all as measured on hardware.

Co-Authored-By: Claude <[email protected]>
2026-10-05 15:20:01 +02:00
hamb3r aad1be52e8 fix(pad): synthesize touch contact for Xbox View 2026-10-05 16:13:26 +03:00
Adrià FranchandClaude 62ad3a6802 test(shader): cover the bitwise and unsigned image atomics
Co-Authored-By: Claude <[email protected]>
2026-10-05 15:05:14 +02:00
Akhil MoolaandClaude Opus 5.5 5202199684 fix(agc): emulate comparison sampling of color textures in the shader
AMD hardware compares a sample_c reference against a color texture's red
channel; Vulkan defines comparison sampling only for depth formats, so the
driver refused any compare-sampled texture that is not R32 float or R16
unorm. PPSA21567 compares the same LESSEQUAL, clamp-to-border (opaque
white) sampler against a shadow map and against a 1x1 RGBA8 texture.

For a compare-sampled image whose format is not natively comparable, the
specialization records the paired sampler's compare function, filter,
addressing and border, and the view's reference clamp kind; the image then
binds as an ordinary color texture. The backend fetches the red channel,
applies wrap, clamp-to-edge or clamp-to-border addressing with the
sampler's texel-centre convention (border taps take the border's red),
compares, and blends four comparisons for bilinear filtering. Real depth
formats keep the native path.

Only sample_c / sample_c_lz on 2D and 2D array views, float/unorm/snorm
formats, wrap, clamp-to-edge or clamp-to-border, point or bilinear at one
level are implemented; half-border, the border color table and everything
else on this path throw. The reference clamp for unorm/snorm color formats
is not documented by AMD and is recorded in the technical debt.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 06:55:03 -06:00
Adrià FranchandClaude 7e90590146 feat(shader): accept every SDWA selector on VOP2 float ops
Co-Authored-By: Claude <[email protected]>
2026-10-05 14:49:14 +02:00
Adrià FranchandClaude 73599fad8f fix(shader): apply clamp on v_div_scale_f64 and accept omod on the f32 division steps and v_div_scale
Co-Authored-By: Claude <[email protected]>
2026-10-05 14:31:42 +02:00
Tomás Ortellado 1fa44c7b5c fix(relinker): decode autorun exit status for the host 2026-10-05 09:23:47 -03:00
Tomás Ortellado 23008762cc fix(libkernel): preserve 64-bit metadata download sizes 2026-10-05 09:13:05 -03:00
Tomás Ortellado 77dc9e77e1 fix(net): report address text buffer errors to the guest 2026-10-05 09:01:14 -03:00
Tomás Ortellado e1bfd03f23 fix(libc): return null when strdup allocation fails 2026-10-05 08:57:56 -03:00
Tomás Ortellado 9f9e4e28b8 fix(relinker): reject invalid and overflowing alignment 2026-10-05 08:44:55 -03:00
Tomás Ortellado 3a30b5bae0 fix(rtc): reject invalid RFC 3339 formatting offsets 2026-10-05 08:37:55 -03:00
Krzysztof Hasiński 8a8c0290d6 fix(shader): apply f32 output modifiers on the exponent bits
The output modifier was a separate multiply by 2, 4 or 0.5. On NVIDIA
that multiply behaves as if folded into the instruction's own v_mul_f32
despite NoContraction, so a product that overflows comes back finite
after div:2 (FLT_MAX * 2.0 div:2 gave FLT_MAX instead of +inf).

Scale a normal result by adding to or subtracting from its exponent
field instead: mul:2/mul:4 saturate to signed infinity when the exponent
overflows, div:2 keeps the existing signed-zero flush below 2^-125, and
infinities and NaNs pass through unchanged. Over all 2^32 inputs the
results are bit-identical to the previous IEEE multiply and selects.
2026-10-05 12:10:14 +02:00
Celegans12andClaude Opus 5.5 af40e9ca69 feat(usbd): add the libSceUsbd module
Titles that list libSceUsbd.prx as a needed module stop in the
startup stub with "Failed to load module: libs\libSceUsbd.prx"
(GetLastError 126), even when they import no function from it.

Add libSceUsbd with an Export.cpp that contains only APS5_DUMMY_FUN,
like libkernel_sys, libkernel_web, libSceAgcVsh, libSceAjm and
libSceNgs2. The module now loads, exports no sceUsbd function and
guesses no signature, so a title that does import one still stops
with "FAIL: unresolved ELF import" for that NID.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 11:47:20 +02:00
DotDebianandClaude Opus 5.5 f2fb7852bb feat(libs): implement NpCppWebApi IntrusivePtr construction, copy, release and access
IntrusivePtr<T> is three pointers: object, deleter, LibContext. The default
constructors zero them, the copy constructors copy them and take a reference
on the object, operator-> and operator* return the object, and the destructors
drop a reference and hand the object to the deleter when it was the last one.
The last-reference release of a pointer without a deleter needs the object's
destructor and the LibContext memory pool and still throws.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 11:18:39 +02:00
Dean 53dc19cf61 Merge pull request #617 from Erige005/test/discard-refused-recompile-results
test(agc): discard the results of recompiles expected to be refused
2026-10-05 22:16:17 +13:00
Dean 8c906ca985 Merge pull request #622 from DotDebian/feat/agc-dcb-prime-utcl2
feat(agc): implement sceAgcDcbPrimeUtcl2 and its size query
2026-10-05 22:13:30 +13:00
DotDebianandClaude Opus 5.5 6a20036154 feat(libs): implement NpCppWebApi Common::String constructor, destructor and c_str
The constructor was a silent stub that left the guest object
uninitialised and c_str threw. The constructor now writes the 0x20-byte
object, c_str returns the buffer or an empty string, and the destructor
throws for a non-null buffer, whose release needs the LibContext
allocator.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-05 11:12:56 +02:00
Adrià FranchandClaude 4d05623a42 fix(tools): count s_endpgm_saved and s_endpgm_ordered_ps_done as decoded shader instructions
Co-Authored-By: Claude <[email protected]>
2026-10-05 11:11:04 +02:00
Dean d0cf2a408c Merge pull request #624 from DotDebian/feat/audioout-get-last-output-time
feat(libSceAudioOut): implement sceAudioOutGetLastOutputTime
2026-10-05 22:05:30 +13:00
Dean ca6bd2f593 Merge pull request #623 from DotDebian/fix/freebsd-clock-ids
fix(libkernel): give CLOCK_VIRTUAL, CLOCK_PROF and CLOCK_SECOND their FreeBSD meaning
2026-10-05 22:04:48 +13:00
Dean 93fb226496 Merge pull request #621 from DotDebian/feat/font-get-pixel-resolution
feat(font): implement sceFontGetPixelResolution
2026-10-05 22:04:06 +13:00
Dean 3bf9ac5794 Merge pull request #620 from DotDebian/feat/libc-snwprintf-s
feat(libc): implement snwprintf_s
2026-10-05 22:03:24 +13:00
Adrià FranchandClaude f457d87bbd feat(shader): accept clamp on v_cube*_f32 and match their zero and subnormal results
Co-Authored-By: Claude <[email protected]>
2026-10-05 10:57:27 +02:00
Adrià FranchandClaude 9e6362dc71 docs: record the MODE assumption of v_mullit_f32 in TechnicalDebt
Co-Authored-By: Claude <[email protected]>
2026-10-05 10:53:50 +02:00
Adrià FranchandClaude 7bb6c59e83 fix(shader): v_mullit_f32 legacy rules, v_cvt_pk_u8_f32 rounding and VOP3 neg/abs
Co-Authored-By: Claude <[email protected]>
2026-10-05 10:53:50 +02:00
Dean 8040d09ad0 Merge pull request #628 from oneandonlydean/perf/agc-query-entry-points-once
perf(agc): resolve the recorder's query and fold entry points once
2026-10-05 21:49:12 +13:00
Dean c760129beb Merge pull request #627 from oneandonlydean/perf/agc-large-label-stores
perf(agc): keep label stores larger than 64 bytes out of the label table
2026-10-05 21:48:28 +13:00
Dean 6df3301700 Merge pull request #503 from oneandonlydean/feat/agc-3d-thick-mip-tails
feat(agc): thick mip tails of mipmapped 3D textures
2026-10-05 21:46:40 +13:00
Dean 2cce4bde41 Merge pull request #469 from Pacuka/fix/agc-null-pixel-program
fix(agc): draw without a pixel program when SPI_SHADER_PGM_PS is unset
2026-10-05 21:36:35 +13:00